Tramway SDK
|
Classes | |
struct | KeyBinding |
Typedefs | |
typedef uint16_t | keyboardaction_t |
Functions | |
void | BindKeyboardKey (KeyboardKey key, keyboardaction_t action) |
void | BindKeyboardKey (KeyboardKey key, void(*action)()) |
void | BindKeyboardKey (KeyboardKey key, void(*action)(KeyboardKey)) |
void | Init () |
void | Uninit () |
void | Update () |
void | EndFrame () |
void | SetWebMainLoop (void(*loop_function)(void)) |
float | GetScreenWidth () |
float | GetScreenHeight () |
void | SetWindowTitle (const char *title) |
void | SetWindowSize (int w, int h) |
void | SetCursor (CursorType cursor) |
void | SetInputState (InputState state) |
InputState | GetInputState () |
bool | PollKeyboardKey (KeyboardKey key) |
Checks the state of a key for the current frame. More... | |
float | PollKeyboardAxis (KeyboardAxis key) |
Checks the state of an axis for the current frame. More... | |
float | PollKeyboardAxisDelta (KeyboardAxis key) |
Checks the change of an axis for since the last frame. More... | |
float | GetAxisSensitivity (KeyboardAxis key) |
void | SetAxisSensitivity (KeyboardAxis key, float value) |
void | KeyPress (KeyboardKey key) |
void | KeyRelease (KeyboardKey key) |
void | KeyCode (uint16_t code) |
void | KeyMouse (float xpos, float ypos) |
void | KeyScroll (float value) |
void | ScreenResize (int width, int height) |
void | ScreenClose () |
bool | ShouldExit () |
keyboardaction_t | RegisterKeyboardAction (const char *name) |
keyboardaction_t | GetKeyboardAction (name_t name) |
name_t | GetKeyboardActionName (keyboardaction_t type) |
std::vector< std::pair< keyboardaction_t, std::vector< KeyboardKey > > > | GetAllKeyboardKeyBindings () |
const char * | GetKeyboardKeyName (KeyboardKey key) |
Variables | |
const size_t | MAX_KEYBOARDACTION_TYPES = 100 |
const float | CAMERA_SENSITIVITY = 6.0f |
const float | CAMERA_SPEED = 6.0f |
typedef uint16_t tram::UI::keyboardaction_t |
enum tram::UI::CursorType |
enum tram::UI::InputState |
enum tram::UI::KeyboardAxis : uint16_t |
enum tram::UI::KeyboardKey : uint16_t |
void tram::UI::BindKeyboardKey | ( | KeyboardKey | key, |
keyboardaction_t | action | ||
) |
void tram::UI::BindKeyboardKey | ( | KeyboardKey | key, |
void(*)() | action | ||
) |
void tram::UI::BindKeyboardKey | ( | KeyboardKey | key, |
void(*)(KeyboardKey) | action | ||
) |
void tram::UI::EndFrame | ( | ) |
std::vector< std::pair< keyboardaction_t, std::vector< KeyboardKey > > > tram::UI::GetAllKeyboardKeyBindings | ( | ) |
float tram::UI::GetAxisSensitivity | ( | KeyboardAxis | key | ) |
InputState tram::UI::GetInputState | ( | ) |
keyboardaction_t tram::UI::GetKeyboardAction | ( | name_t | name | ) |
name_t tram::UI::GetKeyboardActionName | ( | keyboardaction_t | type | ) |
const char * tram::UI::GetKeyboardKeyName | ( | KeyboardKey | key | ) |
float tram::UI::GetScreenHeight | ( | ) |
float tram::UI::GetScreenWidth | ( | ) |
void tram::Platform::Input::Init | ( | ) |
void tram::UI::KeyCode | ( | uint16_t | code | ) |
void tram::UI::KeyMouse | ( | float | xpos, |
float | ypos | ||
) |
void tram::UI::KeyPress | ( | KeyboardKey | key | ) |
void tram::UI::KeyRelease | ( | KeyboardKey | key | ) |
void tram::UI::KeyScroll | ( | float | value | ) |
float tram::UI::PollKeyboardAxis | ( | KeyboardAxis | key | ) |
Checks the state of an axis for the current frame.
float tram::UI::PollKeyboardAxisDelta | ( | KeyboardAxis | key | ) |
Checks the change of an axis for since the last frame.
bool tram::UI::PollKeyboardKey | ( | KeyboardKey | key | ) |
Checks the state of a key for the current frame.
keyboardaction_t tram::UI::RegisterKeyboardAction | ( | const char * | name | ) |
void tram::UI::ScreenClose | ( | ) |
void tram::UI::ScreenResize | ( | int | width, |
int | height | ||
) |
void tram::UI::SetAxisSensitivity | ( | KeyboardAxis | key, |
float | value | ||
) |
void tram::UI::SetCursor | ( | CursorType | cursor | ) |
void tram::UI::SetInputState | ( | InputState | state | ) |
void tram::UI::SetWebMainLoop | ( | void(*)(void) | loop_function | ) |
void tram::UI::SetWindowSize | ( | int | w, |
int | h | ||
) |
void tram::UI::SetWindowTitle | ( | const char * | title | ) |
bool tram::UI::ShouldExit | ( | ) |
void tram::Platform::Input::Uninit | ( | ) |
void tram::Platform::Input::Update | ( | ) |
const float tram::UI::CAMERA_SENSITIVITY = 6.0f |
const float tram::UI::CAMERA_SPEED = 6.0f |
const size_t tram::UI::MAX_KEYBOARDACTION_TYPES = 100 |