mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
disable envelope editor when the picker is shown
This commit is contained in:
parent
246cbed786
commit
bda0927a87
|
@ -1157,12 +1157,8 @@ void CEditor::DoQuadPoint(CQuad *pQuad, int QuadIndex, int V)
|
||||||
Graphics()->QuadsDraw(&QuadItem, 1);
|
Graphics()->QuadsDraw(&QuadItem, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CEditor::DoMapEditor(CUIRect View, CUIRect ToolBar)
|
void CEditor::DoMapEditor(CUIRect View, CUIRect ToolBar, bool ShowPicker)
|
||||||
{
|
{
|
||||||
//UI()->ClipEnable(&view);
|
|
||||||
|
|
||||||
bool ShowPicker = Input()->KeyPressed(KEY_SPACE) != 0 && m_Dialog == DIALOG_NONE;
|
|
||||||
|
|
||||||
// render all good stuff
|
// render all good stuff
|
||||||
if(!ShowPicker)
|
if(!ShowPicker)
|
||||||
{
|
{
|
||||||
|
@ -3050,6 +3046,7 @@ void CEditor::Render()
|
||||||
RenderBackground(View, ms_CheckerTexture, 32.0f, 1.0f);
|
RenderBackground(View, ms_CheckerTexture, 32.0f, 1.0f);
|
||||||
|
|
||||||
CUIRect MenuBar, CModeBar, ToolBar, StatusBar, EnvelopeEditor, ToolBox;
|
CUIRect MenuBar, CModeBar, ToolBar, StatusBar, EnvelopeEditor, ToolBox;
|
||||||
|
bool ShowPicker = Input()->KeyPressed(KEY_SPACE) != 0 && m_Dialog == DIALOG_NONE;
|
||||||
|
|
||||||
if(m_GuiActive)
|
if(m_GuiActive)
|
||||||
{
|
{
|
||||||
|
@ -3059,7 +3056,7 @@ void CEditor::Render()
|
||||||
View.VSplitLeft(100.0f, &ToolBox, &View);
|
View.VSplitLeft(100.0f, &ToolBox, &View);
|
||||||
View.HSplitBottom(16.0f, &View, &StatusBar);
|
View.HSplitBottom(16.0f, &View, &StatusBar);
|
||||||
|
|
||||||
if(m_ShowEnvelopeEditor)
|
if(m_ShowEnvelopeEditor && !ShowPicker)
|
||||||
{
|
{
|
||||||
float size = 125.0f;
|
float size = 125.0f;
|
||||||
if(m_ShowEnvelopeEditor == 2)
|
if(m_ShowEnvelopeEditor == 2)
|
||||||
|
@ -3072,7 +3069,7 @@ void CEditor::Render()
|
||||||
|
|
||||||
// a little hack for now
|
// a little hack for now
|
||||||
if(m_Mode == MODE_LAYERS)
|
if(m_Mode == MODE_LAYERS)
|
||||||
DoMapEditor(View, ToolBar);
|
DoMapEditor(View, ToolBar, ShowPicker);
|
||||||
|
|
||||||
if(m_GuiActive)
|
if(m_GuiActive)
|
||||||
{
|
{
|
||||||
|
|
|
@ -697,7 +697,7 @@ public:
|
||||||
vec4 ButtonColorMul(const void *pID);
|
vec4 ButtonColorMul(const void *pID);
|
||||||
|
|
||||||
void DoQuadPoint(CQuad *pQuad, int QuadIndex, int v);
|
void DoQuadPoint(CQuad *pQuad, int QuadIndex, int v);
|
||||||
void DoMapEditor(CUIRect View, CUIRect Toolbar);
|
void DoMapEditor(CUIRect View, CUIRect Toolbar, bool ShowPicker);
|
||||||
void DoToolbar(CUIRect Toolbar);
|
void DoToolbar(CUIRect Toolbar);
|
||||||
void DoQuad(CQuad *pQuad, int Index);
|
void DoQuad(CQuad *pQuad, int Index);
|
||||||
float UiDoScrollbarV(const void *pID, const CUIRect *pRect, float Current);
|
float UiDoScrollbarV(const void *pID, const CUIRect *pRect, float Current);
|
||||||
|
|
Loading…
Reference in a new issue