#Most Gum UI elements are not clickable for some reason

3 messages · Page 1 of 1 (latest)

spiral heath
#

Hello,
I am trying to make a simple UI with Gum, basically just consisting of a single panel that I want to hold some sliders and buttons. However, after adding the 4 buttons (all in the same way and evenly spaced), only two of them are clickable. Those 2 work correctly and show my debug messages in the console, but the other buttons are just not clickable. The same is true for the slider I added for testing. I can not interact with it at all. I added them all in the exact same way, with the exact same size, e.g.

        _startButton = new Button();
        _startButton.Text = "Start";
        
        _startButton.Click += (sender, args) =>
        {
            Console.WriteLine("Start");
        };
        _mainPanel.AddChild(_startButton);

I'm resizing and repositioning them in the Draw function because the window is resizable, so this code isn't run in the Initialize function. However, that code, just like the initialization, is identical for all buttons. But only two of them work. Has anyone encountered something similar? I am assuming that I am overlooking something basic here.

stray cipher
spiral heath