Change Naming Convention, add scroll to microui

This commit is contained in:
SamratGhale
2026-03-28 13:42:24 +05:45
parent a74b46cd64
commit c1b64e9066
12 changed files with 90 additions and 97 deletions
+5 -8
View File
@@ -2,7 +2,6 @@ package edit2d
import b2 "vendor:box2d"
//import im "shared:odin-imgui"
import "core:fmt"
import "vendor:glfw"
import "base:runtime"
import draw "./draw"
@@ -46,7 +45,7 @@ import draw "./draw"
*/
handle_entity_mode :: proc(
$E : typeid,
state : ^engine_state,
state : ^Engine_State,
game_data : ^$G,
) -> bool
{
@@ -107,7 +106,6 @@ handle_entity_mode :: proc(
ret = true
}
else{
//Can only do these actions if a entity is selected
if interface.selected_entity != -1 && len(level.entity_defs) > 0
{
@@ -150,7 +148,6 @@ handle_entity_mode :: proc(
def.scale += f32(state.input.mouse_prev.y / 5)
ret = true
}
}
@@ -162,7 +159,7 @@ handle_entity_mode :: proc(
handle_input :: proc(
$E : typeid,
state : ^engine_state,
state : ^Engine_State,
game_data : ^$G,
) -> bool
{
@@ -178,13 +175,13 @@ handle_input :: proc(
if is_key_pressed(state, glfw.KEY_E)
{
interface := &game.interface
if interface.edit_mode == max(EditMode)
if interface.edit_mode == max(Edit_Mode)
{
interface.edit_mode = min(EditMode)
interface.edit_mode = min(Edit_Mode)
}else
{
new_val := int(interface.edit_mode) + 1
interface.edit_mode = EditMode(new_val)
interface.edit_mode = Edit_Mode(new_val)
}
}