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

Function uiDraw

source/ui/mainui.cpp:124–152  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

122}
123
124void uiDraw() {
125 ImGuiStyle& style = ImGui::GetStyle();
126 style.WindowRounding = 0;
127 ImGuiIO& io = ImGui::GetIO();
128 ImGui::SetNextWindowPos(ImVec2(0, 0));
129 ImGui::SetNextWindowSize(ImVec2(io.DisplaySize.x, io.DisplaySize.y));
130 ImGui::PushStyleColor(ImGuiCol_WindowBg, ImGui::GetColorU32(ImGuiCol_MenuBarBg));
131 ImGui::PushStyleVar(ImGuiStyleVar_WindowPadding, ImVec2(0.0f, 0.0f));
132 ImGui::Begin("mainWindow", nullptr, ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoScrollbar);
133 ImGui::PopStyleColor();
134 drawAppBar(appButtons, currentViewDeprecated, GlobalSettings::largeFontBold);
135 //ImGui::Separator();
136 ImVec2 size = ImGui::GetWindowContentRegionMax();
137 size.y -= ImGui::GetCursorPosY();
138 ImGui::PushStyleColor(ImGuiCol_ChildBg, ImGui::GetColorU32(ImGuiCol_WindowBg));
139 if (currentViewDeprecated == VIEW_OPTIONS || currentViewDeprecated == VIEW_INSTALL || currentViewDeprecated == VIEW_CONTAINERS || currentViewDeprecated == VIEW_HELP) {
140 currentView->run(size);
141 } else {
142 drawListView(B("Apps"), appListViewItems, size);
143 }
144 ImGui::PopStyleColor();
145
146 runFunctions(runOnMainFunctions);
147
148 BaseDlg::runDialogs();
149
150 ImGui::End();
151 ImGui::PopStyleVar(1);
152}
153
154void gotoView(int viewId, BString tab, BString param1) {
155 if (!currentView || currentView->saveChanges()) {

Callers 1

uiLoopFunction · 0.85

Calls 6

ImVec2Class · 0.85
drawAppBarFunction · 0.85
drawListViewFunction · 0.85
BFunction · 0.85
runFunctionsFunction · 0.85
runMethod · 0.45

Tested by

no test coverage detected