|
Kobold2D
2.0
Kobold2D API Reference (iOS version) for www.kobold2d.com developers
|
Enumerations | |
| enum | KKSwipeGestureDirection |
| enum | KKTouchPhase { KKTouchPhaseBegan, KKTouchPhaseMoved, KKTouchPhaseStationary, KKTouchPhaseEnded, KKTouchPhaseCancelled, KKTouchPhaseAny, KKTouchPhaseLifted } |
| enum | KKModifierFlag { KKModifierAlphaShiftKeyMask = 1 << 16 , KKModifierAlternateKeyMask = 1 << 19 , KKModifierNumericPadKeyMask = 1 << 21 , KKModifierFunctionKeyMask = 1 << 23, KKDeviceIndependentModifierFlagsMask = 0xffff0000UL } |
| enum | KKKeyCode { , KKKeyCode_ISO_Section = 0x0A, KKKeyCode_JIS_Yen = 0x5D } |
| enum | KKMouseButtonCode { , KKMouseButtonOther, KKMouseButtonDoubleClickOffset = 0x1F } |
| enum KKKeyCode |
| enum KKModifierFlag |
The modifier flags (bits) for special keyboard keys, like Shift, Control, Option, Command, Function, Help, etc.
| enum KKMouseButtonCode |
The "virtual keyCodes" for mouse buttons. These are left, right and other. The "other" buttons may include multiple keys which, if supported by the hardware and driver, you can identify with kKKMouseButtonOther and an optional offset, eg "kKKMouseButtonOther + 2" for a fifth mouse button. Note that any of the "other" mouse buttons are non-standard and typically require non-Apple mice to work. You can not rely on any of the "other" buttons being available at all.
Mouse double-clicks are an offset (kKKMouseButtonDoubleClickOffset) to the button codes. Double-clicks are treated as separate buttons by KKInput for your convenience, ie you don't have to test for two consecutive mouse button presses.
Direction bits for the swipe gesture relative are relative to the current device orientation.
| enum KKTouchPhase |
A touch can have just began, it can be moving, or it can be ended this frame. The kKKTouchPhaseAny can be used if want to include all three phases in a touch test. The KKTouchPhase enum values are equal to those in the UITouchPhase enum (except for any and lifted), that means they can be used interchangeably.