| 122 | } |
| 123 | |
| 124 | void 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 | |
| 154 | void gotoView(int viewId, BString tab, BString param1) { |
| 155 | if (!currentView || currentView->saveChanges()) { |
no test coverage detected