mirror of
https://github.com/vcmi/vcmi.git
synced 2025-06-23 00:28:08 +02:00
* fixed crash when there was no hero available to hire for some player
* pregmae wont crash if user gives wrong resolution number * fixed 1024x600 screen resolution * selection dialog (eg. for treasure chests) can be closed with enter key * orientation of hero can't be change if movement points are exhausted * numerous improvements for Tavern window (hover tips for buttons, button will be inactive if player has 8 heroes or there is a visiting hero in the town garrison) * campfire, borderguard, bordergate, questguard will be accessible from the top * spells not known by hero can't be casted * restored checking mana points before casting spell
This commit is contained in:
6
CMT.cpp
6
CMT.cpp
@ -290,9 +290,13 @@ void processCommand(const std::string &message, CClient *&client)
|
||||
std::cin >> i;
|
||||
if(!i)
|
||||
return;
|
||||
else if(i < 0 || i >= conf.guiOptions.size())
|
||||
{
|
||||
tlog1 << "Invalid resolution ID! Not a number between 0 and " << conf.guiOptions.size() << ". No settings changed.\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
for(j=conf.guiOptions.begin(); j!=conf.guiOptions.end() && hlp++<i; j++);
|
||||
for(j=conf.guiOptions.begin(); j!=conf.guiOptions.end() && hlp++<i; j++); //move j to the i-th resolution info
|
||||
conf.cc.resx = j->first.first;
|
||||
conf.cc.resy = j->first.second;
|
||||
tlog0 << "Screen resolution set to " << conf.cc.resx << " x " << conf.cc.resy <<". It will be aplied when the game starts.\n";
|
||||
|
Reference in New Issue
Block a user