MCPcopy Create free account
hub / github.com/FlagBrew/PKSM / initButtons

Method initButtons

3ds/source/gui/screen/ConfigScreen.cpp:130–565  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

128}
129
130void ConfigScreen::initButtons()
131{
132 tabs.clear();
133 for (auto& tab : tabButtons)
134 {
135 tab.clear();
136 }
137
138 tabs.push_back(std::make_unique<ToggleButton>(
139 1, 2, 104, 17,
140 [&]()
141 {
142 currentTab = 0;
143 return false;
144 },
145 ui_sheet_res_null_idx, i18n::localize("LANGUAGE"), FONT_SIZE_11, COLOR_WHITE,
146 ui_sheet_emulated_button_tabs_3_unselected_idx, i18n::localize("LANGUAGE"), FONT_SIZE_11,
147 COLOR_BLACK, &tabs, false));
148 tabs.push_back(std::make_unique<ToggleButton>(
149 108, 2, 104, 17,
150 [&]()
151 {
152 currentTab = 1;
153 return false;
154 },
155 ui_sheet_res_null_idx, i18n::localize("DEFAULTS"), FONT_SIZE_11, COLOR_WHITE,
156 ui_sheet_emulated_button_tabs_3_unselected_idx, i18n::localize("DEFAULTS"), FONT_SIZE_11,
157 COLOR_BLACK, &tabs, false));
158 tabs.push_back(std::make_unique<ToggleButton>(
159 215, 2, 104, 17,
160 [&]()
161 {
162 currentTab = 2;
163 return false;
164 },
165 ui_sheet_res_null_idx, i18n::localize("MISC"), FONT_SIZE_11, COLOR_WHITE,
166 ui_sheet_emulated_button_tabs_3_unselected_idx, i18n::localize("MISC"), FONT_SIZE_11,
167 COLOR_BLACK, &tabs, false));
168 tabs[0]->setState(true);
169
170 // First column of language buttons
171 tabButtons[0].push_back(std::make_unique<ToggleButton>(
172 37, 52, 8, 8,
173 [this]()
174 {
175 Gui::clearText();
176 Configuration::getInstance().language(pksm::Language::JPN);
177 initButtons();
178 return false;
179 },
180 ui_sheet_emulated_button_lang_enabled_idx, "", 0.0f, COLOR_BLACK,
181 ui_sheet_emulated_button_lang_disabled_idx, "", 0.0f, COLOR_BLACK,
182 reinterpret_cast<std::vector<std::unique_ptr<ToggleButton>>*>(&tabButtons[0]), false));
183 tabButtons[0].push_back(std::make_unique<ToggleButton>(
184 37, 74, 8, 8,
185 [this]()
186 {
187 Gui::clearText();

Callers

nothing calls this directly

Calls 15

inputNumberFunction · 0.85
inputApiUrlFunction · 0.85
clearMethod · 0.80
setStateMethod · 0.80
languageMethod · 0.80
autoBackupMethod · 0.80
transferEditMethod · 0.80
writeFileSaveMethod · 0.80
useSaveInfoMethod · 0.80
useExtDataMethod · 0.80
randomMusicMethod · 0.80
showBackupsMethod · 0.80

Tested by

no test coverage detected