mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-27 22:49:25 +02:00
Renamed BattleControlPanel -> BattleWindow
This commit is contained in:
@@ -4,7 +4,6 @@ set(client_SRCS
|
|||||||
|
|
||||||
battle/BattleActionsController.cpp
|
battle/BattleActionsController.cpp
|
||||||
battle/BattleAnimationClasses.cpp
|
battle/BattleAnimationClasses.cpp
|
||||||
battle/BattleControlPanel.cpp
|
|
||||||
battle/BattleEffectsController.cpp
|
battle/BattleEffectsController.cpp
|
||||||
battle/BattleFieldController.cpp
|
battle/BattleFieldController.cpp
|
||||||
battle/BattleInterfaceClasses.cpp
|
battle/BattleInterfaceClasses.cpp
|
||||||
@@ -14,6 +13,7 @@ set(client_SRCS
|
|||||||
battle/BattleRenderer.cpp
|
battle/BattleRenderer.cpp
|
||||||
battle/BattleSiegeController.cpp
|
battle/BattleSiegeController.cpp
|
||||||
battle/BattleStacksController.cpp
|
battle/BattleStacksController.cpp
|
||||||
|
battle/BattleWindow.cpp
|
||||||
battle/CreatureAnimation.cpp
|
battle/CreatureAnimation.cpp
|
||||||
|
|
||||||
gui/CAnimation.cpp
|
gui/CAnimation.cpp
|
||||||
@@ -88,7 +88,6 @@ set(client_HEADERS
|
|||||||
|
|
||||||
battle/BattleActionsController.h
|
battle/BattleActionsController.h
|
||||||
battle/BattleAnimationClasses.h
|
battle/BattleAnimationClasses.h
|
||||||
battle/BattleControlPanel.h
|
|
||||||
battle/BattleEffectsController.h
|
battle/BattleEffectsController.h
|
||||||
battle/BattleFieldController.h
|
battle/BattleFieldController.h
|
||||||
battle/BattleInterfaceClasses.h
|
battle/BattleInterfaceClasses.h
|
||||||
@@ -98,6 +97,7 @@ set(client_HEADERS
|
|||||||
battle/BattleRenderer.h
|
battle/BattleRenderer.h
|
||||||
battle/BattleSiegeController.h
|
battle/BattleSiegeController.h
|
||||||
battle/BattleStacksController.h
|
battle/BattleStacksController.h
|
||||||
|
battle/BattleWindow.h
|
||||||
battle/CreatureAnimation.h
|
battle/CreatureAnimation.h
|
||||||
battle/BattleConstants.h
|
battle/BattleConstants.h
|
||||||
|
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
#include "battle/BattleEffectsController.h"
|
#include "battle/BattleEffectsController.h"
|
||||||
#include "battle/BattleFieldController.h"
|
#include "battle/BattleFieldController.h"
|
||||||
#include "battle/BattleInterfaceClasses.h"
|
#include "battle/BattleInterfaceClasses.h"
|
||||||
#include "battle/BattleControlPanel.h"
|
#include "battle/BattleWindow.h"
|
||||||
#include "../CCallback.h"
|
#include "../CCallback.h"
|
||||||
#include "windows/CCastleInterface.h"
|
#include "windows/CCastleInterface.h"
|
||||||
#include "gui/CCursorHandler.h"
|
#include "gui/CCursorHandler.h"
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
#include "StdInc.h"
|
#include "StdInc.h"
|
||||||
#include "BattleActionsController.h"
|
#include "BattleActionsController.h"
|
||||||
|
|
||||||
#include "BattleControlPanel.h"
|
#include "BattleWindow.h"
|
||||||
#include "BattleStacksController.h"
|
#include "BattleStacksController.h"
|
||||||
#include "BattleInterface.h"
|
#include "BattleInterface.h"
|
||||||
#include "BattleFieldController.h"
|
#include "BattleFieldController.h"
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
#include "BattleEffectsController.h"
|
#include "BattleEffectsController.h"
|
||||||
|
|
||||||
#include "BattleAnimationClasses.h"
|
#include "BattleAnimationClasses.h"
|
||||||
#include "BattleControlPanel.h"
|
#include "BattleWindow.h"
|
||||||
#include "BattleInterface.h"
|
#include "BattleInterface.h"
|
||||||
#include "BattleInterfaceClasses.h"
|
#include "BattleInterfaceClasses.h"
|
||||||
#include "BattleFieldController.h"
|
#include "BattleFieldController.h"
|
||||||
|
|||||||
@@ -19,7 +19,7 @@
|
|||||||
#include "BattleObstacleController.h"
|
#include "BattleObstacleController.h"
|
||||||
#include "BattleSiegeController.h"
|
#include "BattleSiegeController.h"
|
||||||
#include "BattleFieldController.h"
|
#include "BattleFieldController.h"
|
||||||
#include "BattleControlPanel.h"
|
#include "BattleWindow.h"
|
||||||
#include "BattleStacksController.h"
|
#include "BattleStacksController.h"
|
||||||
#include "BattleRenderer.h"
|
#include "BattleRenderer.h"
|
||||||
|
|
||||||
@@ -90,7 +90,7 @@ BattleInterface::BattleInterface(const CCreatureSet *army1, const CCreatureSet *
|
|||||||
if(town && town->hasFort())
|
if(town && town->hasFort())
|
||||||
siegeController.reset(new BattleSiegeController(*this, town));
|
siegeController.reset(new BattleSiegeController(*this, town));
|
||||||
|
|
||||||
windowObject = std::make_shared<BattleControlPanel>(*this);
|
windowObject = std::make_shared<BattleWindow>(*this);
|
||||||
projectilesController.reset(new BattleProjectileController(*this));
|
projectilesController.reset(new BattleProjectileController(*this));
|
||||||
stacksController.reset( new BattleStacksController(*this));
|
stacksController.reset( new BattleStacksController(*this));
|
||||||
actionsController.reset( new BattleActionsController(*this));
|
actionsController.reset( new BattleActionsController(*this));
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ class BattleSiegeController;
|
|||||||
class BattleObstacleController;
|
class BattleObstacleController;
|
||||||
class BattleFieldController;
|
class BattleFieldController;
|
||||||
class BattleRenderer;
|
class BattleRenderer;
|
||||||
class BattleControlPanel;
|
class BattleWindow;
|
||||||
class BattleStacksController;
|
class BattleStacksController;
|
||||||
class BattleActionsController;
|
class BattleActionsController;
|
||||||
class BattleEffectsController;
|
class BattleEffectsController;
|
||||||
@@ -91,7 +91,7 @@ struct StackAttackInfo
|
|||||||
class BattleInterface
|
class BattleInterface
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
std::shared_ptr<BattleControlPanel> windowObject;
|
std::shared_ptr<BattleWindow> windowObject;
|
||||||
std::shared_ptr<BattleConsole> console;
|
std::shared_ptr<BattleConsole> console;
|
||||||
|
|
||||||
std::shared_ptr<CPlayerInterface> tacticianInterface; //used during tactics mode, points to the interface of player with higher tactics (can be either attacker or defender in hot-seat), valid onloy for human players
|
std::shared_ptr<CPlayerInterface> tacticianInterface; //used during tactics mode, points to the interface of player with higher tactics (can be either attacker or defender in hot-seat), valid onloy for human players
|
||||||
@@ -240,7 +240,7 @@ public:
|
|||||||
friend class BattleSiegeController;
|
friend class BattleSiegeController;
|
||||||
friend class BattleObstacleController;
|
friend class BattleObstacleController;
|
||||||
friend class BattleFieldController;
|
friend class BattleFieldController;
|
||||||
friend class BattleControlPanel;
|
friend class BattleWindow;
|
||||||
friend class BattleStacksController;
|
friend class BattleStacksController;
|
||||||
friend class BattleActionsController;
|
friend class BattleActionsController;
|
||||||
friend class BattleEffectsController;
|
friend class BattleEffectsController;
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
#include "BattleSiegeController.h"
|
#include "BattleSiegeController.h"
|
||||||
#include "BattleFieldController.h"
|
#include "BattleFieldController.h"
|
||||||
#include "BattleStacksController.h"
|
#include "BattleStacksController.h"
|
||||||
#include "BattleControlPanel.h"
|
#include "BattleWindow.h"
|
||||||
|
|
||||||
#include "../CGameInfo.h"
|
#include "../CGameInfo.h"
|
||||||
#include "../CMessage.h"
|
#include "../CMessage.h"
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
#include "BattleInterface.h"
|
#include "BattleInterface.h"
|
||||||
#include "BattleInterfaceClasses.h"
|
#include "BattleInterfaceClasses.h"
|
||||||
#include "BattleEffectsController.h"
|
#include "BattleEffectsController.h"
|
||||||
#include "BattleControlPanel.h"
|
#include "BattleWindow.h"
|
||||||
#include "BattleSiegeController.h"
|
#include "BattleSiegeController.h"
|
||||||
#include "BattleStacksController.h"
|
#include "BattleStacksController.h"
|
||||||
#include "BattleObstacleController.h"
|
#include "BattleObstacleController.h"
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
#include "BattleFieldController.h"
|
#include "BattleFieldController.h"
|
||||||
#include "BattleEffectsController.h"
|
#include "BattleEffectsController.h"
|
||||||
#include "BattleProjectileController.h"
|
#include "BattleProjectileController.h"
|
||||||
#include "BattleControlPanel.h"
|
#include "BattleWindow.h"
|
||||||
#include "BattleRenderer.h"
|
#include "BattleRenderer.h"
|
||||||
#include "CreatureAnimation.h"
|
#include "CreatureAnimation.h"
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* BattleControlPanel.cpp, part of VCMI engine
|
* BattleWindow.cpp, part of VCMI engine
|
||||||
*
|
*
|
||||||
* Authors: listed in file AUTHORS in main folder
|
* Authors: listed in file AUTHORS in main folder
|
||||||
*
|
*
|
||||||
@@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
#include "StdInc.h"
|
#include "StdInc.h"
|
||||||
#include "BattleControlPanel.h"
|
#include "BattleWindow.h"
|
||||||
|
|
||||||
#include "BattleInterface.h"
|
#include "BattleInterface.h"
|
||||||
#include "BattleInterfaceClasses.h"
|
#include "BattleInterfaceClasses.h"
|
||||||
@@ -34,7 +34,7 @@
|
|||||||
#include "../../lib/CStack.h"
|
#include "../../lib/CStack.h"
|
||||||
#include "../../lib/CConfigHandler.h"
|
#include "../../lib/CConfigHandler.h"
|
||||||
|
|
||||||
BattleControlPanel::BattleControlPanel(BattleInterface & owner):
|
BattleWindow::BattleWindow(BattleInterface & owner):
|
||||||
owner(owner)
|
owner(owner)
|
||||||
{
|
{
|
||||||
OBJ_CONSTRUCTION_CAPTURING_ALL_NO_DISPOSE;
|
OBJ_CONSTRUCTION_CAPTURING_ALL_NO_DISPOSE;
|
||||||
@@ -49,15 +49,15 @@ BattleControlPanel::BattleControlPanel(BattleInterface & owner):
|
|||||||
menuBattle->colorize(owner.curInt->playerID);
|
menuBattle->colorize(owner.curInt->playerID);
|
||||||
|
|
||||||
//preparing buttons and console
|
//preparing buttons and console
|
||||||
bOptions = std::make_shared<CButton> (Point( 3, 5 + 556), "icm003.def", CGI->generaltexth->zelp[381], std::bind(&BattleControlPanel::bOptionsf,this), SDLK_o);
|
bOptions = std::make_shared<CButton> (Point( 3, 5 + 556), "icm003.def", CGI->generaltexth->zelp[381], std::bind(&BattleWindow::bOptionsf,this), SDLK_o);
|
||||||
bSurrender = std::make_shared<CButton> (Point( 54, 5 + 556), "icm001.def", CGI->generaltexth->zelp[379], std::bind(&BattleControlPanel::bSurrenderf,this), SDLK_s);
|
bSurrender = std::make_shared<CButton> (Point( 54, 5 + 556), "icm001.def", CGI->generaltexth->zelp[379], std::bind(&BattleWindow::bSurrenderf,this), SDLK_s);
|
||||||
bFlee = std::make_shared<CButton> (Point(105, 5 + 556), "icm002.def", CGI->generaltexth->zelp[380], std::bind(&BattleControlPanel::bFleef,this), SDLK_r);
|
bFlee = std::make_shared<CButton> (Point(105, 5 + 556), "icm002.def", CGI->generaltexth->zelp[380], std::bind(&BattleWindow::bFleef,this), SDLK_r);
|
||||||
bAutofight = std::make_shared<CButton> (Point(158, 5 + 556), "icm004.def", CGI->generaltexth->zelp[382], std::bind(&BattleControlPanel::bAutofightf,this), SDLK_a);
|
bAutofight = std::make_shared<CButton> (Point(158, 5 + 556), "icm004.def", CGI->generaltexth->zelp[382], std::bind(&BattleWindow::bAutofightf,this), SDLK_a);
|
||||||
bSpell = std::make_shared<CButton> (Point(645, 5 + 556), "icm005.def", CGI->generaltexth->zelp[385], std::bind(&BattleControlPanel::bSpellf,this), SDLK_c);
|
bSpell = std::make_shared<CButton> (Point(645, 5 + 556), "icm005.def", CGI->generaltexth->zelp[385], std::bind(&BattleWindow::bSpellf,this), SDLK_c);
|
||||||
bWait = std::make_shared<CButton> (Point(696, 5 + 556), "icm006.def", CGI->generaltexth->zelp[386], std::bind(&BattleControlPanel::bWaitf,this), SDLK_w);
|
bWait = std::make_shared<CButton> (Point(696, 5 + 556), "icm006.def", CGI->generaltexth->zelp[386], std::bind(&BattleWindow::bWaitf,this), SDLK_w);
|
||||||
bDefence = std::make_shared<CButton> (Point(747, 5 + 556), "icm007.def", CGI->generaltexth->zelp[387], std::bind(&BattleControlPanel::bDefencef,this), SDLK_d);
|
bDefence = std::make_shared<CButton> (Point(747, 5 + 556), "icm007.def", CGI->generaltexth->zelp[387], std::bind(&BattleWindow::bDefencef,this), SDLK_d);
|
||||||
bConsoleUp = std::make_shared<CButton> (Point(624, 5 + 556), "ComSlide.def", std::make_pair("", ""), std::bind(&BattleControlPanel::bConsoleUpf,this), SDLK_UP);
|
bConsoleUp = std::make_shared<CButton> (Point(624, 5 + 556), "ComSlide.def", std::make_pair("", ""), std::bind(&BattleWindow::bConsoleUpf,this), SDLK_UP);
|
||||||
bConsoleDown = std::make_shared<CButton>(Point(624, 24 + 556), "ComSlide.def", std::make_pair("", ""), std::bind(&BattleControlPanel::bConsoleDownf,this), SDLK_DOWN);
|
bConsoleDown = std::make_shared<CButton>(Point(624, 24 + 556), "ComSlide.def", std::make_pair("", ""), std::bind(&BattleWindow::bConsoleDownf,this), SDLK_DOWN);
|
||||||
|
|
||||||
bDefence->assignedKeys.insert(SDLK_SPACE);
|
bDefence->assignedKeys.insert(SDLK_SPACE);
|
||||||
bConsoleUp->setImageOrder(0, 1, 0, 0);
|
bConsoleUp->setImageOrder(0, 1, 0, 0);
|
||||||
@@ -99,7 +99,7 @@ BattleControlPanel::BattleControlPanel(BattleInterface & owner):
|
|||||||
addUsedEvents(RCLICK | KEYBOARD);
|
addUsedEvents(RCLICK | KEYBOARD);
|
||||||
}
|
}
|
||||||
|
|
||||||
void BattleControlPanel::hideQueue()
|
void BattleWindow::hideQueue()
|
||||||
{
|
{
|
||||||
Settings showQueue = settings.write["battle"]["showQueue"];
|
Settings showQueue = settings.write["battle"]["showQueue"];
|
||||||
showQueue->Bool() = false;
|
showQueue->Bool() = false;
|
||||||
@@ -113,7 +113,7 @@ void BattleControlPanel::hideQueue()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void BattleControlPanel::showQueue()
|
void BattleWindow::showQueue()
|
||||||
{
|
{
|
||||||
Settings showQueue = settings.write["battle"]["showQueue"];
|
Settings showQueue = settings.write["battle"]["showQueue"];
|
||||||
showQueue->Bool() = true;
|
showQueue->Bool() = true;
|
||||||
@@ -127,24 +127,24 @@ void BattleControlPanel::showQueue()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void BattleControlPanel::updateQueue()
|
void BattleWindow::updateQueue()
|
||||||
{
|
{
|
||||||
queue->update();
|
queue->update();
|
||||||
}
|
}
|
||||||
|
|
||||||
void BattleControlPanel::activate()
|
void BattleWindow::activate()
|
||||||
{
|
{
|
||||||
CIntObject::activate();
|
CIntObject::activate();
|
||||||
LOCPLINT->cingconsole->activate();
|
LOCPLINT->cingconsole->activate();
|
||||||
}
|
}
|
||||||
|
|
||||||
void BattleControlPanel::deactivate()
|
void BattleWindow::deactivate()
|
||||||
{
|
{
|
||||||
CIntObject::deactivate();
|
CIntObject::deactivate();
|
||||||
LOCPLINT->cingconsole->deactivate();
|
LOCPLINT->cingconsole->deactivate();
|
||||||
}
|
}
|
||||||
|
|
||||||
void BattleControlPanel::keyPressed(const SDL_KeyboardEvent & key)
|
void BattleWindow::keyPressed(const SDL_KeyboardEvent & key)
|
||||||
{
|
{
|
||||||
if(key.keysym.sym == SDLK_q && key.state == SDL_PRESSED)
|
if(key.keysym.sym == SDLK_q && key.state == SDL_PRESSED)
|
||||||
{
|
{
|
||||||
@@ -167,13 +167,13 @@ void BattleControlPanel::keyPressed(const SDL_KeyboardEvent & key)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void BattleControlPanel::clickRight(tribool down, bool previousState)
|
void BattleWindow::clickRight(tribool down, bool previousState)
|
||||||
{
|
{
|
||||||
if (!down)
|
if (!down)
|
||||||
owner.actionsController->endCastingSpell();
|
owner.actionsController->endCastingSpell();
|
||||||
}
|
}
|
||||||
|
|
||||||
void BattleControlPanel::tacticPhaseStarted()
|
void BattleWindow::tacticPhaseStarted()
|
||||||
{
|
{
|
||||||
menuBattle->disable();
|
menuBattle->disable();
|
||||||
console->disable();
|
console->disable();
|
||||||
@@ -183,7 +183,7 @@ void BattleControlPanel::tacticPhaseStarted()
|
|||||||
btactEnd->enable();
|
btactEnd->enable();
|
||||||
}
|
}
|
||||||
|
|
||||||
void BattleControlPanel::tacticPhaseEnded()
|
void BattleWindow::tacticPhaseEnded()
|
||||||
{
|
{
|
||||||
menuBattle->enable();
|
menuBattle->enable();
|
||||||
console->enable();
|
console->enable();
|
||||||
@@ -193,7 +193,7 @@ void BattleControlPanel::tacticPhaseEnded()
|
|||||||
btactEnd->disable();
|
btactEnd->disable();
|
||||||
}
|
}
|
||||||
|
|
||||||
void BattleControlPanel::bOptionsf()
|
void BattleWindow::bOptionsf()
|
||||||
{
|
{
|
||||||
if (owner.actionsController->spellcastingModeActive())
|
if (owner.actionsController->spellcastingModeActive())
|
||||||
return;
|
return;
|
||||||
@@ -203,7 +203,7 @@ void BattleControlPanel::bOptionsf()
|
|||||||
GH.pushIntT<BattleOptionsWindow>(owner);
|
GH.pushIntT<BattleOptionsWindow>(owner);
|
||||||
}
|
}
|
||||||
|
|
||||||
void BattleControlPanel::bSurrenderf()
|
void BattleWindow::bSurrenderf()
|
||||||
{
|
{
|
||||||
if (owner.actionsController->spellcastingModeActive())
|
if (owner.actionsController->spellcastingModeActive())
|
||||||
return;
|
return;
|
||||||
@@ -223,14 +223,14 @@ void BattleControlPanel::bSurrenderf()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void BattleControlPanel::bFleef()
|
void BattleWindow::bFleef()
|
||||||
{
|
{
|
||||||
if (owner.actionsController->spellcastingModeActive())
|
if (owner.actionsController->spellcastingModeActive())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if ( owner.curInt->cb->battleCanFlee() )
|
if ( owner.curInt->cb->battleCanFlee() )
|
||||||
{
|
{
|
||||||
CFunctionList<void()> ony = std::bind(&BattleControlPanel::reallyFlee,this);
|
CFunctionList<void()> ony = std::bind(&BattleWindow::reallyFlee,this);
|
||||||
owner.curInt->showYesNoDialog(CGI->generaltexth->allTexts[28], ony, nullptr); //Are you sure you want to retreat?
|
owner.curInt->showYesNoDialog(CGI->generaltexth->allTexts[28], ony, nullptr); //Are you sure you want to retreat?
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -252,13 +252,13 @@ void BattleControlPanel::bFleef()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void BattleControlPanel::reallyFlee()
|
void BattleWindow::reallyFlee()
|
||||||
{
|
{
|
||||||
owner.giveCommand(EActionType::RETREAT);
|
owner.giveCommand(EActionType::RETREAT);
|
||||||
CCS->curh->set(Cursor::Map::POINTER);
|
CCS->curh->set(Cursor::Map::POINTER);
|
||||||
}
|
}
|
||||||
|
|
||||||
void BattleControlPanel::reallySurrender()
|
void BattleWindow::reallySurrender()
|
||||||
{
|
{
|
||||||
if (owner.curInt->cb->getResourceAmount(Res::GOLD) < owner.curInt->cb->battleGetSurrenderCost())
|
if (owner.curInt->cb->getResourceAmount(Res::GOLD) < owner.curInt->cb->battleGetSurrenderCost())
|
||||||
{
|
{
|
||||||
@@ -271,7 +271,7 @@ void BattleControlPanel::reallySurrender()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void BattleControlPanel::bAutofightf()
|
void BattleWindow::bAutofightf()
|
||||||
{
|
{
|
||||||
if (owner.actionsController->spellcastingModeActive())
|
if (owner.actionsController->spellcastingModeActive())
|
||||||
return;
|
return;
|
||||||
@@ -298,7 +298,7 @@ void BattleControlPanel::bAutofightf()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void BattleControlPanel::bSpellf()
|
void BattleWindow::bSpellf()
|
||||||
{
|
{
|
||||||
if (owner.actionsController->spellcastingModeActive())
|
if (owner.actionsController->spellcastingModeActive())
|
||||||
return;
|
return;
|
||||||
@@ -340,7 +340,7 @@ void BattleControlPanel::bSpellf()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void BattleControlPanel::bWaitf()
|
void BattleWindow::bWaitf()
|
||||||
{
|
{
|
||||||
if (owner.actionsController->spellcastingModeActive())
|
if (owner.actionsController->spellcastingModeActive())
|
||||||
return;
|
return;
|
||||||
@@ -349,7 +349,7 @@ void BattleControlPanel::bWaitf()
|
|||||||
owner.giveCommand(EActionType::WAIT);
|
owner.giveCommand(EActionType::WAIT);
|
||||||
}
|
}
|
||||||
|
|
||||||
void BattleControlPanel::bDefencef()
|
void BattleWindow::bDefencef()
|
||||||
{
|
{
|
||||||
if (owner.actionsController->spellcastingModeActive())
|
if (owner.actionsController->spellcastingModeActive())
|
||||||
return;
|
return;
|
||||||
@@ -358,7 +358,7 @@ void BattleControlPanel::bDefencef()
|
|||||||
owner.giveCommand(EActionType::DEFEND);
|
owner.giveCommand(EActionType::DEFEND);
|
||||||
}
|
}
|
||||||
|
|
||||||
void BattleControlPanel::bConsoleUpf()
|
void BattleWindow::bConsoleUpf()
|
||||||
{
|
{
|
||||||
if (owner.actionsController->spellcastingModeActive())
|
if (owner.actionsController->spellcastingModeActive())
|
||||||
return;
|
return;
|
||||||
@@ -366,7 +366,7 @@ void BattleControlPanel::bConsoleUpf()
|
|||||||
console->scrollUp();
|
console->scrollUp();
|
||||||
}
|
}
|
||||||
|
|
||||||
void BattleControlPanel::bConsoleDownf()
|
void BattleWindow::bConsoleDownf()
|
||||||
{
|
{
|
||||||
if (owner.actionsController->spellcastingModeActive())
|
if (owner.actionsController->spellcastingModeActive())
|
||||||
return;
|
return;
|
||||||
@@ -374,17 +374,17 @@ void BattleControlPanel::bConsoleDownf()
|
|||||||
console->scrollDown();
|
console->scrollDown();
|
||||||
}
|
}
|
||||||
|
|
||||||
void BattleControlPanel::bTacticNextStack()
|
void BattleWindow::bTacticNextStack()
|
||||||
{
|
{
|
||||||
owner.tacticNextStack(nullptr);
|
owner.tacticNextStack(nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
void BattleControlPanel::bTacticPhaseEnd()
|
void BattleWindow::bTacticPhaseEnd()
|
||||||
{
|
{
|
||||||
owner.tacticPhaseEnd();
|
owner.tacticPhaseEnd();
|
||||||
}
|
}
|
||||||
|
|
||||||
void BattleControlPanel::blockUI(bool on)
|
void BattleWindow::blockUI(bool on)
|
||||||
{
|
{
|
||||||
bool canCastSpells = false;
|
bool canCastSpells = false;
|
||||||
auto hero = owner.curInt->cb->battleGetMyHero();
|
auto hero = owner.curInt->cb->battleGetMyHero();
|
||||||
@@ -424,7 +424,7 @@ void BattleControlPanel::blockUI(bool on)
|
|||||||
bDefence->block(on || owner.tacticsMode);
|
bDefence->block(on || owner.tacticsMode);
|
||||||
}
|
}
|
||||||
|
|
||||||
void BattleControlPanel::showAll(SDL_Surface *to)
|
void BattleWindow::showAll(SDL_Surface *to)
|
||||||
{
|
{
|
||||||
CIntObject::showAll(to);
|
CIntObject::showAll(to);
|
||||||
|
|
||||||
@@ -432,7 +432,7 @@ void BattleControlPanel::showAll(SDL_Surface *to)
|
|||||||
CMessage::drawBorder(owner.curInt->playerID, to, pos.w+28, pos.h+29, pos.x-14, pos.y-15);
|
CMessage::drawBorder(owner.curInt->playerID, to, pos.w+28, pos.h+29, pos.x-14, pos.y-15);
|
||||||
}
|
}
|
||||||
|
|
||||||
void BattleControlPanel::show(SDL_Surface *to)
|
void BattleWindow::show(SDL_Surface *to)
|
||||||
{
|
{
|
||||||
CIntObject::show(to);
|
CIntObject::show(to);
|
||||||
LOCPLINT->cingconsole->show(to);
|
LOCPLINT->cingconsole->show(to);
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* BattleControlPanel.h, part of VCMI engine
|
* BattleWindow.h, part of VCMI engine
|
||||||
*
|
*
|
||||||
* Authors: listed in file AUTHORS in main folder
|
* Authors: listed in file AUTHORS in main folder
|
||||||
*
|
*
|
||||||
@@ -23,7 +23,7 @@ class BattleRenderer;
|
|||||||
class StackQueue;
|
class StackQueue;
|
||||||
|
|
||||||
/// GUI object that handles functionality of panel at the bottom of combat screen
|
/// GUI object that handles functionality of panel at the bottom of combat screen
|
||||||
class BattleControlPanel : public WindowBase
|
class BattleWindow : public WindowBase
|
||||||
{
|
{
|
||||||
BattleInterface & owner;
|
BattleInterface & owner;
|
||||||
|
|
||||||
@@ -68,7 +68,7 @@ class BattleControlPanel : public WindowBase
|
|||||||
void showQueue();
|
void showQueue();
|
||||||
|
|
||||||
public:
|
public:
|
||||||
BattleControlPanel(BattleInterface & owner );
|
BattleWindow(BattleInterface & owner );
|
||||||
|
|
||||||
/// Closes window once battle finished (explicit declaration to move into public visibility)
|
/// Closes window once battle finished (explicit declaration to move into public visibility)
|
||||||
using WindowBase::close;
|
using WindowBase::close;
|
||||||
Reference in New Issue
Block a user