Working FontManager and Label implementation (WIP)
This commit is contained in:
parent
3b2be83590
commit
af6967151e
15 changed files with 608 additions and 61 deletions
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
#include "uui/opengl/application.hpp"
|
||||
#include "uui/opengl/component.hpp"
|
||||
#include "uui/opengl/label.hpp"
|
||||
|
||||
using namespace std;
|
||||
|
||||
|
|
@ -16,21 +17,23 @@ int main()
|
|||
auto window = app.create_window(800, 600, "OpenGl!");
|
||||
auto comp = window->create_component(0, 100, 0.5f, 50);
|
||||
comp->set_background_color(0.8f, 0.1f, 0.5f);
|
||||
auto label = window->create_label(0.5f, 0.5f, "Hello World!", {1.0f, 1.0f, 1.0f, 0.5f});
|
||||
label->set_background_color(0.1f, 0.5f, 0.1f);
|
||||
app.run();
|
||||
}
|
||||
cout << "\nStarting example 2" << endl;
|
||||
{
|
||||
uui::GlApplication app;
|
||||
auto window_1 = app.create_window(800, 600, "OpenGl!");
|
||||
auto comp = window_1->create_component(0.25f, 0.25f, 0.5f, 0.5f);
|
||||
comp->set_background_color(0.8f, 0.1f, 0.5f);
|
||||
comp = window_1->create_component(0.75f, 0.75f, 0.25f, 0.25f);
|
||||
comp->set_background_color(0.2f, 0.1f, 0.5f);
|
||||
auto window_2 = app.create_window(600, 600, "OpenGL 2!");
|
||||
comp = window_2->create_component(0, 0.5f, 100, 0.5f);
|
||||
comp->set_background_color(0.2f, 0.5f, 0.3f);
|
||||
app.run();
|
||||
}
|
||||
// cout << "\nStarting example 2" << endl;
|
||||
// {
|
||||
// uui::GlApplication app;
|
||||
// auto window_1 = app.create_window(800, 600, "OpenGl!");
|
||||
// auto comp = window_1->create_component(0.25f, 0.25f, 0.5f, 0.5f);
|
||||
// comp->set_background_color(0.8f, 0.1f, 0.5f);
|
||||
// comp = window_1->create_component(0.75f, 0.75f, 0.25f, 0.25f);
|
||||
// comp->set_background_color(0.2f, 0.1f, 0.5f);
|
||||
// auto window_2 = app.create_window(600, 600, "OpenGL 2!");
|
||||
// comp = window_2->create_component(0, 0.5f, 100, 0.5f);
|
||||
// comp->set_background_color(0.2f, 0.5f, 0.3f);
|
||||
// app.run();
|
||||
// }
|
||||
}
|
||||
catch(const std::exception& error)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue