From 9dc5c53f7ed77be551e010d2550bd54427767cc9 Mon Sep 17 00:00:00 2001 From: Michael Alexsander Date: Thu, 19 Dec 2019 18:14:08 -0300 Subject: [PATCH 1/2] Keep "View" menu visible when toggling items --- Scripts/Main.gd | 1 + 1 file changed, 1 insertion(+) diff --git a/Scripts/Main.gd b/Scripts/Main.gd index 8e2ff83b2..691149b0c 100644 --- a/Scripts/Main.gd +++ b/Scripts/Main.gd @@ -115,6 +115,7 @@ func _ready() -> void: i += 1 view_menu.set_item_checked(2, true) #Show Rulers view_menu.set_item_checked(3, true) #Show Guides + view_menu.hide_on_checkable_item_selection = false i = 0 for item in help_menu_items.keys(): help_menu.add_item(item, i, help_menu_items[item]) From 7d1b72aa58d00281c5cb6b1e8aac59c158d7f085 Mon Sep 17 00:00:00 2001 From: Michael Alexsander Date: Thu, 19 Dec 2019 19:23:08 -0300 Subject: [PATCH 2/2] Make the vertical ruler show its values vertically --- Scripts/VerticalRuler.gd | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Scripts/VerticalRuler.gd b/Scripts/VerticalRuler.gd index 4757c4ff9..ee9b308c6 100644 --- a/Scripts/VerticalRuler.gd +++ b/Scripts/VerticalRuler.gd @@ -46,8 +46,11 @@ func _draw() -> void: var position : Vector2 = (transform * ruler_transform * major_subdivide * minor_subdivide).xform(Vector2(0, i)) if i % (major_subdivision * minor_subdivision) == 0: draw_line(Vector2(0, position.y), Vector2(RULER_WIDTH, position.y), Color.white) + var text_xform = Transform2D(-PI / 2, Vector2(font.get_height() - 4, position.y - 2)) + draw_set_transform_matrix(get_transform() * text_xform) var val = (ruler_transform * major_subdivide * minor_subdivide).xform(Vector2(0, i)).y - draw_string(font, Vector2(0, position.y - 2), str(int(val))) + draw_string(font, Vector2(), str(int(val))) + draw_set_transform_matrix(get_transform()) else: if i % minor_subdivision == 0: draw_line(Vector2(RULER_WIDTH * 0.33, position.y), Vector2(RULER_WIDTH, position.y), Color.white)