Figured out the easiest way to set a panel to be centered, but a lot of these config things need to be unified and cleaned up.
This commit is contained in:
parent
269af02993
commit
fc61ef42ac
6 changed files with 48 additions and 33 deletions
|
@ -30,6 +30,8 @@ struct RenderConfig {
|
|||
};
|
||||
|
||||
struct SFMLRender {
|
||||
int $cells_w = 0;
|
||||
int $cells_h = 0;
|
||||
RenderConfig $config;
|
||||
sf::RenderWindow $window;
|
||||
int $map_font_size;
|
||||
|
@ -59,6 +61,7 @@ struct SFMLRender {
|
|||
|
||||
void draw(Panel &panel, float x_offset=0.0f, float y_offset=0.0f);
|
||||
void draw_sprite(sf::Sprite &sprite, sf::Shader *shader);
|
||||
void center_panel(Panel &panel);
|
||||
|
||||
bool poll_event(sf::Event &event) {
|
||||
return $window.pollEvent(event);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue