Modifications in three files

This commit is contained in:
Tarun Samanta 2023-05-21 21:30:41 +05:30
parent 523a3c4450
commit 61ef6210d1
3 changed files with 7 additions and 8 deletions

View file

@ -953,7 +953,7 @@ void CEditor::DoToolbar(CUIRect ToolBar)
if(DoButton_Ex(&s_ProofButton, "Proof", m_ProofBorders, &Button, 0, "[ctrl+p] Toggles proof borders. These borders represent what a player maximum can see.", IGraphics::CORNER_L) ||
(m_Dialog == DIALOG_NONE && m_EditBoxActive == 0 && Input()->KeyPress(KEY_P) && ModPressed))
{
m_ProofBorders = !m_ProofBorders;
m_ProofBorders = PROOF_BORDER_OFF;
}
TB_Top.VSplitLeft(10.0f, &Button, &TB_Top);
@ -2764,7 +2764,7 @@ void CEditor::DoMapEditor(CUIRect View)
}
// menu proof selection
if(m_MenuProofBorders && !m_ShowPicker)
if(m_ProofBorders == PROOF_BORDER_MENU && !m_ShowPicker)
{
ResetMenuBackgroundPositions();
for(int i = 0; i < (int)m_vMenuBackgroundPositions.size(); i++)

View file

@ -796,8 +796,7 @@ public:
m_MouseDeltaWy = 0;
m_GuiActive = true;
m_ProofBorders = false;
m_MenuProofBorders = false;
m_ProofBorders = PROOF_BORDER_OFF;
m_CurrentMenuProofIndex = 0;
m_PreviewZoom = false;

View file

@ -2327,18 +2327,18 @@ CUI::EPopupMenuFunctionResult CEditor::PopupProofMode(void *pContext, CUIRect Vi
CUIRect Button;
View.HSplitTop(12.0f, &Button, &View);
static int s_ButtonIngame;
if(pEditor->DoButton_MenuItem(&s_ButtonIngame, "Ingame", !pEditor->m_MenuProofBorders, &Button, 0, "These borders represent what a player maximum can see."))
if(pEditor->DoButton_MenuItem(&s_ButtonIngame, "Ingame", !pEditor->m_ProofBorders == PROOF_BORDER_INGAME, &Button, 0, "These borders represent what a player maximum can see."))
{
pEditor->m_MenuProofBorders = false;
pEditor->m_ProofBorders = PROOF_BORDER_INGAME;
return CUI::POPUP_CLOSE_CURRENT;
}
View.HSplitTop(2.0f, nullptr, &View);
View.HSplitTop(12.0f, &Button, &View);
static int s_ButtonMenu;
if(pEditor->DoButton_MenuItem(&s_ButtonMenu, "Menu", pEditor->m_MenuProofBorders, &Button, 0, "These borders represent what will be shown in the menu."))
if(pEditor->DoButton_MenuItem(&s_ButtonMenu, "Menu", pEditor->m_ProofBorders == PROOF_BORDER_INGAME, &Button, 0, "These borders represent what will be shown in the menu."))
{
pEditor->m_MenuProofBorders = true;
pEditor->m_ProofBorders = PROOF_BORDER_INGAME;
return CUI::POPUP_CLOSE_CURRENT;
}