0

Right now I already have the UI complete, but I cannot seem to figure out how to position it on the screen. I am fairly new to ursina, by the way.

Here is sample code:

app = Ursina()

test = InputField(text='')

UI = WindowPanel(
    title='Menu',
    content=(
        Text('Username:'),
        test,
        Button(text='Submit', color=color.azure),
        Button(text='Free Play'),
        Button(text='Challenge'),
        Button(text='Leaderboard')
        ),
        popup=True,
        enabled=True
    )

app.run()

1 Answers1

0

Set the position of your app (in pixels):

app = Ursina(position=(100, 100))

Various other properties can be set as well, have a look at the cheat sheet.

Jan Wilamowski
  • 3,308
  • 2
  • 10
  • 23