Contents |
CrystalSpace
Querying for a component
VirtualClock = object_reg.Get(iVirtualClock)
Checking a keyboard event
if ev.Name == self.KeyboardDown: cooked = csKeyEventHelper.GetCookedCode(ev) raw = csKeyEventHelper.GetRawCode(ev)
* cooked means modifiers are applied (shift+a == 'A') * raw is just the key (shift+a == 'a')
Checking time
elapsed = VirtualClock.GetElapsedTicks() absolute = VirtualClock.GetCurrentTicks()
elapsed is the time elapsed since last call absolute time elapsed since the start
