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

Fixed #50, #191, minor

This commit is contained in:
Michał W. Urbańczyk
2009-11-20 22:35:18 +00:00
parent adf3c9fd4b
commit 8f217c5cdf
7 changed files with 21 additions and 31 deletions

View File

@@ -126,11 +126,15 @@ void AdventureMapButton::clickLeft(tribool down, bool previousState)
{
if(blocked)
return;
if (down) {
if (down)
{
CGI->soundh->playSound(soundBase::button);
state=1;
} else
}
else
state=0;
show(screenBuf);
if (actOnDown && down)
{
@@ -201,25 +205,6 @@ void AdventureMapButton::hover (bool on)
}
}
//void AdventureMapButton::activate()
//{
//// if (active) return;
//// active=true;
// activateLClick();
// activateRClick();
// activateHover();
// activateKeys();
//}
//void AdventureMapButton::deactivate()
//{
//// if (!active) return;
//// active=false;
// deactivateLClick();
// deactivateRClick();
// deactivateHover();
// deactivateKeys();
//}
void AdventureMapButton::init(const CFunctionList<void()> &Callback, const std::map<int,std::string> &Name, const std::string &HelpBox, bool playerColoredButton, const std::string &defName, std::vector<std::string> * add, int x, int y, int key)
{
used = LCLICK | RCLICK | HOVER | KEYBOARD;