Home Tutorials Download Beta Store Forum Documentation KnowledgeBase Wiki Blog

ShiVa3D

Return to Wish list

hud.getListItemAtPoint ( hList, nX, nY)

You need some features? ask it to us here!

hud.getListItemAtPoint ( hList, nX, nY)

Postby berdal84 » 11 May 2009, 05:26

Hello,

On iPhone, I want the user to be able to scroll list components with his finger.
But, when the user start to slide his finger, the item under the finger is selected or unselected (if selected before). The problem is that I want the user to be able to select/unselect items too.
So, is it possible to add a function to get the list item under point (the same used inside the engine when the user select and item with his mouse):

hud.getListItemAtPoint ( hList, nX, nY)

This function is needed too:

local bSelected = hud.isListItemSelected ( hList, nItem)

I hope this will be possible.

Thanks.
My Games : https://play.google.com/store/apps/developer?id=B%C3%A9renger%20DALLE-CORT&hl=fr
User avatar
berdal84
Platinum Boarder
Platinum Boarder
 
Posts: 671

Re:hud.getListItemAtPoint ( hList, nX, nY)

Postby MiguelHerrero » 13 May 2009, 07:55

I'm fighting with the list control on the iPhone as well and is a pain in the butt.
It would be grat to have something more "iPhone like" on the iPhone. The scrollbar is almost impossible to use.

Is there a way to make the scrollbar wider? (and maybe to hide the top and down buttons, they're useless in the iPhone)
MiguelHerrero
Gold Boarder
Gold Boarder
 
Posts: 281

Re:hud.getListItemAtPoint ( hList, nX, nY)

Postby Yopia » 13 May 2009, 08:10

hi,

you can have a look at the [url="http://developer.stonetrip.com/Scripting/Scripting-XML-manipulation.html"]sample in XML tutorial[/url] and tweak the list behavior.

To change the scrollbar width, you have to do that in script ( no GUI access in hudEditor in ShiVa 1.7). Use the functions : [url="http://stdn.stonetrip.com/html/API/API_hud.html#hud.setListVerticalScrollBarWidth"]hud.setListVerticalScrollBarWidth[/url] and [url="http://stdn.stonetrip.com/html/API/API_hud.html#hud.setListVerticalScrollBarArrowHeight"]hud.setListVerticalScrollBarArrowHeight[/url].
User avatar
Yopia
Platinum Boarder
Platinum Boarder
 
Posts: 627

Re:hud.getListItemAtPoint ( hList, nX, nY)

Postby MiguelHerrero » 13 May 2009, 10:16

awesome, i'll try that, thanks a lot!
MiguelHerrero
Gold Boarder
Gold Boarder
 
Posts: 281


Return to Wish list