mirror of
https://github.com/libretro/RetroArch
synced 2025-04-01 22:20:31 +00:00
Merge pull request #1919 from jeapostrophe/master
(iOS) Menu animations
This commit is contained in:
commit
bab4760794
@ -650,7 +650,7 @@ static bool glui_load_image(void *data, menu_image_type_t type)
|
|||||||
|
|
||||||
static float glui_get_scroll(void)
|
static float glui_get_scroll(void)
|
||||||
{
|
{
|
||||||
int half;
|
int half = 0;
|
||||||
unsigned width, height;
|
unsigned width, height;
|
||||||
glui_handle_t *glui = NULL;
|
glui_handle_t *glui = NULL;
|
||||||
menu_handle_t *menu = menu_driver_get_ptr();
|
menu_handle_t *menu = menu_driver_get_ptr();
|
||||||
@ -662,7 +662,8 @@ static float glui_get_scroll(void)
|
|||||||
video_driver_get_size(&width, &height);
|
video_driver_get_size(&width, &height);
|
||||||
|
|
||||||
glui = (glui_handle_t*)menu->userdata;
|
glui = (glui_handle_t*)menu->userdata;
|
||||||
half = (height / glui->line_height) / 2;
|
if (glui->line_height)
|
||||||
|
half = (height / glui->line_height) / 2;
|
||||||
|
|
||||||
if (nav->selection_ptr < (unsigned)half)
|
if (nav->selection_ptr < (unsigned)half)
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -630,7 +630,30 @@ didSelectRowAtIndexPath:(NSIndexPath *)indexPath
|
|||||||
- (void)reloadData
|
- (void)reloadData
|
||||||
{
|
{
|
||||||
[self willReloadData];
|
[self willReloadData];
|
||||||
[[self tableView] reloadData];
|
|
||||||
|
// Here are two options:
|
||||||
|
|
||||||
|
// Option 1. This is like how setting app works, but not exactly.
|
||||||
|
// There is a typedef for the 'withRowAnimation' that has lots of
|
||||||
|
// options, just Google UITableViewRowAnimation
|
||||||
|
|
||||||
|
[self.tableView reloadSections:[NSIndexSet indexSetWithIndex:0]
|
||||||
|
withRowAnimation:UITableViewRowAnimationAutomatic];
|
||||||
|
|
||||||
|
// Optione 2. This is a "bigger" transistion, but doesn't look as
|
||||||
|
// much like Settings. It has more options. Just Google
|
||||||
|
// UIViewAnimationOptionTransition
|
||||||
|
|
||||||
|
/*
|
||||||
|
[UIView transitionWithView:self.tableView
|
||||||
|
duration:0.35f
|
||||||
|
options:UIViewAnimationOptionTransitionCurlUp
|
||||||
|
animations:^(void)
|
||||||
|
{
|
||||||
|
[self.tableView reloadData];
|
||||||
|
}
|
||||||
|
completion: nil];
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user