In progress work for swapping models for data viewer
This commit is contained in:
@@ -182,6 +182,16 @@ Interact={
|
|||||||
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-3,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":70,"key_label":0,"unicode":102,"location":0,"echo":false,"script":null)
|
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-3,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":70,"key_label":0,"unicode":102,"location":0,"echo":false,"script":null)
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
Next={
|
||||||
|
"deadzone": 0.2,
|
||||||
|
"events": [Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":-3,"button_index":10,"pressure":0.0,"pressed":true,"script":null)
|
||||||
|
]
|
||||||
|
}
|
||||||
|
Previous={
|
||||||
|
"deadzone": 0.2,
|
||||||
|
"events": [Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":-3,"button_index":9,"pressure":0.0,"pressed":true,"script":null)
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
[internationalization]
|
[internationalization]
|
||||||
|
|
||||||
|
|||||||
@@ -9,6 +9,8 @@ public partial class DataViewer : Control
|
|||||||
{
|
{
|
||||||
public override void _Notification(int what) => this.Notify(what);
|
public override void _Notification(int what) => this.Notify(what);
|
||||||
|
|
||||||
|
public IInstantiator Instantiator { get; set; } = default!;
|
||||||
|
|
||||||
[Export]
|
[Export]
|
||||||
public float _cameraSpeed = 0.01f;
|
public float _cameraSpeed = 0.01f;
|
||||||
|
|
||||||
@@ -20,6 +22,11 @@ public partial class DataViewer : Control
|
|||||||
|
|
||||||
[Node] public Label RotationLabel { get; set; } = default!;
|
[Node] public Label RotationLabel { get; set; } = default!;
|
||||||
|
|
||||||
|
public void Initialize()
|
||||||
|
{
|
||||||
|
Instantiator = new Instantiator(GetTree());
|
||||||
|
}
|
||||||
|
|
||||||
public override void _Process(double delta)
|
public override void _Process(double delta)
|
||||||
{
|
{
|
||||||
if (Input.IsActionPressed(GameInputs.MoveLeft))
|
if (Input.IsActionPressed(GameInputs.MoveLeft))
|
||||||
@@ -37,5 +44,18 @@ public partial class DataViewer : Control
|
|||||||
|
|
||||||
Camera3D.Position = Camera3D.Position.Clamp(new Vector3(0, 0, 1), new Vector3(0, 0, 4));
|
Camera3D.Position = Camera3D.Position.Clamp(new Vector3(0, 0, 1), new Vector3(0, 0, 4));
|
||||||
ModelPivot.Rotation = ModelPivot.Rotation.Clamp(Mathf.DegToRad(-60), Mathf.DegToRad(60));
|
ModelPivot.Rotation = ModelPivot.Rotation.Clamp(Mathf.DegToRad(-60), Mathf.DegToRad(60));
|
||||||
|
|
||||||
|
if (Input.IsActionJustPressed(GameInputs.Interact))
|
||||||
|
{
|
||||||
|
// do nothing
|
||||||
|
}
|
||||||
|
if (Input.IsActionJustPressed(GameInputs.Next))
|
||||||
|
{
|
||||||
|
// Load next model
|
||||||
|
}
|
||||||
|
if (Input.IsActionJustPressed(GameInputs.Previous))
|
||||||
|
{
|
||||||
|
// Load previous model
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -241,3 +241,17 @@ grow_horizontal = 2
|
|||||||
grow_vertical = 2
|
grow_vertical = 2
|
||||||
theme = ExtResource("2_bef6s")
|
theme = ExtResource("2_bef6s")
|
||||||
placeholder_text = "Placeholder Text"
|
placeholder_text = "Placeholder Text"
|
||||||
|
|
||||||
|
[node name="Label" type="Label" parent="CenterContainer/VBoxContainer/BottomPanel"]
|
||||||
|
layout_mode = 1
|
||||||
|
anchors_preset = 3
|
||||||
|
anchor_left = 1.0
|
||||||
|
anchor_top = 1.0
|
||||||
|
anchor_right = 1.0
|
||||||
|
anchor_bottom = 1.0
|
||||||
|
offset_left = -369.0
|
||||||
|
offset_top = -76.0
|
||||||
|
grow_horizontal = 0
|
||||||
|
grow_vertical = 0
|
||||||
|
theme = ExtResource("2_bef6s")
|
||||||
|
text = "Press ○ to exit"
|
||||||
|
|||||||
Reference in New Issue
Block a user