mirror of
https://github.com/vcmi/vcmi.git
synced 2025-07-03 00:46:55 +02:00
Various fixes. Subtitles for choosen hero/town/bonus in pregame. Fixed arrows behavior. Really fixed shortcuts. Fixed map scrolling. Fixed disappearing battle interface.
This commit is contained in:
@ -23,12 +23,15 @@ void KeyShortcut::keyPressed(const SDL_KeyboardEvent & key)
|
||||
{
|
||||
if(vstd::contains(assignedKeys,key.keysym.sym))
|
||||
{
|
||||
if(key.state == SDL_PRESSED) {
|
||||
clickLeft(true, pressedL);
|
||||
bool prev = pressedL;
|
||||
if(key.state == SDL_PRESSED)
|
||||
{
|
||||
pressedL = true;
|
||||
} else {
|
||||
clickLeft(false, pressedL);
|
||||
clickLeft(true, prev);
|
||||
} else
|
||||
{
|
||||
pressedL = false;
|
||||
clickLeft(false, prev);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -517,6 +520,22 @@ void CIntObject::printToLoc( const std::string & text, int x, int y, EFonts font
|
||||
CSDL_Ext::printTo(text, pos.x + x, pos.y + y, font, kolor, dst, refresh);
|
||||
}
|
||||
|
||||
void CIntObject::disable()
|
||||
{
|
||||
if(active)
|
||||
deactivate();
|
||||
|
||||
recActions = DISPOSE;
|
||||
}
|
||||
|
||||
void CIntObject::enable(bool activation)
|
||||
{
|
||||
if(!active && activation)
|
||||
activate();
|
||||
|
||||
recActions = 255;
|
||||
}
|
||||
|
||||
CPicture::CPicture( SDL_Surface *BG, int x, int y, bool Free )
|
||||
{
|
||||
bg = BG;
|
||||
|
Reference in New Issue
Block a user