SaveTool: Update the M.A.S.S. viewer weapon screen.

This commit is contained in:
Guillaume Jacquemin 2023-10-29 10:48:31 +01:00
parent e634ef037d
commit f9aa4bc817
Signed by: williamjcm
SSH Key Fingerprint: SHA256:AYLOg+iTV0ElElnlu4vqM4edFazVdRiuQB0Y5LoKc4A
1 changed files with 4 additions and 6 deletions

View File

@ -28,7 +28,7 @@ SaveTool::drawWeapons() {
return;
}
const float footer_height_to_reserve = ImGui::GetStyle().ItemSpacing.y + ImGui::GetFrameHeightWithSpacing();
const float footer_height_to_reserve = ImGui::GetFrameHeightWithSpacing();
ImGui::BeginGroup();
@ -51,13 +51,11 @@ SaveTool::drawWeapons() {
ImGui::EndTable();
ImGui::Separator();
bool dirty = _meleeDirty || _shieldsDirty || _bShootersDirty || _eShootersDirty || _bLaunchersDirty || _eLaunchersDirty;
ImGui::BeginDisabled(!dirty);
if(drawUnsafeWidget([]{ return ImGui::Button(ICON_FA_SAVE " Save"); })) {
if(drawUnsafeWidget([]{ return ImGui::Button(ICON_FA_SAVE " Save order"); })) {
if(_meleeDirty) {
_modifiedBySaveTool = true;
if(!_currentMass->writeMeleeWeapons()) {
@ -158,6 +156,8 @@ SaveTool::drawWeapons() {
ImGui::EndGroup();
ImGui::SameLine();
ImGui::SeparatorEx(ImGuiSeparatorFlags_Vertical);
ImGui::SameLine();
if(!_currentWeapon) {
@ -176,8 +176,6 @@ SaveTool::drawWeapons() {
ImGui::EndChild();
ImGui::Separator();
if(drawUnsafeWidget([](){ return ImGui::Button(ICON_FA_SAVE " Save changes to weapon category"); })) {
_modifiedBySaveTool = true;
switch(_currentWeapon->type) {