unit orders aren't invoked if pressing a button

This commit is contained in:
devZoGok
2024-03-17 15:07:16 +02:00
parent ae93ada2c4
commit ce62c429c5
9 changed files with 72 additions and 5 deletions
+4
View File
@@ -26,6 +26,7 @@
#include "statsButton.h"
#include "researchButton.h"
#include "tradeButton.h"
#include "activeStateButton.h"
namespace battleship{
using namespace std;
@@ -213,6 +214,9 @@ namespace battleship{
case SELL_RESEARCH:
button = new TradeButton(pos, size, name, (int)guiTable["trigger"], (string)guiTable["imagePath"], (int)SOL_LUA_STATE["UnitId"]["TRADE_CENTER"], TradeButton::Type::SELL_RESEARCH);
break;
case ACTIVE_GAME_STATE:
button = new ActiveStateButton(pos, size, name, (int)guiTable["trigger"], (string)guiTable["imagePath"]);
break;
}
int typeArr[2]{(int)GuiElementType::BUTTON, (int)type};