pokepetter / ursina

A game engine powered by python and panda3d.
https://pokepetter.github.io/ursina/
MIT License
2.23k stars 328 forks source link

Add MessageBox, SliderButton and ClickPanel #630

Open Creator754915 opened 1 year ago

Creator754915 commented 1 year ago

I add new UI component, and i developpe the Layout component

What i add ?

  1. MessageBox
  2. ClickPanel
  3. Background

Messagebox

from ursina import *
from ursina.prefabs import MessageBox

app = Ursina()
messagebox = MessageBox(messagebox_name='My Messagebox', text='hello world!', scale=(.8, .5), color=color.azure,
                        text_origin=(-.36, .18))
messagebox.tooltip = Tooltip("MessageBox")

app.run()

Background

from ursina import *
from ursina.prefabs import Background
app = Ursina()

Background(texture='sky_sunset')

app.run()

ClickPanel

from ursina import *
from ursina.prefabs import ClickPanel
app = Ursina()

ClickPanel(key_control=False, key_bind="right mouse")

app.run()
Creator754915 commented 8 months ago

Thank you !