Changed draw.odin, removed DearImgui

This commit is contained in:
sam
2026-03-22 08:34:27 +05:45
parent 09941e3e1d
commit 9af832adf6
17 changed files with 56 additions and 43 deletions
+3 -2
View File
@@ -3,6 +3,7 @@ package edit2d
import b2 "vendor:box2d"
import im "shared:odin-imgui"
import "core:slice"
import draw "./draw"
import "core:fmt"
@@ -38,11 +39,11 @@ interface_body_def_editor :: proc(def: ^engine_entity_def)
im.SliderFloat2("Position", &def.body_def.position, -50, 50)
angle := RAD2DEG * b2.Rot_GetAngle(def.body_def.rotation)
angle := draw.RAD2DEG * b2.Rot_GetAngle(def.body_def.rotation)
if im.SliderFloat("Rotation", &angle, 0, 359)
{
def.body_def.rotation = b2.MakeRot(DEG2RAD * angle)
def.body_def.rotation = b2.MakeRot(draw.DEG2RAD * angle)
}
im.SliderFloat2("Linear velocity", &def.body_def.linearVelocity, 0, 500)