Changed draw.odin, removed DearImgui
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user