generated from Persson-dev/Godot-Xmake
Crosshair really in the center (it was in the top left center of the 40x40 centered rect)
This commit is contained in:
@@ -35,6 +35,7 @@ grow_vertical = 2
|
|||||||
mouse_filter = 1
|
mouse_filter = 1
|
||||||
|
|
||||||
[node name="Crosshair" type="Crosshair" parent="UserInterface"]
|
[node name="Crosshair" type="Crosshair" parent="UserInterface"]
|
||||||
|
layout_direction = 1
|
||||||
layout_mode = 1
|
layout_mode = 1
|
||||||
anchors_preset = 8
|
anchors_preset = 8
|
||||||
anchor_left = 0.5
|
anchor_left = 0.5
|
||||||
@@ -49,17 +50,17 @@ grow_horizontal = 2
|
|||||||
grow_vertical = 2
|
grow_vertical = 2
|
||||||
|
|
||||||
[node name="Top" type="Line2D" parent="UserInterface/Crosshair"]
|
[node name="Top" type="Line2D" parent="UserInterface/Crosshair"]
|
||||||
points = PackedVector2Array(0, -5, 0, -15)
|
points = PackedVector2Array(20, 15, 20, 5)
|
||||||
width = 2.0
|
width = 2.0
|
||||||
|
|
||||||
[node name="Right" type="Line2D" parent="UserInterface/Crosshair"]
|
[node name="Right" type="Line2D" parent="UserInterface/Crosshair"]
|
||||||
points = PackedVector2Array(5, 0, 15, 0)
|
points = PackedVector2Array(25, 20, 35, 20)
|
||||||
width = 2.0
|
width = 2.0
|
||||||
|
|
||||||
[node name="Bottom" type="Line2D" parent="UserInterface/Crosshair"]
|
[node name="Bottom" type="Line2D" parent="UserInterface/Crosshair"]
|
||||||
points = PackedVector2Array(0, 5, 0, 15)
|
points = PackedVector2Array(20, 25, 20, 35)
|
||||||
width = 2.0
|
width = 2.0
|
||||||
|
|
||||||
[node name="Left" type="Line2D" parent="UserInterface/Crosshair"]
|
[node name="Left" type="Line2D" parent="UserInterface/Crosshair"]
|
||||||
points = PackedVector2Array(-5, 0, -15, 0)
|
points = PackedVector2Array(15, 20, 5, 20)
|
||||||
width = 2.0
|
width = 2.0
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ void Crosshair::_process(float a_Delta) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void Crosshair::_draw() {
|
void Crosshair::_draw() {
|
||||||
draw_circle(Vector2(0, 0), m_DotRadius, m_DotColor);
|
draw_circle(Vector2(20, 20), m_DotRadius, m_DotColor);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Crosshair::adjust_crosshair_lines() {
|
void Crosshair::adjust_crosshair_lines() {
|
||||||
|
|||||||
Reference in New Issue
Block a user