Input: Added viewport local mouse position | Transform: Added default parameter values for create_transform procedure
This commit is contained in:
@@ -157,6 +157,9 @@ Input_State :: struct {
|
||||
wheel: float;
|
||||
}
|
||||
|
||||
normalized_viewport_mouse_position: Vector2;
|
||||
viewport_mouse_position: Vector2;
|
||||
|
||||
gamepads: [MAX_GAMEPADS] Gamepad;
|
||||
num_gamepads: s32;
|
||||
|
||||
@@ -216,6 +219,12 @@ update_input :: () {
|
||||
update_sdl_input();
|
||||
|
||||
update_gamepad_input();
|
||||
|
||||
#if !EDITOR {
|
||||
engine.input.viewport_mouse_position.x = engine.input.mouse.x;
|
||||
engine.input.viewport_mouse_position.y = engine.input.mouse.y;
|
||||
engine.input.normalized_viewport_mouse_position /= Vector2.{xx engine.renderer.render_target_width, xx engine.renderer.render_target_height};
|
||||
}
|
||||
}
|
||||
|
||||
remove_all_temp_key_flags :: (using input_state: *Input_State) {
|
||||
|
||||
Reference in New Issue
Block a user