Now have a simple storyboard system that can display an image and move with the camera to different cells.

This commit is contained in:
Zed A. Shaw 2025-11-04 00:20:49 -05:00
parent 068eeeecd1
commit 4bda2ee01c
10 changed files with 118 additions and 40 deletions

View file

@ -1,18 +1,15 @@
#include "gui/fsm.hpp"
#include "textures.hpp"
#include "sound.hpp"
#include "autowalker.hpp"
#include "ai.hpp"
#include "animation.hpp"
#include <iostream>
#include "shaders.hpp"
#include "backend.hpp"
#include "game_level.hpp"
#include "gui/fsm_events.hpp"
#include "events.hpp"
#include "constants.hpp"
#include "gui/event_router.hpp"
#include "camera.hpp"
#include "storyboard/ui.hpp"
int main(int, char*[]) {
components::init();
@ -28,14 +25,22 @@ int main(int, char*[]) {
gui::routing::Router router;
storyboard::UI main;
main.init();
while(true) {
while(const auto ev = window.pollEvent()) {
auto gui_ev = router.process_event(ev);
auto mouse_pos = window.mapPixelToCoords(router.position);
if(gui_ev == gui::Event::QUIT) {
return 0;
} else if(gui_ev == gui::Event::MOUSE_CLICK) {
main.mouse(mouse_pos.x, mouse_pos.y, guecs::NO_MODS);
}
}
main.render(window);
window.display();
}