MCPcopy Create free account
hub / github.com/danoon2/Boxedwine / createButton

Function createButton

source/ui/mainui.cpp:173–226  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

171}
172
173void createButton() {
174 appButtons.clear();
175 BString name;
176
177 if (GlobalSettings::hasIconsFont()) {
178 name += " ";
179 name += APP_LIST_ICON;
180 name += " ";
181 }
182 name += getTranslation(Msg::MAIN_BUTTON_APPS);
183 appButtons.push_back(AppButton(name, [](){
184 gotoView(VIEW_APPS);
185 }));
186 name = "";
187 if (GlobalSettings::hasIconsFont()) {
188 name += " ";
189 name += INSTALL_ICON;
190 name += " ";
191 }
192 name += getTranslation(Msg::MAIN_BUTTON_INSTALL);
193 appButtons.push_back(AppButton(name, [](){
194 gotoView(VIEW_INSTALL);
195 }));
196 name = "";
197 if (GlobalSettings::hasIconsFont()) {
198 name += " ";
199 name += CONTAINER_ICON;
200 name += " ";
201 }
202 name += getTranslation(Msg::MAIN_BUTTON_CONTAINERS);
203 appButtons.push_back(AppButton(name, [](){
204 gotoView(VIEW_CONTAINERS);
205 }));
206 name = "";
207 if (GlobalSettings::hasIconsFont()) {
208 name += " ";
209 name += OPTIONS_ICON;
210 name += " ";
211 }
212 name += getTranslation(Msg::MAIN_BUTTON_SETTINGS);
213 appButtons.push_back(AppButton(name, [](){
214 gotoView(VIEW_OPTIONS);
215 }));
216 name = "";
217 if (GlobalSettings::hasIconsFont()) {
218 name += " ";
219 name += QUESTION_ICON;
220 name += " ";
221 }
222 name += getTranslation(Msg::MAIN_BUTTON_HELP);
223 appButtons.push_back(AppButton(name, []() {
224 gotoView(VIEW_HELP);
225 }));
226}
227
228void loadApps() {
229 appListViewItems.clear();

Callers 1

uiShowFunction · 0.85

Calls 5

getTranslationFunction · 0.85
AppButtonClass · 0.85
gotoViewFunction · 0.85
clearMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected