Got some kind of jank button and mouse events coming in, now just need to connect them to the GUI to detect button presses and other interaction.
This commit is contained in:
parent
9741df30ab
commit
37d28094ec
5 changed files with 56 additions and 27 deletions
|
@ -1,5 +1,6 @@
|
|||
#pragma once
|
||||
#include <SFML/System.hpp>
|
||||
#include <SFML/Graphics/RectangleShape.hpp>
|
||||
#include <SFML/Graphics/RenderWindow.hpp>
|
||||
#include <SFML/Graphics/Sprite.hpp>
|
||||
#include <SFML/Graphics/Font.hpp>
|
||||
|
@ -16,6 +17,10 @@ constexpr int Y_DIM = 1080 / 2;
|
|||
constexpr int TEXT_SIZE = 48;
|
||||
constexpr int Y_LINES = 23;
|
||||
constexpr int X_ROWS = 48;
|
||||
const sf::Color OUTLINE(50, 200, 25);
|
||||
constexpr int THICKNESS=10;
|
||||
const sf::Color FILL = sf::Color::Transparent;
|
||||
|
||||
|
||||
class SoundQuip {
|
||||
public:
|
||||
|
@ -59,6 +64,11 @@ public:
|
|||
void update_entities();
|
||||
void update_log(std::vector<string> &lines);
|
||||
|
||||
sf::RectangleShape box(int x, int y, int width, int height,
|
||||
sf::Color fill=FILL,
|
||||
sf::Color outline=OUTLINE,
|
||||
int thickness=THICKNESS);
|
||||
|
||||
void write_text(int x, int y, string content, float size_mult=1.0f);
|
||||
|
||||
void Window_update();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue