Fix editor popups a bit

This commit is contained in:
def 2016-05-14 15:16:52 +02:00
parent d6ca9dcb7b
commit 475df14134
2 changed files with 5 additions and 5 deletions

View file

@ -1196,7 +1196,7 @@ void CEditor::DoToolbar(CUIRect ToolBar)
if(DoButton_Ex(&s_SpeedupButton, "Speedup", (pS && pS->m_Speedup)?0:-1, &Button, 0, "Speedup", CUI::CORNER_ALL)) if(DoButton_Ex(&s_SpeedupButton, "Speedup", (pS && pS->m_Speedup)?0:-1, &Button, 0, "Speedup", CUI::CORNER_ALL))
{ {
static int s_SpeedupPopupID = 0; static int s_SpeedupPopupID = 0;
UiInvokePopupMenu(&s_SpeedupPopupID, 0, UI()->MouseX(), UI()->MouseY(), 120, 53, PopupSpeedup); UiInvokePopupMenu(&s_SpeedupPopupID, 0, UI()->MouseX(), UI()->MouseY(), 120, 48, PopupSpeedup);
} }
// do switch button // do switch button
TB_Bottom.VSplitLeft(5.0f, &Button, &TB_Bottom); TB_Bottom.VSplitLeft(5.0f, &Button, &TB_Bottom);
@ -1214,7 +1214,7 @@ void CEditor::DoToolbar(CUIRect ToolBar)
if(DoButton_Ex(&s_TuneButton, "Tune", (pS && pS->m_Tune)?0:-1, &Button, 0, "Tune", CUI::CORNER_ALL)) if(DoButton_Ex(&s_TuneButton, "Tune", (pS && pS->m_Tune)?0:-1, &Button, 0, "Tune", CUI::CORNER_ALL))
{ {
static int s_TunePopupID = 0; static int s_TunePopupID = 0;
UiInvokePopupMenu(&s_TunePopupID, 0, UI()->MouseX(), UI()->MouseY(), 120, 90, PopupTune); UiInvokePopupMenu(&s_TunePopupID, 0, UI()->MouseX(), UI()->MouseY(), 120, 23, PopupTune);
} }
} }

View file

@ -1470,14 +1470,14 @@ int CEditor::PopupSwitch(CEditor *pEditor, CUIRect View)
enum enum
{ {
PROP_SwitchNumber=0, PROP_SwitchDelay=0,
PROP_SwitchDelay, PROP_SwitchNumber,
NUM_PROPS, NUM_PROPS,
}; };
CProperty aProps[] = { CProperty aProps[] = {
{"Number", pEditor->m_SwitchNum, PROPTYPE_INT_STEP, 0, 255},
{"Delay", pEditor->m_SwitchDelay, PROPTYPE_INT_STEP, 0, 255}, {"Delay", pEditor->m_SwitchDelay, PROPTYPE_INT_STEP, 0, 255},
{"Number", pEditor->m_SwitchNum, PROPTYPE_INT_STEP, 0, 255},
{0}, {0},
}; };