mirror of
https://github.com/devZoGok/PlanetFleet.git
synced 2026-08-27 03:53:33 +00:00
individual player trading screen
This commit is contained in:
+26
-1
@@ -1,15 +1,24 @@
|
||||
#include "activeStateButton.h"
|
||||
#include "gameManager.h"
|
||||
#include "activeGameState.h"
|
||||
#include "concreteGuiManager.h"
|
||||
|
||||
#include <listbox.h>
|
||||
#include <checkbox.h>
|
||||
#include <slider.h>
|
||||
#include <textbox.h>
|
||||
|
||||
#include <text.h>
|
||||
|
||||
#include <stateManager.h>
|
||||
|
||||
namespace battleship{
|
||||
using namespace std;
|
||||
using namespace vb01;
|
||||
using namespace vb01Gui;
|
||||
using namespace gameBase;
|
||||
|
||||
ActiveStateButton::ActiveStateButton(Vector2 pos, Vector2 size, string name, int trigger, string imagePath) : Button(pos, size, name, GameManager::getSingleton()->getPath() + "Fonts/batang.ttf", trigger, true, imagePath){
|
||||
ActiveStateButton::ActiveStateButton(Vector2 pos, Vector2 size, string gs, string name, int trigger, string imagePath) : Button(pos, size, name, GameManager::getSingleton()->getPath() + "Fonts/batang.ttf", trigger, true, imagePath), guiScreen(gs){
|
||||
StateManager *stateManager = GameManager::getSingleton()->getStateManager();
|
||||
ActiveGameState *activeState = (ActiveGameState*)stateManager->getAppStateByType((int)AppStateType::ACTIVE_STATE);
|
||||
|
||||
@@ -18,5 +27,21 @@ namespace battleship{
|
||||
}
|
||||
|
||||
void ActiveStateButton::onClick(){
|
||||
ConcreteGuiManager *guiManager = ConcreteGuiManager::getSingleton();
|
||||
|
||||
vector<Button*> buttons{};
|
||||
vector<Listbox*> listboxes{};
|
||||
vector<Checkbox*> checkboxes{};
|
||||
vector<Slider*> sliders{};
|
||||
vector<Textbox*> textboxes{};
|
||||
vector<Node*> guiRects = guiManager->getGuiRectangles();
|
||||
vector<Text*> texts{
|
||||
guiManager->getText("depth"),
|
||||
guiManager->getText("refineds"),
|
||||
guiManager->getText("wealth"),
|
||||
guiManager->getText("research")
|
||||
};
|
||||
|
||||
guiManager->readLuaScreenScript(guiScreen, buttons, listboxes, checkboxes, sliders, textboxes, guiRects, texts);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user