(ui) Style nits
This commit is contained in:
parent
0354ced675
commit
e5b7b83b3f
|
@ -274,13 +274,12 @@ static void RunActionSheet(const char* title, const struct string_list* items,
|
||||||
|
|
||||||
- (void)alertView:(UIAlertView*)alertView clickedButtonAtIndex:(NSInteger)buttonIndex
|
- (void)alertView:(UIAlertView*)alertView clickedButtonAtIndex:(NSInteger)buttonIndex
|
||||||
{
|
{
|
||||||
if (buttonIndex == alertView.firstOtherButtonIndex) {
|
if (buttonIndex == alertView.firstOtherButtonIndex)
|
||||||
menu_entry_bind_key_set(self.i, RETROK_UNKNOWN);
|
menu_entry_bind_key_set(self.i, RETROK_UNKNOWN);
|
||||||
} else if(buttonIndex == alertView.firstOtherButtonIndex + 1) {
|
else if(buttonIndex == alertView.firstOtherButtonIndex + 1)
|
||||||
menu_entry_bind_joykey_set(self.i, NO_BTN);
|
menu_entry_bind_joykey_set(self.i, NO_BTN);
|
||||||
} else if(buttonIndex == alertView.firstOtherButtonIndex + 2) {
|
else if(buttonIndex == alertView.firstOtherButtonIndex + 2)
|
||||||
menu_entry_bind_joyaxis_set(self.i, AXIS_NONE);
|
menu_entry_bind_joyaxis_set(self.i, AXIS_NONE);
|
||||||
}
|
|
||||||
|
|
||||||
[self finishWithClickedButton:true];
|
[self finishWithClickedButton:true];
|
||||||
}
|
}
|
||||||
|
@ -290,15 +289,14 @@ static void RunActionSheet(const char* title, const struct string_list* items,
|
||||||
int32_t value = 0;
|
int32_t value = 0;
|
||||||
int32_t idx = menu_entry_bind_index(self.i);
|
int32_t idx = menu_entry_bind_index(self.i);
|
||||||
|
|
||||||
if ((value = cocoa_input_find_any_key())) {
|
if ((value = cocoa_input_find_any_key()))
|
||||||
menu_entry_bind_key_set(self.i, input_keymaps_translate_keysym_to_rk(value));
|
menu_entry_bind_key_set(self.i, input_keymaps_translate_keysym_to_rk(value));
|
||||||
} else if ((value = cocoa_input_find_any_button(idx)) >= 0) {
|
else if ((value = cocoa_input_find_any_button(idx)) >= 0)
|
||||||
menu_entry_bind_joykey_set(self.i, value);
|
menu_entry_bind_joykey_set(self.i, value);
|
||||||
} else if ((value = cocoa_input_find_any_axis(idx))) {
|
else if ((value = cocoa_input_find_any_axis(idx)))
|
||||||
menu_entry_bind_joyaxis_set(self.i, (value > 0) ? AXIS_POS(value - 1) : AXIS_NEG(abs(value) - 1));
|
menu_entry_bind_joyaxis_set(self.i, (value > 0) ? AXIS_POS(value - 1) : AXIS_NEG(abs(value) - 1));
|
||||||
} else {
|
else
|
||||||
return;
|
return;
|
||||||
}
|
|
||||||
|
|
||||||
[self finishWithClickedButton:false];
|
[self finishWithClickedButton:false];
|
||||||
}
|
}
|
||||||
|
@ -496,10 +494,9 @@ replacementString:(NSString *)string
|
||||||
[super initialize:main idx:i];
|
[super initialize:main idx:i];
|
||||||
self.formatter = [RANumberFormatter new];
|
self.formatter = [RANumberFormatter new];
|
||||||
|
|
||||||
if (menu_entry_num_has_range(self.i)) {
|
if (menu_entry_num_has_range(self.i))
|
||||||
[self.formatter setRangeFrom:BOXFLOAT(menu_entry_num_min(self.i))
|
[self.formatter setRangeFrom:BOXFLOAT(menu_entry_num_min(self.i))
|
||||||
To:BOXFLOAT(menu_entry_num_max(self.i))];
|
To:BOXFLOAT(menu_entry_num_max(self.i))];
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
|
|
@ -190,9 +190,8 @@ enum
|
||||||
* but is bad for business with events. */
|
* but is bad for business with events. */
|
||||||
static double last_time_stamp;
|
static double last_time_stamp;
|
||||||
|
|
||||||
if (last_time_stamp == event.timestamp) {
|
if (last_time_stamp == event.timestamp)
|
||||||
return [super handleKeyUIEvent:event];
|
return [super handleKeyUIEvent:event];
|
||||||
}
|
|
||||||
|
|
||||||
last_time_stamp = event.timestamp;
|
last_time_stamp = event.timestamp;
|
||||||
|
|
||||||
|
@ -495,16 +494,20 @@ enum
|
||||||
|
|
||||||
- (void)mainMenuPushPop: (bool)pushp
|
- (void)mainMenuPushPop: (bool)pushp
|
||||||
{
|
{
|
||||||
if ( pushp ) {
|
if ( pushp )
|
||||||
|
{
|
||||||
self.menu_count++;
|
self.menu_count++;
|
||||||
RAMenuBase* next_menu = [RAMainMenu new];
|
RAMenuBase* next_menu = [RAMainMenu new];
|
||||||
next_menu.last_menu = self.mainmenu;
|
next_menu.last_menu = self.mainmenu;
|
||||||
self.mainmenu = next_menu;
|
self.mainmenu = next_menu;
|
||||||
[self pushViewController:self.mainmenu animated:YES];
|
[self pushViewController:self.mainmenu animated:YES];
|
||||||
} else {
|
}
|
||||||
if ( self.menu_count == 0 ) {
|
else
|
||||||
|
{
|
||||||
|
if ( self.menu_count == 0 )
|
||||||
[self.mainmenu reloadData];
|
[self.mainmenu reloadData];
|
||||||
} else {
|
else
|
||||||
|
{
|
||||||
self.menu_count--;
|
self.menu_count--;
|
||||||
|
|
||||||
[self popViewControllerAnimated:YES];
|
[self popViewControllerAnimated:YES];
|
||||||
|
@ -628,7 +631,6 @@ static void ui_companion_cocoatouch_notify_list_pushed(void *data,
|
||||||
{
|
{
|
||||||
RetroArch_iOS *ap = (RetroArch_iOS *)apple_platform;
|
RetroArch_iOS *ap = (RetroArch_iOS *)apple_platform;
|
||||||
bool pushp = false;
|
bool pushp = false;
|
||||||
|
|
||||||
size_t new_size = file_list_get_size( menu_list );
|
size_t new_size = file_list_get_size( menu_list );
|
||||||
|
|
||||||
/* FIXME workaround for the double call */
|
/* FIXME workaround for the double call */
|
||||||
|
@ -638,13 +640,13 @@ static void ui_companion_cocoatouch_notify_list_pushed(void *data,
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( old_size == new_size ) {
|
if ( old_size == new_size )
|
||||||
pushp = false;
|
pushp = false;
|
||||||
} else if ( old_size < new_size ) {
|
else if ( old_size < new_size )
|
||||||
pushp = true;
|
pushp = true;
|
||||||
} else if ( old_size > new_size ) {
|
else if ( old_size > new_size )
|
||||||
printf( "notify_list_pushed: old size should not be larger\n" );
|
printf( "notify_list_pushed: old size should not be larger\n" );
|
||||||
}
|
|
||||||
old_size = new_size;
|
old_size = new_size;
|
||||||
|
|
||||||
if (ap)
|
if (ap)
|
||||||
|
|
Loading…
Reference in New Issue