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.
40 lines
778 B
40 lines
778 B
1 month ago
|
#pragma once
|
||
|
#include <SFML/System.hpp>
|
||
|
#include <SFML/Graphics/RenderWindow.hpp>
|
||
|
#include <SFML/Graphics/Sprite.hpp>
|
||
|
#include <SFML/Graphics/Font.hpp>
|
||
|
|
||
|
constexpr int FPS=30;
|
||
|
constexpr int X_DIM = 1920 / 2;
|
||
|
constexpr int Y_DIM = 1080 / 2;
|
||
|
|
||
|
class SFMLGui {
|
||
|
sf::ContextSettings settings;
|
||
|
sf::RenderWindow window;
|
||
|
sf::Clock clock;
|
||
|
sf::Clock deltaClock;
|
||
|
sf::Sprite background;
|
||
|
sf::Texture texture;
|
||
|
bool window_active_out = false;
|
||
|
bool show_build_log = false;
|
||
|
int hit_points = 50;
|
||
|
sf::Font font;
|
||
|
|
||
|
public:
|
||
|
SFMLGui();
|
||
|
|
||
|
void startup();
|
||
|
|
||
|
bool is_open();
|
||
|
void shutdown();
|
||
|
|
||
|
void handle_events();
|
||
|
void update_entities();
|
||
|
|
||
|
void write_text(sf::Vector2f position, const char *content);
|
||
|
|
||
|
void ImGui_setup();
|
||
|
void ImGui_update();
|
||
|
void Window_update();
|
||
|
};
|