Page 5 of 12

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

Posted: Sun May 03, 2009 3:15 am
by athanazio
cool sample !! pure inspiration !!! =)
your great job inspires me to move forward

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

Posted: Sun May 03, 2009 6:52 am
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!

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

Posted: Sun May 03, 2009 7:44 am
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.

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

Posted: Sun May 03, 2009 7:46 am
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);

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

Posted: Sun May 03, 2009 8:13 am
by appleide
Here's one licensed under MIT.

EDIT: Fixed a bug where each object could only have 1 binding.

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

Posted: Mon May 04, 2009 2:45 pm
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.

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

Posted: Mon May 04, 2009 4:42 pm
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.

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

Posted: Mon May 04, 2009 11:42 pm
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.

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

Posted: Tue May 05, 2009 5:38 am
by Robin
Only text fields and popup menus? How can you use your computer without a mouse then?

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

Posted: Tue May 05, 2009 7:24 am
by bartbes
Apple was the first OS manufacturer using a mouse, so why would they allow you to stop using one?