LibraryViewer
This commit is contained in:
parent
5a55011911
commit
c7d3b15758
24 changed files with 226111 additions and 36 deletions
46
LibraryViewer/applications/Entry.cpp
Normal file
46
LibraryViewer/applications/Entry.cpp
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
|
||||
#include "NewPlacement.hpp"
|
||||
#include "LibraryGui.hpp"
|
||||
|
||||
// events
|
||||
// animations
|
||||
// monitor resource usage
|
||||
// sorting
|
||||
|
||||
void runApp() {
|
||||
|
||||
Library library;
|
||||
library.loadJson("library/Library.json");
|
||||
|
||||
auto gui = LibraryWidget<tp::Window::Events, tp::Graphics::Canvas>(&library);
|
||||
|
||||
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 });
|
||||
|
||||
window->draw();
|
||||
}
|
||||
}
|
||||
|
||||
tp::Window::destroyWindow(window);
|
||||
}
|
||||
|
||||
int main() {
|
||||
tp::ModuleManifest* deps[] = { &tp::gModuleLibraryViewer, nullptr };
|
||||
tp::ModuleManifest binModule("LibViewEntry", nullptr, nullptr, deps);
|
||||
|
||||
if (!binModule.initialize()) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
runApp();
|
||||
|
||||
binModule.deinitialize();
|
||||
}
|
||||
BIN
LibraryViewer/applications/Font.ttf
Normal file
BIN
LibraryViewer/applications/Font.ttf
Normal file
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue