mirror of
https://github.com/ApfelTeeSaft/PlanetFleet.git
synced 2026-08-26 19:33:38 +00:00
reimplemented certain paused game state buttons using the new GUI subsystem
This commit is contained in:
+23
-31
@@ -20,6 +20,29 @@ namespace battleship{
|
||||
|
||||
class InGameAppState : public gameBase::AbstractAppState {
|
||||
public:
|
||||
class ResumeButton : public vb01Gui::Button {
|
||||
public:
|
||||
ResumeButton(vb01::Vector2, vb01::Vector2);
|
||||
void onClick();
|
||||
private:
|
||||
};
|
||||
|
||||
class ConsoleButton : public vb01Gui::Button {
|
||||
public:
|
||||
class ConsoleCommandEntryButton : public Button {
|
||||
public:
|
||||
ConsoleCommandEntryButton(vb01Gui::Textbox*, vb01Gui::Listbox*, vb01::Vector2, vb01::Vector2, std::string);
|
||||
void onClick();
|
||||
private:
|
||||
vb01Gui::Textbox *textbox;
|
||||
vb01Gui::Listbox *listbox;
|
||||
};
|
||||
|
||||
ConsoleButton(vb01::Vector2, vb01::Vector2);
|
||||
void onClick();
|
||||
private:
|
||||
};
|
||||
|
||||
InGameAppState(std::vector<std::string>, std::vector<std::string>, std::string);
|
||||
~InGameAppState();
|
||||
void onAttached();
|
||||
@@ -32,37 +55,6 @@ namespace battleship{
|
||||
inline void addFx(Fx fx){this->fx.push_back(fx);}
|
||||
inline void addProjectile(Projectile *p){projectiles.push_back(p);}
|
||||
private:
|
||||
class ResumeButton : public vb01Gui::Button {
|
||||
public:
|
||||
ResumeButton(GuiAppState*, InGameAppState*, vb01::Vector2, vb01::Vector2);
|
||||
void onClick();
|
||||
GuiAppState *getGuiState();
|
||||
private:
|
||||
GuiAppState *guiState;
|
||||
InGameAppState *inGameState;
|
||||
};
|
||||
|
||||
class ConsoleButton : public vb01Gui::Button {
|
||||
public:
|
||||
class ConsoleCommandEntryButton : public Button {
|
||||
public:
|
||||
ConsoleCommandEntryButton(InGameAppState*, vb01Gui::Textbox*, vb01Gui::Listbox*, vb01::Vector2, vb01::Vector2, std::string, bool);
|
||||
void onClick();
|
||||
private:
|
||||
InGameAppState *inGameState;
|
||||
vb01Gui::Textbox *textbox;
|
||||
vb01Gui::Listbox *listbox;
|
||||
};
|
||||
|
||||
ConsoleButton(GuiAppState*, InGameAppState*, vb01::Vector2, vb01::Vector2);
|
||||
void onClick();
|
||||
inline ConsoleCommandEntryButton* getEntryButton(){return entryButton;}
|
||||
private:
|
||||
GuiAppState *guiState;
|
||||
InGameAppState *inGameState;
|
||||
ConsoleCommandEntryButton *entryButton = nullptr;
|
||||
};
|
||||
|
||||
class MainMenuButton : public vb01Gui::Button {
|
||||
public:
|
||||
MainMenuButton(GuiAppState*, InGameAppState*, vb01::Vector2, vb01::Vector2);
|
||||
|
||||
Reference in New Issue
Block a user