@@ -52,48 +52,34 @@ func _draw():
52
52
var fill_polygon : PackedVector2Array
53
53
fill_polygon .append (Vector2 (0.0 , 0.0 ))
54
54
if show_top :
55
- fill_polygon .append_array (PackedVector2Array (
56
- [
57
- Vector2 (Constants .KNOB_X + shift_top , 0.0 ),
58
- Vector2 (Constants .KNOB_X + Constants .KNOB_Z + shift_top , Constants .KNOB_H ),
59
- Vector2 (Constants .KNOB_X + Constants .KNOB_Z + Constants .KNOB_W + shift_top , Constants .KNOB_H ),
60
- Vector2 (Constants .KNOB_X + Constants .KNOB_Z * 2 + Constants .KNOB_W + shift_top , 0.0 ),
61
- ]
62
- ))
63
- fill_polygon .append_array (PackedVector2Array (
64
- [
65
- Vector2 (size .x , 0.0 ),
66
- Vector2 (size .x , size .y ),
67
- Vector2 (Constants .KNOB_X + Constants .KNOB_Z * 2 + Constants .KNOB_W + shift_bottom , size .y ),
68
- Vector2 (Constants .KNOB_X + Constants .KNOB_Z + Constants .KNOB_W + shift_bottom , size .y + Constants .KNOB_H ),
69
- Vector2 (Constants .KNOB_X + Constants .KNOB_Z + shift_bottom , size .y + Constants .KNOB_H ),
70
- Vector2 (Constants .KNOB_X + shift_bottom , size .y ),
71
- Vector2 (0.0 , size .y ),
72
- Vector2 (0.0 , 0.0 ),
73
- ]
74
- ))
55
+ fill_polygon .append (Vector2 (Constants .KNOB_X + shift_top , 0.0 ))
56
+ fill_polygon .append (Vector2 (Constants .KNOB_X + Constants .KNOB_Z + shift_top , Constants .KNOB_H ))
57
+ fill_polygon .append (Vector2 (Constants .KNOB_X + Constants .KNOB_Z + Constants .KNOB_W + shift_top , Constants .KNOB_H ))
58
+ fill_polygon .append (Vector2 (Constants .KNOB_X + Constants .KNOB_Z * 2 + Constants .KNOB_W + shift_top , 0.0 ))
59
+
60
+ fill_polygon .append (Vector2 (size .x , 0.0 ))
61
+ fill_polygon .append (Vector2 (size .x , size .y ))
62
+ fill_polygon .append (Vector2 (Constants .KNOB_X + Constants .KNOB_Z * 2 + Constants .KNOB_W + shift_bottom , size .y ))
63
+ fill_polygon .append (Vector2 (Constants .KNOB_X + Constants .KNOB_Z + Constants .KNOB_W + shift_bottom , size .y + Constants .KNOB_H ))
64
+ fill_polygon .append (Vector2 (Constants .KNOB_X + Constants .KNOB_Z + shift_bottom , size .y + Constants .KNOB_H ))
65
+ fill_polygon .append (Vector2 (Constants .KNOB_X + shift_bottom , size .y ))
66
+ fill_polygon .append (Vector2 (0.0 , size .y ))
67
+ fill_polygon .append (Vector2 (0.0 , 0.0 ))
75
68
76
69
var stroke_polygon : PackedVector2Array
77
70
stroke_polygon .append (Vector2 (shift_top , 0.0 ))
78
71
if show_top :
79
- stroke_polygon .append_array (PackedVector2Array (
80
- [
81
- Vector2 (Constants .KNOB_X + shift_top , 0.0 ),
82
- Vector2 (Constants .KNOB_X + Constants .KNOB_Z + shift_top , Constants .KNOB_H ),
83
- Vector2 (Constants .KNOB_X + Constants .KNOB_Z + Constants .KNOB_W + shift_top , Constants .KNOB_H ),
84
- Vector2 (Constants .KNOB_X + Constants .KNOB_Z * 2 + Constants .KNOB_W + shift_top , 0.0 ),
85
- ]
86
- ))
87
- stroke_polygon .append_array (PackedVector2Array (
88
- [
89
- Vector2 (size .x , 0.0 ),
90
- Vector2 (size .x , size .y ),
91
- Vector2 (Constants .KNOB_X + Constants .KNOB_Z * 2 + Constants .KNOB_W + shift_bottom , size .y ),
92
- Vector2 (Constants .KNOB_X + Constants .KNOB_Z + Constants .KNOB_W + shift_bottom , size .y + Constants .KNOB_H ),
93
- Vector2 (Constants .KNOB_X + Constants .KNOB_Z + shift_bottom , size .y + Constants .KNOB_H ),
94
- Vector2 (Constants .KNOB_X + shift_bottom , size .y ),
95
- ]
96
- ))
72
+ stroke_polygon .append (Vector2 (Constants .KNOB_X + shift_top , 0.0 ))
73
+ stroke_polygon .append (Vector2 (Constants .KNOB_X + Constants .KNOB_Z + shift_top , Constants .KNOB_H ))
74
+ stroke_polygon .append (Vector2 (Constants .KNOB_X + Constants .KNOB_Z + Constants .KNOB_W + shift_top , Constants .KNOB_H ))
75
+ stroke_polygon .append (Vector2 (Constants .KNOB_X + Constants .KNOB_Z * 2 + Constants .KNOB_W + shift_top , 0.0 ))
76
+
77
+ stroke_polygon .append (Vector2 (size .x , 0.0 ))
78
+ stroke_polygon .append (Vector2 (size .x , size .y ))
79
+ stroke_polygon .append (Vector2 (Constants .KNOB_X + Constants .KNOB_Z * 2 + Constants .KNOB_W + shift_bottom , size .y ))
80
+ stroke_polygon .append (Vector2 (Constants .KNOB_X + Constants .KNOB_Z + Constants .KNOB_W + shift_bottom , size .y + Constants .KNOB_H ))
81
+ stroke_polygon .append (Vector2 (Constants .KNOB_X + Constants .KNOB_Z + shift_bottom , size .y + Constants .KNOB_H ))
82
+ stroke_polygon .append (Vector2 (Constants .KNOB_X + shift_bottom , size .y ))
97
83
98
84
stroke_polygon .append (Vector2 (shift_bottom , size .y ))
99
85
if shift_top + shift_bottom == 0 :
0 commit comments