Added WidgetText. Fixed some things. Updated README
This commit is contained in:
5
main.cpp
5
main.cpp
@@ -11,6 +11,7 @@
|
||||
|
||||
#include "sdl_helpers.h"
|
||||
#include "Widgets/Widget.h"
|
||||
#include "Widgets/WidgetText.h"
|
||||
|
||||
using std::cout;
|
||||
using std::endl;
|
||||
@@ -21,7 +22,7 @@ using nlohmann::json;
|
||||
|
||||
void init_builders(map<string, Widget*(*)(const json&)>& widget_builders)
|
||||
{
|
||||
// widget_builders["name"] = &WidgetName::builder;
|
||||
widget_builders["text"] = &WidgetText::builder;
|
||||
}
|
||||
|
||||
int main(int argc, char **argv)
|
||||
@@ -107,7 +108,7 @@ int main(int argc, char **argv)
|
||||
}
|
||||
|
||||
// Clear screen with white
|
||||
SDL_FillRect(main_surface, nullptr, SDL_MapRGBA(main_surface->format, 255, 255, 255, 255));
|
||||
SDL_FillRect(main_surface, nullptr, SDL_MapRGBA(main_surface->format, 255, 255, 255, SDL_ALPHA_OPAQUE));
|
||||
|
||||
// Draw and apply all widgets
|
||||
for (Widget* widget : widgets)
|
||||
|
||||
Reference in New Issue
Block a user