#problem with buttons

1 messages · Page 1 of 1 (latest)

orchid plaza
#

i dont know what to do

molten hound
#

Probably there is another ui node in front blocking/consuming your click

orchid plaza
#

il try changing the z index to see if it makes a difference

#

it still wont work

molten hound
#

the z-index of the button is only relative to other children of it's parent, not everything

orchid plaza
#

i just made an empty scene with a button and when trying to press it it wont register

molten hound
#

does it show something on hover?

orchid plaza
#

no

molten hound
#

totally empty scene, running on it's own or in your game setup (hud, etc)?

orchid plaza
#

empty scene with a button

#

no more nodes other tha a button

molten hound
#

also in remote tab?

orchid plaza
#

yeah

#

its weird because other buttons work perfectly

molten hound
#

maybe try to project -> reload project?

orchid plaza
#

if that fixes it im gonna crashout

#

it didnt fix it

molten hound
#

can you show the script linked to the button?

orchid plaza
#

extends Button
var mode
var object

func _ready():
if mode == "items":
text = object + " x" + str(Global.inventory.get(object))
name = text

func _on_pressed() -> void:
print(name)

func _on_mouse_entered() -> void:
print("me tocaron")

#

thats all the code it has

molten hound
#

no extends Button??

orchid plaza
#

the buttons on the pause menu work perfecly but this one

orchid plaza
molten hound
#

oh, you right.. my bad lol

orchid plaza
#

np

#

but its so weird

molten hound
#

is the pause menu still "active" with your "only a button" scene?

orchid plaza
#

no

molten hound
#

and no related errors/warning?

orchid plaza
#

none

molten hound
#

what if you remove the script?

orchid plaza
#

let me see

#

it still wont work

molten hound
#

very odd

orchid plaza
#

no way i think i fixed it

molten hound
#

how?

orchid plaza
#

i hide all canvas layers

molten hound
#

ha

orchid plaza
#

i had a canvaslayer for screen transitions and it was always active

#

so i just hide it and its al ok now

#

thanks for the help