1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-20 20:23:03 +02:00

Addec quick combat to system options window.

Compile fixes [I don't know why it has compiled for me before].
This commit is contained in:
Michał W. Urbańczyk 2013-06-23 07:54:33 +00:00
parent 4a0587d500
commit 2a471eeb1a
4 changed files with 21 additions and 5 deletions

View File

@ -3529,6 +3529,10 @@ CSystemOptionsWindow::CSystemOptionsWindow():
boost::bind(&CSystemOptionsWindow::toggleReminder, this, true), boost::bind(&CSystemOptionsWindow::toggleReminder, this, false),
std::map<int,std::string>(), CGI->generaltexth->zelp[361].second, false, "sysopchk.def", NULL, 246, 87, false);
quickCombat = new CHighlightableButton(
boost::bind(&CSystemOptionsWindow::toggleQuickCombat, this, true), boost::bind(&CSystemOptionsWindow::toggleQuickCombat, this, false),
std::map<int,std::string>(), CGI->generaltexth->zelp[362].second, false, "sysopchk.def", NULL, 246, 87+32, false);
newCreatureWin = new CHighlightableButton(
boost::bind(&CSystemOptionsWindow::toggleCreatureWin, this, true), boost::bind(&CSystemOptionsWindow::toggleCreatureWin, this, false),
std::map<int,std::string>(), cwHelp, false, "sysopchk.def", NULL, 246, 183, false);
@ -3538,6 +3542,7 @@ CSystemOptionsWindow::CSystemOptionsWindow():
std::map<int,std::string>(), fsHelp, false, "sysopchk.def", NULL, 246, 215, false);
showReminder->select(settings["adventure"]["heroReminder"].Bool());
quickCombat->select(settings["adventure"]["quickCombat"].Bool());
newCreatureWin->select(settings["general"]["classicCreatureWindow"].Bool());
fullscreen->select(settings["video"]["fullscreen"].Bool());
@ -3597,6 +3602,12 @@ void CSystemOptionsWindow::toggleReminder(bool on)
heroReminder->Bool() = on;
}
void CSystemOptionsWindow::toggleQuickCombat(bool on)
{
Settings quickCombat = settings.write["adventure"]["quickCombat"];
quickCombat->Bool() = on;
}
void CSystemOptionsWindow::toggleCreatureWin(bool on)
{
Settings classicCreatureWindow = settings.write["general"]["classicCreatureWindow"];

View File

@ -742,7 +742,7 @@ private:
//CHighlightableButton * showPath;
CHighlightableButton * showReminder;
//CHighlightableButton * quickCombat;
CHighlightableButton * quickCombat;
//CHighlightableButton * videoSubs;
CHighlightableButton * newCreatureWin;
CHighlightableButton * fullscreen;
@ -767,6 +767,7 @@ private:
//functions for checkboxes
void toggleReminder(bool on);
void toggleQuickCombat(bool on);
void toggleCreatureWin(bool on);
void toggleFullscreen(bool on);

View File

@ -34,7 +34,7 @@
#define CALL_IN_PRIVILAGED_INTS(function, ...) \
do \
{ \
BOOST_FOREACH(IGameEventsReceiver *ger, cl->privilagedGameEventReceivers) \
BOOST_FOREACH(auto &ger, cl->privilagedGameEventReceivers) \
ger->function(__VA_ARGS__); \
} while(0)
@ -66,7 +66,7 @@
#define BATTLE_INTERFACE_CALL_RECEIVERS(function,...) \
do \
{ \
BOOST_FOREACH(IBattleEventsReceiver *ber, cl->privilagedBattleEventReceivers)\
BOOST_FOREACH(auto & ber, cl->privilagedBattleEventReceivers)\
ber->function(__VA_ARGS__); \
} while(0)
@ -81,7 +81,7 @@
#define CALL_IN_ALL_INTERFACES(function, ...) \
do \
{ \
std::map<PlayerColor, CGameInterface*> ints = cl->playerint; \
auto ints = cl->playerint; \
for(auto i = ints.begin(); i != ints.end(); i++)\
CALL_ONLY_THAT_INTERFACE(i->first, function, __VA_ARGS__); \
} while(0)

View File

@ -71,7 +71,7 @@
"type" : "object",
"additionalProperties" : false,
"default": {},
"required" : [ "heroSpeed", "enemySpeed", "scrollSpeed", "heroReminder" ],
"required" : [ "heroSpeed", "enemySpeed", "scrollSpeed", "heroReminder", "quickCombat" ],
"properties" : {
"heroSpeed" : {
"type" : "number",
@ -88,6 +88,10 @@
"heroReminder" : {
"type" : "boolean",
"default" : true
},
"quickCombat" : {
"type" : "boolean",
"default" : false
}
}
},