DirectButton custom font click and rolling

The simplest, but least convenient approach, is to manually position them via the “pos” keyword-parameter.

However, to have them automatically keep their positions relative to each other, you could parent one below the other. (Taking care to not duplicate scales in the child-widgets, as the scales will compound.) This, combined with simpler use of the “pos” keyword-parameter, should allow you to place one button relative to the other–and to have it keep that relative position even if the other is moved.

Something like this:

button1 = DirectButton(text = "Mew", scale = 0.1)
button2 = DirectButton(text = "Purr", parent = button1, pos = (0, 0, -1.5))

Note:

  • The second button has a parent specified, that being the first button
  • The second button has no scale specified–it should inherit its scale from the first button, being a child of the latter.
  • The second button has a position, that being simply 1.5 units downward.
  • If the first button is moved, the second button should move with it.

[edit]
Oh, you may also be interested in DirectGUI designer, a community-made tool for working with DirectGUI: