Mercurial > repos > blastem
comparison nuklear_ui/blastem_nuklear.c @ 2003:4c418ee9a9d8
Added Wii U controller image
author | Mike Pavone <pavone@retrodev.com> |
---|---|
date | Sun, 19 Jul 2020 18:10:40 -0700 |
parents | 81df9aa2de9b |
children | 9ca255be938d |
comparison
equal
deleted
inserted
replaced
2002:fc8fd89aeba9 | 2003:4c418ee9a9d8 |
---|---|
29 uint32_t *image_data; | 29 uint32_t *image_data; |
30 uint32_t width, height; | 30 uint32_t width, height; |
31 struct nk_image ui; | 31 struct nk_image ui; |
32 } ui_image; | 32 } ui_image; |
33 | 33 |
34 static ui_image **ui_images, *controller_360, *controller_ps4, *controller_ps4_6b; | 34 static ui_image **ui_images, *controller_360, *controller_ps4, *controller_ps4_6b, *controller_wiiu; |
35 static uint32_t num_ui_images, ui_image_storage; | 35 static uint32_t num_ui_images, ui_image_storage; |
36 | 36 |
37 typedef void (*view_fun)(struct nk_context *); | 37 typedef void (*view_fun)(struct nk_context *); |
38 static view_fun current_view; | 38 static view_fun current_view; |
39 static view_fun *previous_views; | 39 static view_fun *previous_views; |
979 { | 979 { |
980 if (info->variant != VARIANT_NORMAL) { | 980 if (info->variant != VARIANT_NORMAL) { |
981 return controller_ps4_6b; | 981 return controller_ps4_6b; |
982 } else if (info->type == TYPE_PSX) { | 982 } else if (info->type == TYPE_PSX) { |
983 return controller_ps4; | 983 return controller_ps4; |
984 } else if (info->type == TYPE_NINTENDO) { | |
985 return controller_wiiu; | |
984 } else { | 986 } else { |
985 return controller_360; | 987 return controller_360; |
986 } | 988 } |
987 } | 989 } |
988 | 990 |
2308 style_init(); | 2310 style_init(); |
2309 | 2311 |
2310 controller_360 = load_ui_image("images/360.png"); | 2312 controller_360 = load_ui_image("images/360.png"); |
2311 controller_ps4 = load_ui_image("images/ps4.png"); | 2313 controller_ps4 = load_ui_image("images/ps4.png"); |
2312 controller_ps4_6b = load_ui_image("images/ps4_6b.png"); | 2314 controller_ps4_6b = load_ui_image("images/ps4_6b.png"); |
2315 controller_wiiu = load_ui_image("images/wiiu.png"); | |
2313 | 2316 |
2314 texture_init(); | 2317 texture_init(); |
2315 | 2318 |
2316 if (file_loaded) { | 2319 if (file_loaded) { |
2317 current_view = view_play; | 2320 current_view = view_play; |