Base input pass updated for sokol possibly done (untested)
Still need to figure out input event consumption, I don't want to do it with the event ring. I would like to setup input binding layers and then have the push/pop input contextes with a set of bindings. If the bindings are detected it should "consume" that binding from further use for the buffered time period. This will be really important with how heavily model this app will be.I
This commit is contained in:
@ -252,8 +252,8 @@ ui_screen_settings_menu :: proc( captures : rawptr = nil ) -> ( should_raise : b
|
||||
}
|
||||
|
||||
if input_box.active {
|
||||
array_append( & value_str, input.codes_pressed )
|
||||
array_clear( input.codes_pressed )
|
||||
append( & value_str, input_events.codes_pressed )
|
||||
clear( input_events.codes_pressed )
|
||||
}
|
||||
else if input_box.was_active
|
||||
{
|
||||
@ -264,8 +264,8 @@ ui_screen_settings_menu :: proc( captures : rawptr = nil ) -> ( should_raise : b
|
||||
}
|
||||
else
|
||||
{
|
||||
array_clear( value_str)
|
||||
array_append( & value_str, to_runes(str_fmt("%v", config.engine_refresh_hz)))
|
||||
clear( value_str)
|
||||
append( & value_str, to_runes(str_fmt("%v", config.engine_refresh_hz)))
|
||||
}
|
||||
ui_parent(input_box)
|
||||
|
||||
|
@ -210,6 +210,8 @@ State :: struct {
|
||||
input_prev : ^InputState,
|
||||
input : ^InputState,
|
||||
|
||||
input_events : InputEvents,
|
||||
|
||||
// Note(Ed): Do not modify directly, use its interface in app/event.odin
|
||||
staged_input_events : Array(InputEvent),
|
||||
// TODO(Ed): Add a multi-threaded guard for accessing or mutating staged_input_events.
|
||||
|
Reference in New Issue
Block a user