UI: Added widget focus for regular input blocking | Physics: Trigger callbacks

This commit is contained in:
2024-11-02 02:25:24 +01:00
parent cb55590e03
commit 9ae08a9278
7 changed files with 65 additions and 36 deletions

View File

@@ -61,6 +61,8 @@ Transform_Gizmo :: struct {
}
Editor :: struct {
focused_widget: *UI_Box;
show_menu: bool;
should_check_entities: bool;
camera: Camera;

View File

@@ -251,17 +251,19 @@ base_editor_update :: () {
camera := *engine.editor.camera;
if key_pressed(.CTRL) && key_down(.S) {
save_scene(engine.current_scene, "../assets/scenes/");
//show_message("Saved scene");
}
if key_down(.DELETE) || key_down(.BACKSPACE) {
for engine.editor.selected_entities {
mark_entity_deleted(it);
if engine.editor.focused_widget == null {
if key_pressed(.CTRL) && key_down(.S) {
save_scene(engine.current_scene, "../assets/scenes/");
//show_message("Saved scene");
}
engine.editor.selected_entities.count = 0;
if key_down(.DELETE) || key_down(.BACKSPACE) {
for engine.editor.selected_entities {
mark_entity_deleted(it);
}
engine.editor.selected_entities.count = 0;
}
}
//if entity != null {