Rework the GUI so it uses SFMLBackend by moving the SoundQuip into SFMLBackend.
This commit is contained in:
parent
1badbd5942
commit
c0ad0c8d23
4 changed files with 39 additions and 38 deletions
20
gui.hpp
20
gui.hpp
|
@ -1,29 +1,13 @@
|
|||
#pragma once
|
||||
|
||||
#include <efsw/efsw.hpp>
|
||||
#include "game_engine.hpp"
|
||||
#include <filesystem>
|
||||
#include <string>
|
||||
#include <SFML/Audio.hpp>
|
||||
#include <nlohmann/json.hpp>
|
||||
#include "game_engine.hpp"
|
||||
#include "sfmlbackend.hpp"
|
||||
|
||||
using std::string;
|
||||
|
||||
class Builder;
|
||||
|
||||
class SoundQuip {
|
||||
public:
|
||||
sf::Sound sound;
|
||||
sf::SoundBuffer buffer;
|
||||
bool initialized;
|
||||
|
||||
SoundQuip() {};
|
||||
|
||||
void load(nlohmann::json &data, const char *in_file);
|
||||
void play();
|
||||
void stop();
|
||||
};
|
||||
|
||||
class GUI {
|
||||
std::vector<string> _lines;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue