Skip to content
Permalink
Browse files
gui: move game settings into a submenu - game menu
  • Loading branch information
KrahJohlito committed Oct 18, 2019
1 parent 4ee8fcd commit deb2b0aa877d2000c79541e2bfc429a3d75c27f2
Showing with 1,287 additions and 1,066 deletions.
  1. +1 −1 Makefile
  2. +2 −10 include/dialogs.h
  3. +2 −5 include/gui.h
  4. +19 −0 include/guigame.h
  5. +3 −0 include/lang.h
  6. +3 −0 include/menusys.h
  7. +6 −3 lng/lang_English.lng
  8. +144 −156 src/dialogs.c
  9. +4 −878 src/gui.c
  10. +935 −0 src/guigame.c
  11. +5 −7 src/lang.c
  12. +155 −0 src/menusys.c
  13. +8 −6 src/opl.c
@@ -57,7 +57,7 @@ OPL_VERSION = $(VERSION).$(SUBVERSION).$(PATCHLEVEL).$(REVISION)$(if $(EXTRAVERS

FRONTEND_OBJS = pad.o fntsys.o renderman.o menusys.o OSDHistory.o system.o lang.o config.o hdd.o dialogs.o \
dia.o ioman.o texcache.o themes.o supportbase.o usbsupport.o ethsupport.o hddsupport.o \
appsupport.o gui.o textures.o opl.o atlas.o nbns.o httpclient.o gsm.o cheatman.o sound.o ps2cnf.o
appsupport.o gui.o guigame.o textures.o opl.o atlas.o nbns.o httpclient.o gsm.o cheatman.o sound.o ps2cnf.o

GFX_OBJS = usb_icon.o hdd_icon.o eth_icon.o app_icon.o \
cross_icon.o triangle_icon.o circle_icon.o square_icon.o select_icon.o start_icon.o \
@@ -102,13 +102,8 @@ enum UI_ITEMS {

COMPAT_DMA = 100,
COMPAT_ALTSTARTUP,
COMPAT_GAME,
COMPAT_GAMEID,
COMPAT_SAVE,
COMPAT_STATUS,
COMPAT_DL_DEFAULTS,
COMPAT_TEST,
COMPAT_REMOVE,

COMPAT_LOADFROMDISC_ID,

@@ -167,8 +162,6 @@ enum UI_ITEMS {
};

#define COMPAT_NOEXIT 0x70000000
#define COMPAT_GSMCONFIG (GSMCFG_GSCONFIG | COMPAT_NOEXIT)
#define COMPAT_CHEATCONFIG (CHTCFG_CHEATCFG | COMPAT_NOEXIT)
#define COMPAT_LOADFROMDISC (COMPAT_LOADFROMDISC_ID | COMPAT_NOEXIT)

#define COMPAT_VMC1_ACTION (COMPAT_VMC1_ACTION_ID | COMPAT_NOEXIT)
@@ -177,16 +170,15 @@ enum UI_ITEMS {
#define COMPAT_VMC2_DEFINE (COMPAT_VMC2_DEFINE_ID | COMPAT_NOEXIT)

#ifdef PADEMU
#define COMPAT_PADEMUCONFIG (PADCFG_PADEMU_CONFIG | COMPAT_NOEXIT)

extern struct UIItem diaPadEmuConfig[];
extern struct UIItem diaPadEmuInfo[];
#endif

extern struct UIItem diaNetConfig[];
extern struct UIItem diaCompatConfig[];
extern struct UIItem diaUIConfig[];
extern struct UIItem diaAudioConfig[];
extern struct UIItem diaCompatConfig[];
extern struct UIItem diaVMCConfig[];
extern struct UIItem diaGSConfig[];
extern struct UIItem diaCheatConfig[];

@@ -56,6 +56,7 @@ int guiFrameId;
#define GUI_SCREEN_MAIN 0
#define GUI_SCREEN_MENU 1
#define GUI_SCREEN_INFO 2
#define GUI_SCREEN_GAME_MENU 3

void guiSwitchScreen(int target);

@@ -108,7 +109,6 @@ struct gui_update_t *guiOpCreate(gui_op_type_t type);
/** For completeness, the deffered operations are destroyed automatically */
void guiDestroyOp(struct gui_update_t *op);

int guiShowCompatConfig(int id, item_list_t *support, config_set_t *configSet);
int guiShowKeyboard(char *value, int maxLength);
int guiMsgBox(const char *text, int addAccept, struct UIItem *ui);

@@ -119,6 +119,7 @@ void guiDrawBGPlasma();
int guiDrawIconAndText(int iconId, int textId, int font, int x, int y, u64 color);

void guiShowNetCompatUpdate(void);
void guiShowNetCompatUpdateSingle(int id, item_list_t *support, config_set_t *configSet);
void guiShowAbout();
void guiShowConfig();
void guiShowUIConfig();
@@ -142,10 +143,6 @@ void guiHandleDeferedIO(int *ptr, const unsigned char *message, int type, void *
*/
void guiRenderTextScreen(const unsigned char *message);

int guiAltStartupNameHandler(char *text, int maxLen);

int guiVmcNameHandler(char *text, int maxLen);

void guiWarning(const char *text, int count);

int guiConfirmVideoMode(void);
@@ -0,0 +1,19 @@
#ifndef __GUIGAME_H
#define __GUIGAME_H

int guiGameAltStartupNameHandler(char *text, int maxLen);

char *gameConfigSource(void);

int guiGameVmcNameHandler(char *text, int maxLen);
void guiGameShowVMCMenu(int id, item_list_t *support);
void guiGameShowCompatConfig(int id, item_list_t *support, config_set_t *configSet);
void guiGameShowGSConfig(void);
void guiGameShowCheatConfig(void);
void guiGameShowPadEmuConfig(void);

void guiGameLoadConfig(item_list_t *support, config_set_t *configSet);
void guiGameSaveConfig(config_set_t *configSet, item_list_t *support);
void guiGameRemoveSettings(config_set_t *configSet);
void guiGameTestSettings(int id, item_list_t *support, config_set_t *configSet);
#endif
@@ -269,6 +269,9 @@ enum _STR_IDS {
_STR_CACHE_HDD_GAME_LIST,
_STR_ENABLE_NOTIFICATIONS,
_STR_NOTIFICATIONS,
_STR_GAME_MENU,
_STR_GAME_SETTINGS_SAVED,
_STR_GAME_SETTINGS_REMOVED,

LANG_STR_COUNT
};
@@ -81,6 +81,7 @@ typedef struct menu_list
void menuInit();
void menuEnd();
void menuReinitMainMenu(void);
void menuInitGameMenu(void);

void menuAppendItem(menu_item_t *item);

@@ -98,9 +99,11 @@ void menuSaveConfig();
void menuRenderMain();
void menuRenderMenu();
void menuRenderInfo();
void menuRenderGameMenu();
void menuHandleInputMain();
void menuHandleInputMenu();
void menuHandleInputInfo();
void menuHandleInputGameMenu();

// Sets the selected item if it is found in the menu list
void menuSetSelectedItem(menu_item_t *item);
@@ -126,7 +126,7 @@ Remember Last Played Game
Select Button
Error, the game is fragmented.
Error, could not run the item.
Test
Test Changes
Leave empty for GUEST auth.
Accurate Reads
Synchronous Mode
@@ -224,7 +224,7 @@ Update completed.
Update cancelled.
Download settings from the network?
Customized Settings
Downloaded defaults.
Downloaded Defaults
Auto start in %i s...
Auto Start
Value in second(s), 0 to disable auto start.
@@ -285,4 +285,7 @@ Boot Sound Volume
Confirm video mode change?
Cache Game List (HDD)
Enable Notifications
%s loaded from %s
%s loaded from %s
Game Menu
Game settings saved.
Game settings removed.

0 comments on commit deb2b0a

Please sign in to comment.