DirectGUI Elements in Pixel2d

Greetings,

I am trying to place a slider in pixel2d but I can’t seem to get it to show up. My assumption is that its a size issue - I’m guessing that the size was previously defined between [0,1] for render2d, and now its too tiny to be seen in pixel2d. Unfortunately, I can’t figure out what property I need to change to enlarge the slider. I have tried the properties “scale”, “geom_scale”, and “frameSize” in the slider’s property group but none have made a difference. Does anyone know what properties I need to change for this purpose?

Thanks.

frameSize and scale should work. Note that the Y coordinate of pixel2d is generally negative: 0 is at the top of the screen and it decreases as it goes down.

Also note that your slider is a Panda NodePath like anything else, and you can position it around after you have created it with slider.setPos() or slider.setScale(). Or you can draw a helpful bounding volume with slider.showBounds().

David