If Amazon used this Besos wouldn't have banned PowerPoint.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
besos-loves-slides/slides_ui.hpp

45 lines
925 B

#pragma once
#include "guecs/sfml/backend.hpp"
#include "guecs/sfml/components.hpp"
#include "guecs/ui.hpp"
#include <nlohmann/json.hpp>
#include <memory>
struct Slide {
guecs::UI $gui;
std::wstring $title;
std::wstring $content;
nlohmann::json $config;
bool $initialized = false;
Slide(const std::string& title, const std::string& content, nlohmann::json& config);
Slide() {}
void init(lel::Cell& cell);
void render(sf::RenderWindow& window);
}
;
using SlideSet = std::vector<Slide>;
struct SlideDeck {
nlohmann::json config;
SlideSet slides;
};
struct SlidesUI {
guecs::UI $gui;
std::shared_ptr<SlideDeck> $deck = nullptr;
size_t $current = 0;
SlidesUI(std::shared_ptr<SlideDeck> deck);
void init();
Slide& current();
void next_slide();
void prev_slide();
void show_slide();
void render(sf::RenderWindow& window);
void mouse(float x, float y, guecs::Modifiers mods);
};