loading bar

This commit is contained in:
devZoGok
2025-03-28 19:56:06 +02:00
parent e5377a5152
commit 12c3a67122
13 changed files with 166 additions and 30 deletions
+2 -2
View File
@@ -2,6 +2,7 @@
#include "concreteGuiManager.h"
#include "gameManager.h"
#include "mapEditorAppState.h"
#include "loadingAppState.h"
#include <stateManager.h>
@@ -16,8 +17,7 @@ namespace battleship{
void LoadMapButton::OkButton::onClick(){
StateManager *sm = GameManager::getSingleton()->getStateManager();
string name = wstringToString(listbox->getContents()[listbox->getSelectedOption()]);
sm->attachAppState(new MapEditorAppState(name, Vector2::VEC_ZERO, false));
ConcreteGuiManager::getSingleton()->readLuaScreenScript("mapEditor.lua");
handleLoadingGui(new LoadingAppState(new MapEditorAppState(name, Vector2::VEC_ZERO, false), "mapEditor.lua"));
}
LoadMapButton::LoadMapButton(Vector3 pos, Vector2 size) : Button(pos, size, "Load map", GameManager::getSingleton()->getPath() + "Fonts/batang.ttf"){}