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:
parent
4a0587d500
commit
2a471eeb1a
@ -3529,6 +3529,10 @@ CSystemOptionsWindow::CSystemOptionsWindow():
|
|||||||
boost::bind(&CSystemOptionsWindow::toggleReminder, this, true), boost::bind(&CSystemOptionsWindow::toggleReminder, this, false),
|
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);
|
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(
|
newCreatureWin = new CHighlightableButton(
|
||||||
boost::bind(&CSystemOptionsWindow::toggleCreatureWin, this, true), boost::bind(&CSystemOptionsWindow::toggleCreatureWin, this, false),
|
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);
|
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);
|
std::map<int,std::string>(), fsHelp, false, "sysopchk.def", NULL, 246, 215, false);
|
||||||
|
|
||||||
showReminder->select(settings["adventure"]["heroReminder"].Bool());
|
showReminder->select(settings["adventure"]["heroReminder"].Bool());
|
||||||
|
quickCombat->select(settings["adventure"]["quickCombat"].Bool());
|
||||||
newCreatureWin->select(settings["general"]["classicCreatureWindow"].Bool());
|
newCreatureWin->select(settings["general"]["classicCreatureWindow"].Bool());
|
||||||
fullscreen->select(settings["video"]["fullscreen"].Bool());
|
fullscreen->select(settings["video"]["fullscreen"].Bool());
|
||||||
|
|
||||||
@ -3597,6 +3602,12 @@ void CSystemOptionsWindow::toggleReminder(bool on)
|
|||||||
heroReminder->Bool() = on;
|
heroReminder->Bool() = on;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CSystemOptionsWindow::toggleQuickCombat(bool on)
|
||||||
|
{
|
||||||
|
Settings quickCombat = settings.write["adventure"]["quickCombat"];
|
||||||
|
quickCombat->Bool() = on;
|
||||||
|
}
|
||||||
|
|
||||||
void CSystemOptionsWindow::toggleCreatureWin(bool on)
|
void CSystemOptionsWindow::toggleCreatureWin(bool on)
|
||||||
{
|
{
|
||||||
Settings classicCreatureWindow = settings.write["general"]["classicCreatureWindow"];
|
Settings classicCreatureWindow = settings.write["general"]["classicCreatureWindow"];
|
||||||
|
@ -742,7 +742,7 @@ private:
|
|||||||
|
|
||||||
//CHighlightableButton * showPath;
|
//CHighlightableButton * showPath;
|
||||||
CHighlightableButton * showReminder;
|
CHighlightableButton * showReminder;
|
||||||
//CHighlightableButton * quickCombat;
|
CHighlightableButton * quickCombat;
|
||||||
//CHighlightableButton * videoSubs;
|
//CHighlightableButton * videoSubs;
|
||||||
CHighlightableButton * newCreatureWin;
|
CHighlightableButton * newCreatureWin;
|
||||||
CHighlightableButton * fullscreen;
|
CHighlightableButton * fullscreen;
|
||||||
@ -767,6 +767,7 @@ private:
|
|||||||
|
|
||||||
//functions for checkboxes
|
//functions for checkboxes
|
||||||
void toggleReminder(bool on);
|
void toggleReminder(bool on);
|
||||||
|
void toggleQuickCombat(bool on);
|
||||||
void toggleCreatureWin(bool on);
|
void toggleCreatureWin(bool on);
|
||||||
void toggleFullscreen(bool on);
|
void toggleFullscreen(bool on);
|
||||||
|
|
||||||
|
@ -34,7 +34,7 @@
|
|||||||
#define CALL_IN_PRIVILAGED_INTS(function, ...) \
|
#define CALL_IN_PRIVILAGED_INTS(function, ...) \
|
||||||
do \
|
do \
|
||||||
{ \
|
{ \
|
||||||
BOOST_FOREACH(IGameEventsReceiver *ger, cl->privilagedGameEventReceivers) \
|
BOOST_FOREACH(auto &ger, cl->privilagedGameEventReceivers) \
|
||||||
ger->function(__VA_ARGS__); \
|
ger->function(__VA_ARGS__); \
|
||||||
} while(0)
|
} while(0)
|
||||||
|
|
||||||
@ -66,7 +66,7 @@
|
|||||||
#define BATTLE_INTERFACE_CALL_RECEIVERS(function,...) \
|
#define BATTLE_INTERFACE_CALL_RECEIVERS(function,...) \
|
||||||
do \
|
do \
|
||||||
{ \
|
{ \
|
||||||
BOOST_FOREACH(IBattleEventsReceiver *ber, cl->privilagedBattleEventReceivers)\
|
BOOST_FOREACH(auto & ber, cl->privilagedBattleEventReceivers)\
|
||||||
ber->function(__VA_ARGS__); \
|
ber->function(__VA_ARGS__); \
|
||||||
} while(0)
|
} while(0)
|
||||||
|
|
||||||
@ -81,7 +81,7 @@
|
|||||||
#define CALL_IN_ALL_INTERFACES(function, ...) \
|
#define CALL_IN_ALL_INTERFACES(function, ...) \
|
||||||
do \
|
do \
|
||||||
{ \
|
{ \
|
||||||
std::map<PlayerColor, CGameInterface*> ints = cl->playerint; \
|
auto ints = cl->playerint; \
|
||||||
for(auto i = ints.begin(); i != ints.end(); i++)\
|
for(auto i = ints.begin(); i != ints.end(); i++)\
|
||||||
CALL_ONLY_THAT_INTERFACE(i->first, function, __VA_ARGS__); \
|
CALL_ONLY_THAT_INTERFACE(i->first, function, __VA_ARGS__); \
|
||||||
} while(0)
|
} while(0)
|
||||||
|
@ -71,7 +71,7 @@
|
|||||||
"type" : "object",
|
"type" : "object",
|
||||||
"additionalProperties" : false,
|
"additionalProperties" : false,
|
||||||
"default": {},
|
"default": {},
|
||||||
"required" : [ "heroSpeed", "enemySpeed", "scrollSpeed", "heroReminder" ],
|
"required" : [ "heroSpeed", "enemySpeed", "scrollSpeed", "heroReminder", "quickCombat" ],
|
||||||
"properties" : {
|
"properties" : {
|
||||||
"heroSpeed" : {
|
"heroSpeed" : {
|
||||||
"type" : "number",
|
"type" : "number",
|
||||||
@ -88,6 +88,10 @@
|
|||||||
"heroReminder" : {
|
"heroReminder" : {
|
||||||
"type" : "boolean",
|
"type" : "boolean",
|
||||||
"default" : true
|
"default" : true
|
||||||
|
},
|
||||||
|
"quickCombat" : {
|
||||||
|
"type" : "boolean",
|
||||||
|
"default" : false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user