// MassBuilderSaveTool // Copyright (C) 2021 Guillaume Jacquemin // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . #include "../FontAwesome/IconsFontAwesome5.h" #include "SaveTool.h" void SaveTool::drawMassViewer() { if(!_currentMass || _currentMass->state() != Mass::State::Valid) { _currentMass = nullptr; _uiState = UiState::MainManager; return; } ImGui::SetNextWindowPos({0.0f, ImGui::GetItemRectSize().y}, ImGuiCond_Always); ImGui::SetNextWindowSize({Float(windowSize().x()), Float(windowSize().y()) - ImGui::GetItemRectSize().y}, ImGuiCond_Always); if(!ImGui::Begin("##MainWindow", nullptr, ImGuiWindowFlags_NoDecoration|ImGuiWindowFlags_NoMove| ImGuiWindowFlags_NoBackground|ImGuiWindowFlags_NoBringToFrontOnFocus)) { ImGui::End(); return; } ImGui::AlignTextToFramePadding(); ImGui::Text("Current M.A.S.S.: %s (%s)", _currentMass->name().c_str(), _currentMass->filename().c_str()); ImGui::SameLine(); if(ImGui::Button(ICON_FA_ARROW_LEFT " Back to main manager")) { _currentMass = nullptr; _uiState = UiState::MainManager; } ImGui::TextColored(ImColor(255, 255, 0), ICON_FA_EXCLAMATION_TRIANGLE); ImGui::SameLine(); ImGui::TextWrapped("WARNING: Colours in this app may look different from in-game colours, due to unavoidable differences in the rendering pipeline."); if(ImGui::BeginChild("##MassInfo", {ImGui::GetContentRegionAvailWidth() * 0.60f, 0.0f}, true, ImGuiWindowFlags_MenuBar)) { if(ImGui::BeginMenuBar()) { ImGui::TextUnformatted("M.A.S.S. Information"); ImGui::EndMenuBar(); } if(ImGui::BeginTabBar("##MassTabBar")) { if(ImGui::BeginTabItem("Frame")) { ImGui::EndTabItem(); } ImGui::EndTabBar(); } } ImGui::EndChild(); ImGui::SameLine(); if(ImGui::BeginChild("##GlobalStyles", {0.0f, 0.0f}, true, ImGuiWindowFlags_MenuBar)) { if(ImGui::BeginMenuBar()) { ImGui::TextUnformatted("Global styles"); ImGui::EndMenuBar(); } ImGui::TextUnformatted("Placeholder"); } ImGui::EndChild(); ImGui::End(); }