Danbias/Code/OysterGraphics/OldRender/TextBox.h

45 lines
946 B
C
Raw Normal View History

2013-11-20 10:22:01 +01:00
#pragma once
#include "..\Engine.h"
const int MAX_LETTER_COUNT=60;
const int TEXT_NR_LETTERS=95;
const float TEXT_SIZE=2.5;
struct Text2D
{
Oyster::Math::Float Pos;
int offset;
float coff;
};
namespace Oyster
{
namespace Graphics
{
namespace Render
{
class Textbox
{
private:
static float getCharID(char _in);
static HRESULT CreateVertexBuffer();
static HRESULT CreateTextfield(int _id);
public:
static Buffer TextBuffer;
static int NumLetters;
static ID3D11ShaderResourceView* Texture;
static bool Init();
static bool UpdateTextField(std::string _str);
static bool SetTexture(const char* _file);
2014-02-11 13:29:19 +01:00
2013-11-20 10:22:01 +01:00
//Updates a textbox with the certain id
static void Update(std::string _str, float _scale);
2014-02-11 13:29:19 +01:00
2013-11-20 10:22:01 +01:00
//Removes all old instances and recreates it with the input data
static HRESULT Reset(int _count, std::string* _str, Float3* _pos);
static void Apply(int _id);
};
}
}
}