Added being able to set position via JSON. Text now always wraps on newlines.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
#include "Widget.h"
|
||||
|
||||
Widget::Widget(int width, int height)
|
||||
: m_surface(nullptr), m_rect{.x = 0, .y = 0, .w = width, .h = height}
|
||||
Widget::Widget(int x, int y, int width, int height)
|
||||
: m_surface(nullptr), m_rect{.x = x, .y = y, .w = width, .h = height}
|
||||
{
|
||||
m_surface = SDL_CreateRGBSurfaceWithFormat(0, width, height, 32, SDL_PIXELFORMAT_RGBA8888);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user