Prevent clicking on racer scroll buttons when hidden (#263)
* Prevent clicking on racer scroll buttons when hidden (#262) Fix a bug where racers could be scrolled in other view modes, messing up the screen. Signed-off-by: Artur Rojek <contact@artur-rojek.eu> Co-authored-by: Dethrace Engineering Department <78985374+dethrace-labs@users.noreply.github.com>
This commit is contained in:
parent
8070edc9ec
commit
f4eb9a8607
|
|
@ -1282,6 +1282,12 @@ int TryToMoveToArrows(int* pCurrent_choice, int* pCurrent_mode) {
|
|||
int UpOpponent(int* pCurrent_choice, int* pCurrent_mode) {
|
||||
LOG_TRACE("(%p, %p)", pCurrent_choice, pCurrent_mode);
|
||||
|
||||
#if defined(DETHRACE_FIX_BUGS)
|
||||
// fixes bug where racers could be scrolled in other race menu modes
|
||||
if (gProgram_state.view_type != eVT_Opponents) {
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
AddToFlicQueue(gStart_interface_spec->pushed_flics[5].flic_index,
|
||||
gStart_interface_spec->pushed_flics[5].x[gGraf_data_index],
|
||||
gStart_interface_spec->pushed_flics[5].y[gGraf_data_index],
|
||||
|
|
@ -1310,6 +1316,12 @@ int UpOpponent(int* pCurrent_choice, int* pCurrent_mode) {
|
|||
int DownOpponent(int* pCurrent_choice, int* pCurrent_mode) {
|
||||
LOG_TRACE("(%p, %p)", pCurrent_choice, pCurrent_mode);
|
||||
|
||||
#if defined(DETHRACE_FIX_BUGS)
|
||||
// fixes bug where racers could be scrolled in other race menu modes
|
||||
if (gProgram_state.view_type != eVT_Opponents) {
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
AddToFlicQueue(gStart_interface_spec->pushed_flics[6].flic_index,
|
||||
gStart_interface_spec->pushed_flics[6].x[gGraf_data_index],
|
||||
gStart_interface_spec->pushed_flics[6].y[gGraf_data_index],
|
||||
|
|
|
|||
Loading…
Reference in New Issue