r/pythonarcade • u/eruvanos • Nov 19 '18
UI and viewport
Hey,
I am want to add some UI to my game,
wondering if there is a way to draw something skipping the viewport.
I could update the UI elements every time to subtract the current viewport, but maybe there is another method, I did not see.
Greetings
2
Upvotes
View all comments
Show parent comment
2
u/Fonus2 Nov 19 '18 edited Nov 19 '18
I ended up with following prototype (not handling scale, resize, performance etc.):
Wich should place most stuff correctly.
As for mouse click:
self.cursor is ofcourse an UiItem.