1
0
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:
Michał W. Urbańczyk
2009-08-18 08:22:56 +00:00
parent a3b6bb4892
commit 3915b71869
8 changed files with 151 additions and 27 deletions

View File

@ -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;