Page 2 of 2

Re: Uare: A simple and customisable UI library

Posted: Sat Oct 15, 2016 9:55 pm
by Ulydev
Zireael wrote:Does this work with newest LOVE?
Can I have a window over a window? Or see-through windows?
Hey Zireael,
I just updated Uare to work with 0.10.x! Also, yes, you can definitely have windows stacked on top of each other, and even define transparent background colors. Check out the examples in the repo :)

Re: Uare: A simple and customisable UI library

Posted: Tue Nov 01, 2016 7:54 pm
by Nicholas Scott
Ulydev wrote:Check out the examples in the repo :)
Heyya, quick question, where is all the locations your library gets the mouse position, I would like to replace it with an internal function call to get the mouse position so that I could easily swap it between love.mouse.getPosition() and something like camera:getMousePosition() for gamera and other things :D
Edit: Nvm :P I forgot that it is passed inside the love.update call x3 Well, that's handy, thanks :D

Edit2: Oh hey, quick thing, you should probably pass self inside of your codes update function for the callbacks ie these: Image
It would be useful for accessing your own properties inside of one of those calls, say I wanted a button to move across the screen if it's pressed, as of now I'd have to have a reference to it somewhere else, where if that was passed I could do something as simple as :

Code: Select all

--Declare myButton as a local variable somewhere up here
myButton.onClick(self)
	self.x,self.y = 100, 500
end
table.insert(objects, myButton)
--Now I've lost a reference to that so I'd have to search through the table of objects for it's reference to edit it's attributes
Just a suggestion

Re: Uare: A simple and customisable UI library

Posted: Tue Nov 01, 2016 9:17 pm
by Ulydev
Nicholas Scott wrote: Just a suggestion
Thanks for the feedback! Feel free to open an issue or a pull request on Github, that would greatly help!

Re: Uare: A simple and customisable UI library

Posted: Wed Nov 02, 2016 12:26 am
by Nicholas Scott
Ulydev wrote:Feel free to open an issue or a pull request on Github, that would greatly help!
;~;;;;; so much work, I'll open an issue I guess :P But if I'm gonna do that, I'm gonna open a few more issues while I'm at it, such as adding another callback such as

Code: Select all

--Inside uare:updateSelf(dt, x, y, e)
--After all core update code
if self.customUpdate then self.customUpdate(self, dt, x, y, e) end

Code: Select all

--Inside uare:drawSelf(dt, x, y, e)
--After all core draw code
if self.customDraw then self.customDraw(self) end
Finished creating the issues :P

Re: Uare: A simple and customisable UI library

Posted: Thu Dec 01, 2022 5:01 pm
by Aimatt
hi, how to add icon to button?