TradeWindow: fixed coding style

Mentioned here: https://github.com/zinnschlag/openmw/pull/554
actorid
Sergey Shambir 12 years ago committed by Marc Zinnschlag
parent 868916a9a2
commit a3adcf752d

@ -19,11 +19,11 @@
#include "inventorywindow.hpp"
static const float BALANCE_CHANGE_INITIAL_PAUSE = 0.5; // in seconds
static const float BALANCE_CHANGE_INTERVAL = 0.1; // in seconds
namespace MWGui
{
const float TradeWindow::sBalanceChangeInitialPause = 0.5;
const float TradeWindow::sBalanceChangeInterval = 0.1;
TradeWindow::TradeWindow(MWBase::WindowManager& parWindowManager) :
WindowBase("openmw_trade_window.layout", parWindowManager)
, ContainerBase(NULL) // no drag&drop
@ -157,7 +157,7 @@ namespace MWGui
mBalanceChangePause -= frameDuration;
if (mBalanceChangePause < 0.0) {
mBalanceChangePause += BALANCE_CHANGE_INTERVAL;
mBalanceChangePause += sBalanceChangeInterval;
if (mBalanceButtonsState == BBS_Increase)
onIncreaseButtonTriggered();
else if (mBalanceButtonsState == BBS_Decrease)
@ -296,14 +296,14 @@ namespace MWGui
void TradeWindow::onIncreaseButtonPressed(MyGUI::Widget* _sender, int _left, int _top, MyGUI::MouseButton _id)
{
mBalanceButtonsState = BBS_Increase;
mBalanceChangePause = BALANCE_CHANGE_INITIAL_PAUSE;
mBalanceChangePause = sBalanceChangeInitialPause;
onIncreaseButtonTriggered();
}
void TradeWindow::onDecreaseButtonPressed(MyGUI::Widget* _sender, int _left, int _top, MyGUI::MouseButton _id)
{
mBalanceButtonsState = BBS_Decrease;
mBalanceChangePause = BALANCE_CHANGE_INITIAL_PAUSE;
mBalanceChangePause = sBalanceChangeInitialPause;
onDecreaseButtonTriggered();
}

@ -37,6 +37,9 @@ namespace MWGui
void onFrame(float frameDuration);
protected:
static const float sBalanceChangeInitialPause; // in seconds
static const float sBalanceChangeInterval; // in seconds
MyGUI::Button* mFilterAll;
MyGUI::Button* mFilterWeapon;
MyGUI::Button* mFilterApparel;

Loading…
Cancel
Save