Small fixes from windows
This commit is contained in:
parent
420bb37039
commit
b26310439d
4 changed files with 24 additions and 12 deletions
|
|
@ -1,12 +1,12 @@
|
|||
|
||||
#include "Player.hpp"
|
||||
#include "GUI.hpp"
|
||||
#include "Player.hpp"
|
||||
|
||||
// 1) artworks
|
||||
// 2) how to easy add more songs?
|
||||
// 3) GUi :
|
||||
// - seeker
|
||||
// - song idx
|
||||
// - seeker
|
||||
// - song idx
|
||||
// - non existing highlight
|
||||
// - prev next
|
||||
// - remove debug gui
|
||||
|
|
@ -14,19 +14,20 @@
|
|||
// 5) new database with history
|
||||
|
||||
void runApp() {
|
||||
|
||||
Player player;
|
||||
Library library; library.loadJson(getHome() + "Library.json"); library.checkExisting();
|
||||
Library library;
|
||||
library.loadJson(getHome() + "Library.json");
|
||||
library.checkExisting();
|
||||
LibraryWidget<tp::Window::Events, tp::Graphics::Canvas> gui(&library, &player);
|
||||
|
||||
auto window = tp::Window::createWindow(800, 600, "Window 1");
|
||||
auto window = tp::Window::createWindow(800, 600, "Window 1");
|
||||
|
||||
if (window) {
|
||||
while (!window->shouldClose()) {
|
||||
window->processEvents();
|
||||
|
||||
|
||||
auto area = window->getCanvas().getAvaliableArea();
|
||||
|
||||
|
||||
gui.proc(window->getEvents(), {}, { area.x, area.y, area.z, area.w });
|
||||
gui.draw(window->getCanvas(), {}, { area.x, area.y, area.z, area.w });
|
||||
|
||||
|
|
@ -48,7 +49,7 @@ int main() {
|
|||
return 1;
|
||||
}
|
||||
|
||||
runApp();
|
||||
|
||||
runApp();
|
||||
|
||||
binModule.deinitialize();
|
||||
}
|
||||
|
|
|
|||
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue