fix ctrl+g
This commit is contained in:
parent
d78278379b
commit
a4eed64709
|
@ -1,5 +1,4 @@
|
|||
ParticleSystem
|
||||
|
||||
AttractionAffector
|
||||
destination: 200 200
|
||||
acceleration: 64
|
||||
|
@ -11,32 +10,24 @@ ParticleSystem
|
|||
burstRate: 2
|
||||
burstCount: 1
|
||||
delay: 0.5
|
||||
|
||||
particle-duration: 9999
|
||||
particle-position-radius: 0
|
||||
|
||||
particle-velocity: 64
|
||||
particle-velocity: 32
|
||||
particle-velocity-angle: 0
|
||||
|
||||
particle-acceleration: 0
|
||||
|
||||
particle-size: 32 32
|
||||
particle-color: #33ff33ff
|
||||
particle-texture: circle2.png
|
||||
|
||||
|
||||
Emitter
|
||||
position: 200 200
|
||||
burstRate: 9999999999
|
||||
burstCount: 1
|
||||
|
||||
particle-duration: 9999999
|
||||
particle-position-radius: 0
|
||||
|
||||
particle-velocity: 0
|
||||
particle-velocity-angle: 0
|
||||
|
||||
particle-acceleration: 0
|
||||
|
||||
particle-size: 32 32
|
||||
particle-color: #33ff33ff
|
||||
particle-texture: circle2.png
|
||||
|
|
|
@ -48,5 +48,20 @@ private:
|
|||
|
||||
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
|
||||
|
||||
|
|
|
@ -562,6 +562,7 @@ void X11Window::poll()
|
|||
int len;
|
||||
|
||||
m_inputEvent.keyboardModifiers = 0;
|
||||
m_inputEvent.keyText = "";
|
||||
if(event.xkey.state & ControlMask)
|
||||
m_inputEvent.keyboardModifiers |= Fw::KeyboardCtrlModifier;
|
||||
if(event.xkey.state & ShiftMask)
|
||||
|
@ -590,6 +591,11 @@ void X11Window::poll()
|
|||
//logDebug("char: ", buf[0], " code: ", (uint)buf[0]);
|
||||
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())
|
||||
|
|
|
@ -427,7 +427,7 @@ bool UILineEdit::onKeyPress(uchar keyCode, std::string keyText, int keyboardModi
|
|||
if(UIWidgetPtr parent = getParent())
|
||||
parent->focusNextChild(Fw::TabFocusReason);
|
||||
}
|
||||
} else if(!keyText.empty())
|
||||
} else if(!keyText.empty() && (keyboardModifiers == Fw::KeyboardNoModifier || keyboardModifiers == Fw::KeyboardShiftModifier))
|
||||
appendText(keyText);
|
||||
else
|
||||
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);
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue