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

Function askToDownloadDefaultWine

source/ui/utils/uihelper.cpp:97–114  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

95}
96
97void askToDownloadDefaultWine() {
98 Msg labelId = Msg::ERROR_NO_WINE;
99#ifdef BOXEDWINE_HIGHDPI
100 U32 scale = KNativeSystem::getDpiScale();
101 if (scale >= 1500 && !GlobalSettings::defaultFont) {
102 labelId = Msg::ERROR_NO_WINE_HIGH_DPI;
103 }
104#endif
105 new YesNoDlg(Msg::GENERIC_DLG_ERROR_TITLE, getTranslation(labelId), [](bool yes) {
106 if (yes) {
107 GlobalSettings::downloadFileSystem(GlobalSettings::getAvailableWineVersions().front(), [](bool success) {
108 gotoView(VIEW_INSTALL, B("Demo"));
109 });
110 } else {
111 gotoView(VIEW_OPTIONS, B("Wine"));
112 }
113 });
114}
115
116#include "../../../lib/imgui/imgui_internal.h"
117namespace ImGui {

Callers 1

uiShowFunction · 0.85

Calls 4

getTranslationFunction · 0.85
gotoViewFunction · 0.85
BFunction · 0.85
frontMethod · 0.80

Tested by

no test coverage detected