mirror of
https://github.com/cyberboy666/r_e_c_u_r.git
synced 2025-12-16 13:20:13 +01:00
Show error when trying to fast-switch page that isn't there
This commit is contained in:
@@ -76,7 +76,10 @@ class NumpadInput(object):
|
|||||||
|
|
||||||
numbers = "jklmnopqrs"
|
numbers = "jklmnopqrs"
|
||||||
if self.data.is_display_held and key in numbers:
|
if self.data.is_display_held and key in numbers:
|
||||||
return self.actions.call_method_name("set_display_mode_%s"%self.data.get_display_modes_list()[numbers.index(key)])
|
if numbers.index(key) >= len(self.data.get_display_modes_list()):
|
||||||
|
self.message_handler.set_message('ERROR', 'No page %s to display!' % numbers.index(key))
|
||||||
|
return
|
||||||
|
self.actions.call_method_name("set_display_mode_%s"%self.data.get_display_modes_list()[numbers.index(key)])
|
||||||
|
|
||||||
print('the numpad action being called is {} (mode is {})'.format(this_mapping[mode][is_function], mode))
|
print('the numpad action being called is {} (mode is {})'.format(this_mapping[mode][is_function], mode))
|
||||||
if value != -1:
|
if value != -1:
|
||||||
|
|||||||
Reference in New Issue
Block a user