disable envelope editor when the picker is shown

This commit is contained in:
oy 2011-04-16 19:00:28 +02:00
parent 246cbed786
commit bda0927a87
2 changed files with 5 additions and 8 deletions

View file

@ -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)
{ {

View file

@ -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);