Rework the GUI so it uses SFMLBackend by moving the SoundQuip into SFMLBackend.

This commit is contained in:
Zed A. Shaw 2024-09-10 22:40:02 -04:00
parent 1badbd5942
commit c0ad0c8d23
4 changed files with 39 additions and 38 deletions

20
gui.hpp
View file

@ -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;