Hey.
I have a program that dynamically creates a chart. How can I make it so that when I press / hover, the text (value of a given point) is shown above a given point?
This is what I want to do about.
I already have a function responsible for clicking on a point, but so far it only displays text in the console.
func app_in_arr():
but_text.append(add_btn())
but_text[points_arr.size()-1].connect("pressed", self, "btn_press",[but_text[points_arr.size()-1]])
func btn_press(_button):
print("correct value")
func add_btn():
var new_button = TextureButton.new();
add_child(new_button);
new_button.name = str(points_arr.size())
new_button.rect_size = Vector2(20,20);
new_button.rect_global_position = Vector2(x+50.36,(-y/now_del)+440.41);
new_button.texture_normal = load("res://sprites/empty_texture.png")
new_button.pause_mode = Node.PAUSE_MODE_PROCESS
return new_button
I need, instead of the print, the value to be displayed as in the screenshot above.