有没有办法调整窗口面板在ursina对python的产卵位置?



现在我已经完成了UI,但我似乎不知道如何在屏幕上定位它。顺便说一下,我对ursina相当陌生。

下面是示例代码:

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()

设置应用程序的position(单位:像素):

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

还可以设置各种其他属性,请查看备忘单。

最新更新