Clickable Icons
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Wargus |
Fix Released
|
Undecided
|
cybermind |
Bug Description
OK, so I've asked this on the stratagus forum, but I guess things don't move as fast there, so I will ask here.
I have managed to get the icons to animate properly so that when you click them the look as though they get depressed down. My problem is, that all the icons (except for the stop, and stand-ground icons) all react to the mouse click instantly, whereas in the original Warcraft 2, the icons didn't execute the action until after you had released the mouse button.
I skimmed through "buttons.cpp" and "buttons.h" to see if I could find anything that would help me to make the action happen after mouse button release. I found the variable:
void Button:
{
if (button == MouseInput::LEFT)
{
generateActi
}
}
A few lines below that I found this:
void Button:
{
if (button == MouseInput::LEFT && hasMouse())
{
}
}
I put the "generateAction();" variable in the mouseRelease code, but had no luck. I think this code affects the buttons, and not the icons...Is there an equivelent kind of thing for the icons?
All I want is for icons to behave as follows:
Mouse over icon > click icon > icon shows it's been pressed > release button > icon returns to default look > action is executed.
and this:
Mouse over icon > click icon > icon shows it's been pressed > move mouse off icon (with mouse button still pressed) > icon returns to default look > action is NOT executed.
Related branches
Changed in wargus: | |
status: | Fix Committed → Fix Released |
milestone: | none → 2.3 |
Fixed in rev.1718