Unravel Engine C++ Reference
Loading...
Searching...
No Matches
unravel::RmlEngine Namespace Reference

Functions

auto input_event_handler (Rml::Context *context, const os::event &event) -> bool
 Process ospp event and forward to RmlUi context.
 
auto convert_key (os::key::code ospp_key) -> Rml::Input::KeyIdentifier
 Convert ospp key code to RmlUi key identifier.
 
auto convert_mouse_button (os::mouse::button ospp_button) -> int
 Convert ospp mouse button to RmlUi mouse button.
 
auto convert_rml_key_to_ospp (Rml::Input::KeyIdentifier rml_key) -> os::key::code
 Convert RmlUi key identifier to ospp key code.
 
auto convert_rml_key_to_input (Rml::Input::KeyIdentifier rml_key) -> input::key_code
 Convert RmlUi key identifier to engine input key code.
 
auto get_key_modifier_state () -> int
 Get current key modifier state.
 
auto consume_input_event (Rml::Context *context, const os::event &event) -> bool
 Forward an event to RmlUi and report whether it was consumed.
 

Function Documentation

◆ consume_input_event()

auto unravel::RmlEngine::consume_input_event ( Rml::Context * context,
const os::event & event ) -> bool
inline

Forward an event to RmlUi and report whether it was consumed.

Returns
true when RmlUi handled the event and game input should ignore it

Definition at line 128 of file RmlUi_SystemInterface.h.

◆ convert_key()

auto unravel::RmlEngine::convert_key ( os::key::code ospp_key) -> Rml::Input::KeyIdentifier

Convert ospp key code to RmlUi key identifier.

Parameters
ospp_keyospp key code
Returns
RmlUi key identifier

Definition at line 288 of file RmlUi_SystemInterface.cpp.

◆ convert_mouse_button()

auto unravel::RmlEngine::convert_mouse_button ( os::mouse::button ospp_button) -> int

Convert ospp mouse button to RmlUi mouse button.

Parameters
ospp_buttonospp mouse button
Returns
RmlUi mouse button index

Definition at line 478 of file RmlUi_SystemInterface.cpp.

◆ convert_rml_key_to_input()

auto unravel::RmlEngine::convert_rml_key_to_input ( Rml::Input::KeyIdentifier rml_key) -> input::key_code

Convert RmlUi key identifier to engine input key code.

Parameters
rml_keyRmlUi key identifier
Returns
engine input key code

Definition at line 716 of file RmlUi_SystemInterface.cpp.

◆ convert_rml_key_to_ospp()

auto unravel::RmlEngine::convert_rml_key_to_ospp ( Rml::Input::KeyIdentifier rml_key) -> os::key::code

Convert RmlUi key identifier to ospp key code.

Parameters
rml_keyRmlUi key identifier
Returns
ospp key code

Definition at line 491 of file RmlUi_SystemInterface.cpp.

◆ get_key_modifier_state()

auto unravel::RmlEngine::get_key_modifier_state ( ) -> int

Get current key modifier state.

Returns
RmlUi key modifier flags

Definition at line 940 of file RmlUi_SystemInterface.cpp.

◆ input_event_handler()

auto unravel::RmlEngine::input_event_handler ( Rml::Context * context,
const os::event & event ) -> bool

Process ospp event and forward to RmlUi context.

Parameters
contextRmlUi context to receive events
eventospp event to process
Returns
true if the event should propagate to game input; false if RmlUi consumed it

Definition at line 199 of file RmlUi_SystemInterface.cpp.