add ppbr export dialog, implement text input focus
This commit is contained in:
@@ -12,10 +12,16 @@ Node* NodeTextInput::clone_instantiate() const
|
||||
void NodeTextInput::on_tick(float dt)
|
||||
{
|
||||
timer += dt;
|
||||
|
||||
bool focus = root()->current_key_capture.get() == this;
|
||||
if (m_cursor && !focus)
|
||||
m_cursor->m_display = false;
|
||||
m_thinkness = focus;
|
||||
|
||||
if (timer > 1.0)
|
||||
{
|
||||
timer = 0;
|
||||
if (m_cursor)
|
||||
if (focus && m_cursor)
|
||||
{
|
||||
m_cursor->m_display = !m_cursor->m_display;
|
||||
app_redraw();
|
||||
@@ -67,6 +73,9 @@ kEventResult NodeTextInput::handle_event(Event* e)
|
||||
break;
|
||||
case kEventType::MouseUpL:
|
||||
key_capture();
|
||||
timer = 0;
|
||||
if (m_cursor)
|
||||
m_cursor->m_display = true;
|
||||
break;
|
||||
case kEventType::KeyDown:
|
||||
//switch (ke->m_key)
|
||||
|
||||
Reference in New Issue
Block a user