From 4c43951e70aaa2e7265d3b3f3c4964c048b9328d Mon Sep 17 00:00:00 2001 From: Hop311 Date: Thu, 10 Aug 2023 12:00:54 +0100 Subject: PieChart data and image now come from c++ layer --- game/src/Game/Theme/PieChart/LayeredChart.gd | 28 ---------------------------- 1 file changed, 28 deletions(-) delete mode 100644 game/src/Game/Theme/PieChart/LayeredChart.gd (limited to 'game/src/Game/Theme/PieChart/LayeredChart.gd') diff --git a/game/src/Game/Theme/PieChart/LayeredChart.gd b/game/src/Game/Theme/PieChart/LayeredChart.gd deleted file mode 100644 index 7bc69c8..0000000 --- a/game/src/Game/Theme/PieChart/LayeredChart.gd +++ /dev/null @@ -1,28 +0,0 @@ -extends CenterContainer - -var overlapping_charts:Array = [] - -# Called when the node enters the scene tree for the first time. -func _ready(): - for child in get_children(): - if child is PieChart: - overlapping_charts.push_back(child) - -#Process mouse to select the appropriate tooltip for the slice -func _gui_input(event:InputEvent): - if event is InputEventMouse: - var pos = event.position - var handled:bool = false - var x = overlapping_charts.size() - #process the charts in reverse order (overlying charts first) - #as you can't actually make the inner chart(s) smaller with a centerContainer - for i in range(x): - var chart = overlapping_charts[x-(i+1)] - if not handled: - handled = chart.handleTooltip(pos) - else: - chart.RichTooltip.visible = false - -func _on_mouse_exited(): - for chart in overlapping_charts: - chart.RichTooltip.visible = false -- cgit v1.2.3-56-ga3b1