Textfield time
This commit is contained in:
@@ -328,6 +328,11 @@ update_transform_gizmo :: (ray: Ray, mouse_position: Vector2) -> bool {
|
||||
}
|
||||
|
||||
position_change := new_position - engine.editor.transform_gizmo.first_hit_position;
|
||||
|
||||
// @Robustness: Why though?
|
||||
position_change.z *= -1.0;
|
||||
position_change.y *= -1.0;
|
||||
|
||||
scale_speed := ifx key_pressed(.SHIFT) then 4.0 else 1.0;
|
||||
|
||||
if selected_entity.flags & .UNIFORM_SCALE {
|
||||
|
||||
@@ -173,12 +173,19 @@ editor_ui :: () {
|
||||
|
||||
if engine.editor.selected_entities.count == 1 {
|
||||
entity := engine.editor.selected_entities[0];
|
||||
ui_slider(*slider_value, 0.0, 1.0);
|
||||
ui_label(tprint("Name: %", entity.name));
|
||||
//ui_slider(*slider_value, 0.0, 1.0);
|
||||
|
||||
ui_textfield("Name", *entity.name);
|
||||
|
||||
ui_label(tprint("Id: %", entity.id));
|
||||
ui_label(tprint("Position: % % %", entity.transform.position.x, entity.transform.position.y, entity.transform.position.z));
|
||||
ui_label(tprint("Rotation: % % % %", entity.transform.orientation.x, entity.transform.orientation.y, entity.transform.orientation.z, entity.transform.orientation.w));
|
||||
ui_label(tprint("Scale: % % %", entity.transform.scale.x, entity.transform.scale.y, entity.transform.scale.z));
|
||||
|
||||
ui_vector_field("Position", *entity.transform.position);
|
||||
euler_rotation := quaternion_to_euler_v3(entity.transform.orientation);
|
||||
euler_rotation *= RADIANS_TO_DEGREES;
|
||||
ui_vector_field("Rotation", *euler_rotation);
|
||||
euler_rotation *= DEGREES_TO_RADIANS;
|
||||
entity.transform.orientation = euler_to_quaternion(euler_rotation);
|
||||
ui_vector_field("Scale", *entity.transform.scale);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -189,6 +196,7 @@ editor_ui :: () {
|
||||
ui_pop_parent();
|
||||
}
|
||||
|
||||
text_fun : string;
|
||||
slider_value : float = 0.0;
|
||||
|
||||
base_editor_update :: () {
|
||||
|
||||
Reference in New Issue
Block a user