95 std::vector<Widget*> m_sprites;
112 std::vector<int> m_widgets;
115 unsigned int m_width, m_height;
117 bool m_renderToTexture;
124 std::vector<SpriteBatch*> m_batches;
137 Canvas() : m_layer(0), m_renderToTexture(false), m_fbo(0), m_texture(NULL), m_width(0), m_height(0) {}
185 void addWidget(
int w);
213 void enableRenderToTexture(
const char* tex);
225 if (m_texture != NULL)
226 m_renderToTexture =
true;
void enableRenderToTexture()
Enables the render to texture flag.
Definition: Canvas.h:223
static Canvas * getInstance()
Returns the global canvas object that directly maps to the screen.
Definition: Canvas.h:130
Vector4 getClearColor()
Returns the clear color of the Canvas.
Definition: Canvas.h:191
The Canvas class contains all widgets and renders them.
Definition: Canvas.h:109
Vector2 getCameraOffset()
Returns the current camera offset.
Definition: Canvas.h:250
DISOWN(SpriteBatch *b) void addSpriteBatch(SpriteBatch *b)
Definition: Canvas.h:139
void disableRenderToTexture()
Disables the render to texture flag.
Definition: Canvas.h:237
~Canvas()
Definition: Canvas.h:136
int getLayer()
Returns which layer this particular Canvas is at.
Definition: Canvas.h:165
Implements a batch of sprites that can be used to circumvent the GUI system when rendering 2D objects...
Definition: Canvas.h:93
Definition: TextureRef.h:32
void setCameraOffset(Vector2 value)
Sets the camera offset value that emulates a basic 2D camera.
Definition: Canvas.h:244
Canvas()
Definition: Canvas.h:137
void setLayer(int nl)
Sets the on which layer this Canvas will appear.
Definition: Canvas.h:174
void setClearColor(Vector4 vec)
Changes the clear color of the Canvas.
Definition: Canvas.h:198
DISOWN(Widget *s) void addSprite(Widget *s)
Definition: Canvas.h:97