LoveUI for Love 0.5.0

Showcase your libraries, tools and other projects that help your fellow love users.
Post Reply
User avatar
athanazio
Citizen
Posts: 96
Joined: Fri Apr 10, 2009 3:12 am
Location: Rio de Janeiro - Brazil
Contact:

Re: LoveUI... has button, Textfield, scrollVIew

Post by athanazio »

cool sample !! pure inspiration !!! =)
your great job inspires me to move forward
Nothing is simple but everything is possible.
User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

Re: LoveUI... has button, Textfield, scrollVIew

Post by bartbes »

I love it! I didn't expect it to be this simple, here is my server browser 'menu' as of today (03-05-09): Netris@Github game.lua

Progress is fast ATM, it won't be long until bugfixing is the only thing left, thanks!
User avatar
Robin
The Omniscient
Posts: 6506
Joined: Fri Feb 20, 2009 4:29 pm
Location: The Netherlands
Contact:

Re: LoveUI... has button, Textfield, scrollVIew

Post by Robin »

appleide wrote:After changing the data you could call aListView:reloadData(), which will fetch the number of rows again and so you don't need the "or '' " bit in the viewForRow function.
There was no way you could've known that though.
Ah yes, that would have been nice to know. I think, for actual use in games etc, extensive documentation would be invaluable.
Help us help you: attach a .love.
User avatar
appleide
Party member
Posts: 323
Joined: Fri Jun 27, 2008 2:50 pm

Re: LoveUI... has button, Textfield, scrollVIew

Post by appleide »

w00t :) thanks!

Okay new version. Move list selection with arrow keys. + bindings.
Bindings:
Quick Explanation:
The value will be fetched when its needed.
Example:

Code: Select all

--bind textfield's text with servers table using aListView's selectedIndex
LoveUI.bind(aTextfield.cell, "value", aListView, "selectedIndex", 
function(selectedIndex)
	local v=''
	if selectedIndex then
		v=servers[selectedIndex][2]..' server';
	end
	return v
end);
Last edited by appleide on Sun May 03, 2009 8:20 am, edited 1 time in total.
User avatar
appleide
Party member
Posts: 323
Joined: Fri Jun 27, 2008 2:50 pm

Re: LoveUI... has button, Textfield, scrollVIew

Post by appleide »

Here's one licensed under MIT.

EDIT: Fixed a bug where each object could only have 1 binding.
Attachments
LoveUI(alpha).love
(69.99 KiB) Downloaded 198 times
User avatar
appleide
Party member
Posts: 323
Joined: Fri Jun 27, 2008 2:50 pm

Re: LoveUI... has button, Textfield, scrollVIew

Post by appleide »

Added minimal documentation inside source code. Tabs to cycle between textfields. Double click / right click to select all in text field. Used bindings within LoveUI. Made controls' behaviours more consistent with help of bindings. Fixed binding bug not fixed in last release. fixed some other bugs and other small details. This qualifies as a 'major' release.
05 May 2009
Added minimal guides to top of files:
LoveUIButton.lua
LoveUITextfield.lua
LoveUIScrollView.lua
LoveUILabel.lua
LoveUIListView.lua
LoveUIContext.lua


Fixed bindings bug that wasn't fixed in the last fix.
Bound control.value to cell.value
Bound opaque and enabled on the rows of ListCell, ClipView to ListView, and also ClipView to ScrollView.

Added tab to switch between textfields.
Textfields now select all when double clicked or right clicked.

mousewheel on scrollview crashing when no vertical scroll bar bug.

altered context mouse up behaviour.
Attachments
LoveUI(alpha).love
(74.15 KiB) Downloaded 170 times
User avatar
Robin
The Omniscient
Posts: 6506
Joined: Fri Feb 20, 2009 4:29 pm
Location: The Netherlands
Contact:

Re: LoveUI... has button, Textfield, scrollVIew

Post by Robin »

Not sure whether this was intended or not, but you are only able to tab-switch between text fields, and while buttons seem to grab focus, you can't click on them with Space or Enter, as the expected behaviour would be.
Help us help you: attach a .love.
User avatar
appleide
Party member
Posts: 323
Joined: Fri Jun 27, 2008 2:50 pm

Re: LoveUI... has button, Textfield, scrollVIew

Post by appleide »

Different expectations >< On my safari when I press tab it switches between only textfields and popup menus. I'll take a look at pressing buttons with space though.
User avatar
Robin
The Omniscient
Posts: 6506
Joined: Fri Feb 20, 2009 4:29 pm
Location: The Netherlands
Contact:

Re: LoveUI... has button, Textfield, scrollVIew

Post by Robin »

Only text fields and popup menus? How can you use your computer without a mouse then?
Help us help you: attach a .love.
User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

Re: LoveUI... has button, Textfield, scrollVIew

Post by bartbes »

Apple was the first OS manufacturer using a mouse, so why would they allow you to stop using one?
Post Reply

Who is online

Users browsing this forum: No registered users and 75 guests