mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-03-28 20:36:42 +00:00
TradeWindow: fixed coding style
Mentioned here: https://github.com/zinnschlag/openmw/pull/554
This commit is contained in:
parent
868916a9a2
commit
a3adcf752d
2 changed files with 9 additions and 6 deletions
|
@ -19,11 +19,11 @@
|
||||||
|
|
||||||
#include "inventorywindow.hpp"
|
#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
|
namespace MWGui
|
||||||
{
|
{
|
||||||
|
const float TradeWindow::sBalanceChangeInitialPause = 0.5;
|
||||||
|
const float TradeWindow::sBalanceChangeInterval = 0.1;
|
||||||
|
|
||||||
TradeWindow::TradeWindow(MWBase::WindowManager& parWindowManager) :
|
TradeWindow::TradeWindow(MWBase::WindowManager& parWindowManager) :
|
||||||
WindowBase("openmw_trade_window.layout", parWindowManager)
|
WindowBase("openmw_trade_window.layout", parWindowManager)
|
||||||
, ContainerBase(NULL) // no drag&drop
|
, ContainerBase(NULL) // no drag&drop
|
||||||
|
@ -157,7 +157,7 @@ namespace MWGui
|
||||||
|
|
||||||
mBalanceChangePause -= frameDuration;
|
mBalanceChangePause -= frameDuration;
|
||||||
if (mBalanceChangePause < 0.0) {
|
if (mBalanceChangePause < 0.0) {
|
||||||
mBalanceChangePause += BALANCE_CHANGE_INTERVAL;
|
mBalanceChangePause += sBalanceChangeInterval;
|
||||||
if (mBalanceButtonsState == BBS_Increase)
|
if (mBalanceButtonsState == BBS_Increase)
|
||||||
onIncreaseButtonTriggered();
|
onIncreaseButtonTriggered();
|
||||||
else if (mBalanceButtonsState == BBS_Decrease)
|
else if (mBalanceButtonsState == BBS_Decrease)
|
||||||
|
@ -296,14 +296,14 @@ namespace MWGui
|
||||||
void TradeWindow::onIncreaseButtonPressed(MyGUI::Widget* _sender, int _left, int _top, MyGUI::MouseButton _id)
|
void TradeWindow::onIncreaseButtonPressed(MyGUI::Widget* _sender, int _left, int _top, MyGUI::MouseButton _id)
|
||||||
{
|
{
|
||||||
mBalanceButtonsState = BBS_Increase;
|
mBalanceButtonsState = BBS_Increase;
|
||||||
mBalanceChangePause = BALANCE_CHANGE_INITIAL_PAUSE;
|
mBalanceChangePause = sBalanceChangeInitialPause;
|
||||||
onIncreaseButtonTriggered();
|
onIncreaseButtonTriggered();
|
||||||
}
|
}
|
||||||
|
|
||||||
void TradeWindow::onDecreaseButtonPressed(MyGUI::Widget* _sender, int _left, int _top, MyGUI::MouseButton _id)
|
void TradeWindow::onDecreaseButtonPressed(MyGUI::Widget* _sender, int _left, int _top, MyGUI::MouseButton _id)
|
||||||
{
|
{
|
||||||
mBalanceButtonsState = BBS_Decrease;
|
mBalanceButtonsState = BBS_Decrease;
|
||||||
mBalanceChangePause = BALANCE_CHANGE_INITIAL_PAUSE;
|
mBalanceChangePause = sBalanceChangeInitialPause;
|
||||||
onDecreaseButtonTriggered();
|
onDecreaseButtonTriggered();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -37,6 +37,9 @@ namespace MWGui
|
||||||
void onFrame(float frameDuration);
|
void onFrame(float frameDuration);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
static const float sBalanceChangeInitialPause; // in seconds
|
||||||
|
static const float sBalanceChangeInterval; // in seconds
|
||||||
|
|
||||||
MyGUI::Button* mFilterAll;
|
MyGUI::Button* mFilterAll;
|
||||||
MyGUI::Button* mFilterWeapon;
|
MyGUI::Button* mFilterWeapon;
|
||||||
MyGUI::Button* mFilterApparel;
|
MyGUI::Button* mFilterApparel;
|
||||||
|
|
Loading…
Reference in a new issue