fix ctrl+g
This commit is contained in:
parent
d78278379b
commit
a4eed64709
|
@ -1,5 +1,4 @@
|
||||||
ParticleSystem
|
ParticleSystem
|
||||||
|
|
||||||
AttractionAffector
|
AttractionAffector
|
||||||
destination: 200 200
|
destination: 200 200
|
||||||
acceleration: 64
|
acceleration: 64
|
||||||
|
@ -11,32 +10,24 @@ ParticleSystem
|
||||||
burstRate: 2
|
burstRate: 2
|
||||||
burstCount: 1
|
burstCount: 1
|
||||||
delay: 0.5
|
delay: 0.5
|
||||||
|
|
||||||
particle-duration: 9999
|
particle-duration: 9999
|
||||||
particle-position-radius: 0
|
particle-position-radius: 0
|
||||||
|
particle-velocity: 32
|
||||||
particle-velocity: 64
|
|
||||||
particle-velocity-angle: 0
|
particle-velocity-angle: 0
|
||||||
|
|
||||||
particle-acceleration: 0
|
particle-acceleration: 0
|
||||||
|
|
||||||
particle-size: 32 32
|
particle-size: 32 32
|
||||||
particle-color: #33ff33ff
|
particle-color: #33ff33ff
|
||||||
particle-texture: circle2.png
|
particle-texture: circle2.png
|
||||||
|
|
||||||
Emitter
|
Emitter
|
||||||
position: 200 200
|
position: 200 200
|
||||||
burstRate: 9999999999
|
burstRate: 9999999999
|
||||||
burstCount: 1
|
burstCount: 1
|
||||||
|
|
||||||
particle-duration: 9999999
|
particle-duration: 9999999
|
||||||
particle-position-radius: 0
|
particle-position-radius: 0
|
||||||
|
|
||||||
particle-velocity: 0
|
particle-velocity: 0
|
||||||
particle-velocity-angle: 0
|
particle-velocity-angle: 0
|
||||||
|
|
||||||
particle-acceleration: 0
|
particle-acceleration: 0
|
||||||
|
|
||||||
particle-size: 32 32
|
particle-size: 32 32
|
||||||
particle-color: #33ff33ff
|
particle-color: #33ff33ff
|
||||||
particle-texture: circle2.png
|
particle-texture: circle2.png
|
||||||
|
|
|
@ -48,5 +48,20 @@ private:
|
||||||
|
|
||||||
extern Clock g_clock;
|
extern Clock g_clock;
|
||||||
|
|
||||||
|
class Timer
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
Timer() { restart(); }
|
||||||
|
|
||||||
|
void restart() { m_startTicks = g_clock.ticks(); }
|
||||||
|
|
||||||
|
ticks_t startTicks() { return m_startTicks; }
|
||||||
|
ticks_t ticksElapsed() { return g_clock.ticks() - m_startTicks; }
|
||||||
|
double timeElapsed() { return ticksElapsed()/1000.0; }
|
||||||
|
|
||||||
|
private:
|
||||||
|
ticks_t m_startTicks;
|
||||||
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -562,6 +562,7 @@ void X11Window::poll()
|
||||||
int len;
|
int len;
|
||||||
|
|
||||||
m_inputEvent.keyboardModifiers = 0;
|
m_inputEvent.keyboardModifiers = 0;
|
||||||
|
m_inputEvent.keyText = "";
|
||||||
if(event.xkey.state & ControlMask)
|
if(event.xkey.state & ControlMask)
|
||||||
m_inputEvent.keyboardModifiers |= Fw::KeyboardCtrlModifier;
|
m_inputEvent.keyboardModifiers |= Fw::KeyboardCtrlModifier;
|
||||||
if(event.xkey.state & ShiftMask)
|
if(event.xkey.state & ShiftMask)
|
||||||
|
@ -590,6 +591,11 @@ void X11Window::poll()
|
||||||
//logDebug("char: ", buf[0], " code: ", (uint)buf[0]);
|
//logDebug("char: ", buf[0], " code: ", (uint)buf[0]);
|
||||||
m_inputEvent.keyText = buf;
|
m_inputEvent.keyText = buf;
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
len = XLookupString(&event.xkey, buf, sizeof(buf), &keysym, 0);
|
||||||
|
|
||||||
|
if(len > 0)
|
||||||
|
m_inputEvent.keyText = buf;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(m_keyMap.find(keysym) != m_keyMap.end())
|
if(m_keyMap.find(keysym) != m_keyMap.end())
|
||||||
|
|
|
@ -427,7 +427,7 @@ bool UILineEdit::onKeyPress(uchar keyCode, std::string keyText, int keyboardModi
|
||||||
if(UIWidgetPtr parent = getParent())
|
if(UIWidgetPtr parent = getParent())
|
||||||
parent->focusNextChild(Fw::TabFocusReason);
|
parent->focusNextChild(Fw::TabFocusReason);
|
||||||
}
|
}
|
||||||
} else if(!keyText.empty())
|
} else if(!keyText.empty() && (keyboardModifiers == Fw::KeyboardNoModifier || keyboardModifiers == Fw::KeyboardShiftModifier))
|
||||||
appendText(keyText);
|
appendText(keyText);
|
||||||
else
|
else
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -100,7 +100,7 @@ bool UIGame::onKeyPress(uchar keyCode, std::string keyText, int keyboardModifier
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!keyText.empty()) {
|
if(!keyText.empty() && (keyboardModifiers == Fw::KeyboardNoModifier || keyboardModifiers == Fw::KeyboardShiftModifier)) {
|
||||||
chatLineEdit->appendText(keyText);
|
chatLineEdit->appendText(keyText);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue