exportable and readable minimap images

This commit is contained in:
devZoGok
2024-09-15 17:01:23 +03:00
parent 5566a8b5e8
commit 7ca58f95b6
4 changed files with 36 additions and 3 deletions
+5 -2
View File
@@ -56,6 +56,7 @@ namespace battleship{
//TODO refactor player difficulty and faction listbox selection
//TODO remove hardcoded font path values
//TODO use configurable map path values
Button* ConcreteGuiManager::parseButton(int guiId){
sol::state_view SOL_LUA_STATE = generateView();
sol::table guiTable = SOL_LUA_STATE["gui"][guiId + 1];
@@ -262,9 +263,11 @@ namespace battleship{
case RESOURCE_AMMOUNT:
button = new ResourceAmmountButton(pos, size, name, (int)guiTable["ammount"], (int)guiTable["trigger"], imagePath);
break;
case MINIMAP:
button = new MinimapButton(pos, size, "");
case MINIMAP:{
string minimapPath = GameManager::getSingleton()->getPath() + "Models/Maps/" + Map::getSingleton()->getMapName() + "/minimap.jpg";
button = new MinimapButton(pos, size, minimapPath);
break;
}
}
int typeArr[2]{(int)GuiElementType::BUTTON, (int)type};