MCPcopy Create free account
hub / github.com/dborth/fceugx / MenuSettingsFile

Function MenuSettingsFile

source/menu.cpp:4055–4281  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4053 ***************************************************************************/
4054
4055static int MenuSettingsFile()
4056{
4057 int menu = MENU_NONE;
4058 int ret;
4059 int i = 0;
4060 bool firstRun = true;
4061 OptionList options;
4062 sprintf(options.name[i++], "Load Device");
4063 sprintf(options.name[i++], "Save Device");
4064 sprintf(options.name[i++], "Load Folder");
4065 sprintf(options.name[i++], "Save Folder");
4066 sprintf(options.name[i++], "Cheats Folder");
4067 sprintf(options.name[i++], "Screenshots Folder");
4068 sprintf(options.name[i++], "Covers Folder");
4069 sprintf(options.name[i++], "Artwork Folder");
4070 sprintf(options.name[i++], "Auto Load");
4071 sprintf(options.name[i++], "Auto Save");
4072 sprintf(options.name[i++], "Append Auto to .SAV Files");
4073 options.length = i;
4074
4075 for(i=0; i < options.length; i++)
4076 options.value[i][0] = 0;
4077
4078 GuiText titleTxt("Settings - Saving & Loading", 26, (GXColor){255, 255, 255, 255});
4079 titleTxt.SetAlignment(ALIGN_LEFT, ALIGN_TOP);
4080 titleTxt.SetPosition(50,50);
4081
4082 GuiSound btnSoundOver(button_over_pcm, button_over_pcm_size, SOUND_PCM);
4083 GuiSound btnSoundClick(button_click_pcm, button_click_pcm_size, SOUND_PCM);
4084 GuiImageData btnOutline(button_long_png);
4085 GuiImageData btnOutlineOver(button_long_over_png);
4086
4087 GuiTrigger trigB;
4088 GuiTrigger trig1;
4089 trigB.SetButtonOnlyTrigger(-1, WPAD_BUTTON_B | WPAD_CLASSIC_BUTTON_B, PAD_BUTTON_B, WIIDRC_BUTTON_B);
4090 trig1.SetButtonOnlyTrigger(-1, WPAD_BUTTON_1, 0, 0);
4091
4092 GuiText backBtnTxt("Go Back", 22, (GXColor){0, 0, 0, 255});
4093 GuiImage backBtnImg(&btnOutline);
4094 GuiImage backBtnImgOver(&btnOutlineOver);
4095 GuiButton backBtn(btnOutline.GetWidth(), btnOutline.GetHeight());
4096 backBtn.SetAlignment(ALIGN_LEFT, ALIGN_BOTTOM);
4097 backBtn.SetPosition(90, -35);
4098 backBtn.SetLabel(&backBtnTxt);
4099 backBtn.SetImage(&backBtnImg);
4100 backBtn.SetImageOver(&backBtnImgOver);
4101 backBtn.SetSoundOver(&btnSoundOver);
4102 backBtn.SetSoundClick(&btnSoundClick);
4103 backBtn.SetTrigger(trigA);
4104 backBtn.SetTrigger(trig2);
4105 backBtn.SetTrigger(&trigB);
4106 backBtn.SetTrigger(&trig1);
4107 backBtn.SetEffectGrow();
4108
4109 GuiOptionBrowser optionBrowser(552, 248, &options);
4110 optionBrowser.SetPosition(0, 108);
4111 optionBrowser.SetAlignment(ALIGN_CENTRE, ALIGN_TOP);
4112 optionBrowser.SetCol2Position(215);

Callers 1

MainMenuFunction · 0.85

Calls 15

HaltGuiFunction · 0.85
ResumeGuiFunction · 0.85
OnScreenKeyboardFunction · 0.85
autoSaveMethodFunction · 0.85
autoLoadMethodFunction · 0.85
SetPositionMethod · 0.80
SetButtonOnlyTriggerMethod · 0.80
SetLabelMethod · 0.80
SetImageOverMethod · 0.80
SetSoundOverMethod · 0.80
SetSoundClickMethod · 0.80
SetTriggerMethod · 0.80

Tested by

no test coverage detected