Skip to content

Commit 7ad92eb

Browse files
committed
Fixed dogfight buttons sticking.
1 parent d25f1ff commit 7ad92eb

2 files changed

Lines changed: 20 additions & 20 deletions

File tree

src/Geoscape/DogfightState.cpp

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -340,26 +340,26 @@ DogfightState::DogfightState(Globe *globe, Craft *craft, Ufo *ufo) : _globe(glob
340340
_btnStandoff->copy(_window);
341341
_btnStandoff->setColor(Palette::blockOffset(5)+1);
342342
_btnStandoff->setGroup(&_mode);
343-
_btnStandoff->onMouseClick((ActionHandler)&DogfightState::btnStandoffClick);
343+
_btnStandoff->onMousePress((ActionHandler)&DogfightState::btnStandoffPress);
344344

345345
_btnCautious->copy(_window);
346346
_btnCautious->setColor(Palette::blockOffset(5)+1);
347347
_btnCautious->setGroup(&_mode);
348-
_btnCautious->onMouseClick((ActionHandler)&DogfightState::btnCautiousClick);
348+
_btnCautious->onMousePress((ActionHandler)&DogfightState::btnCautiousPress);
349349

350350
_btnStandard->copy(_window);
351351
_btnStandard->setColor(Palette::blockOffset(5)+1);
352352
_btnStandard->setGroup(&_mode);
353-
_btnStandard->onMouseClick((ActionHandler)&DogfightState::btnStandardClick);
353+
_btnStandard->onMousePress((ActionHandler)&DogfightState::btnStandardPress);
354354

355355
_btnAggressive->copy(_window);
356356
_btnAggressive->setColor(Palette::blockOffset(5)+1);
357357
_btnAggressive->setGroup(&_mode);
358-
_btnAggressive->onMouseClick((ActionHandler)&DogfightState::btnAggressiveClick);
358+
_btnAggressive->onMousePress((ActionHandler)&DogfightState::btnAggressivePress);
359359

360360
_btnDisengage->copy(_window);
361361
_btnDisengage->setColor(Palette::blockOffset(5)+1);
362-
_btnDisengage->onMouseClick((ActionHandler)&DogfightState::btnDisengageClick);
362+
_btnDisengage->onMousePress((ActionHandler)&DogfightState::btnDisengagePress);
363363
_btnDisengage->setGroup(&_mode);
364364

365365
_btnUfo->copy(_window);
@@ -1317,7 +1317,7 @@ void DogfightState::btnMinimizeClick(Action *)
13171317
* Switches to Standoff mode (maximum range).
13181318
* @param action Pointer to an action.
13191319
*/
1320-
void DogfightState::btnStandoffClick(Action *)
1320+
void DogfightState::btnStandoffPress(Action *)
13211321
{
13221322
if (!_ufo->isCrashed() && !_craft->isDestroyed() && !_ufoBreakingOff)
13231323
{
@@ -1331,7 +1331,7 @@ void DogfightState::btnStandoffClick(Action *)
13311331
* Switches to Cautious mode (maximum weapon range).
13321332
* @param action Pointer to an action.
13331333
*/
1334-
void DogfightState::btnCautiousClick(Action *)
1334+
void DogfightState::btnCautiousPress(Action *)
13351335
{
13361336
if (!_ufo->isCrashed() && !_craft->isDestroyed() && !_ufoBreakingOff)
13371337
{
@@ -1354,7 +1354,7 @@ void DogfightState::btnCautiousClick(Action *)
13541354
* Switches to Standard mode (minimum weapon range).
13551355
* @param action Pointer to an action.
13561356
*/
1357-
void DogfightState::btnStandardClick(Action *)
1357+
void DogfightState::btnStandardPress(Action *)
13581358
{
13591359
if (!_ufo->isCrashed() && !_craft->isDestroyed() && !_ufoBreakingOff)
13601360
{
@@ -1377,7 +1377,7 @@ void DogfightState::btnStandardClick(Action *)
13771377
* Switches to Aggressive mode (minimum range).
13781378
* @param action Pointer to an action.
13791379
*/
1380-
void DogfightState::btnAggressiveClick(Action *)
1380+
void DogfightState::btnAggressivePress(Action *)
13811381
{
13821382
if (!_ufo->isCrashed() && !_craft->isDestroyed() && !_ufoBreakingOff)
13831383
{
@@ -1400,7 +1400,7 @@ void DogfightState::btnAggressiveClick(Action *)
14001400
* Disengages from the UFO.
14011401
* @param action Pointer to an action.
14021402
*/
1403-
void DogfightState::btnDisengageClick(Action *)
1403+
void DogfightState::btnDisengagePress(Action *)
14041404
{
14051405
if (!_ufo->isCrashed() && !_craft->isDestroyed() && !_ufoBreakingOff)
14061406
{

src/Geoscape/DogfightState.h

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -93,16 +93,16 @@ class DogfightState : public State
9393
void setStatus(const std::string &status);
9494
/// Handler for clicking the Minimize button.
9595
void btnMinimizeClick(Action *action);
96-
/// Handler for clicking the Standoff button.
97-
void btnStandoffClick(Action *action);
98-
/// Handler for clicking the Cautious Attack button.
99-
void btnCautiousClick(Action *action);
100-
/// Handler for clicking the Standard Attack button.
101-
void btnStandardClick(Action *action);
102-
/// Handler for clicking the Aggressive Attack button.
103-
void btnAggressiveClick(Action *action);
104-
/// Handler for clicking the Disengage button.
105-
void btnDisengageClick(Action *action);
96+
/// Handler for pressing the Standoff button.
97+
void btnStandoffPress(Action *action);
98+
/// Handler for pressing the Cautious Attack button.
99+
void btnCautiousPress(Action *action);
100+
/// Handler for pressing the Standard Attack button.
101+
void btnStandardPress(Action *action);
102+
/// Handler for pressing the Aggressive Attack button.
103+
void btnAggressivePress(Action *action);
104+
/// Handler for pressing the Disengage button.
105+
void btnDisengagePress(Action *action);
106106
/// Handler for clicking the Ufo button.
107107
void btnUfoClick(Action *action);
108108
/// Handler for clicking the Preview graphic.

0 commit comments

Comments
 (0)