Scroll List How-To

This is the place to find out how to accomplish something specific with EZ GUI.

Re: Scroll List How-To

Postby ByDesignGames » Fri Aug 12, 2011 5:36 pm

Little Angel wrote:When it comes to the demos, you should load them into their own new standalone project to minimise errors.

I have been doing that (e.g. in the example above) and it still ended up in error-city; the issue seems that the demos are not compatible with the beta.

Here's what I ended up doing (since no reply from author):
- Uninstall beta from stand-alone project.
- Install latest release.
- Install latest release demo.
- Extrapolate basic "how to use scroll list" information from previous version of scroll list examples and just sort of mucked through it blindly.

Took longer than it really should and it is not exactly what'd I'd expect given the price of entry, but hey the schedule isn't going to wait for Brady :)
ByDesignGames
 
Posts: 16
Joined: Tue Jan 04, 2011 8:20 am

Re: Scroll List How-To

Postby ByDesignGames » Fri Aug 12, 2011 5:42 pm

On to the next blackbox question ;)

Wish to implement a scrolling list simliar to DatePicker for iOS (see day column in attached image).

Is this possible with ScrollLIst / EZ-GUI? (Brady, this is for production work, need an answer sooner rather than later)

The key here is that the index of the list is in the center of the list. Also would like some means of diminishing any list item that is not the "current" index.

Possible?
Attachments
datepicker_a.jpg
datepicker_a.jpg (31.51 KiB) Viewed 4512 times
ByDesignGames
 
Posts: 16
Joined: Tue Jan 04, 2011 8:20 am

Re: Scroll List How-To

Postby ByDesignGames » Fri Aug 12, 2011 5:57 pm

Also, the snapping seems to take in 0.5 * item spacing instead of snapping to the entire spacing size?

1st image is scroll list at start, everything is evenly spaced and looks as desired.
Screen Shot 2011-08-12 at 10.50.56 AM.png

2nd image is after scrolling with snap enabled, scroll list is no longer evenly spaced and it snaps on what appears to be half the item spacing size.
Screen Shot 2011-08-12 at 10.51.23 AM.png

Why is this, and more importantly, how to fix it?
ByDesignGames
 
Posts: 16
Joined: Tue Jan 04, 2011 8:20 am

Re: Scroll List How-To

Postby Brady » Fri Aug 12, 2011 6:36 pm

First, what demo(s) are you having trouble with? They should all be compatible with the latest beta. The current methodology, per your request some time ago, was to separate the demos from the core package. So you should import the core package first, then the demo, and you shouldn't receive any errors.

Yes, it is possible to do a picker like that. As it appears you have discovered, you enable the "snap" feature, and then to find the current "snapped" item (the center item), you use the list's .SnappedItem property which gives you the last snapped item.

On the spacing issue, without looking at it, it's tough to say. Though one suggestion is that if you're using UIListItemContainers, make sure you're positioning the child controls as desired relative to the parent container's center/pivot point. In other words, make sure they aren't really far offset from the parent object's center since the items are positioned using the parent object's transform.

Aside from that, if you would like to e-mail me a quick package that demonstrates the issue, I'd be happy to diagnose it for you.
Brady
 
Posts: 5361
Joined: Tue Jul 06, 2010 11:33 pm

Re: Scroll List How-To

Postby ByDesignGames » Fri Aug 12, 2011 6:45 pm

Brady wrote:First, what demo(s) are you having trouble with? They should all be compatible with the latest beta. The current methodology, per your request some time ago, was to separate the demos from the core package. So you should import the core package first, then the demo, and you shouldn't receive any errors.

Was trying with the Castle Storm demo; here's what I did to see a bunch of errors:
    Opened test project w/out any EZGUI
    Installed latest Beta
    Installed Castle_Storm_Demo.unityPackage
Brady wrote:Yes, it is possible to do a picker like that. As it appears you have discovered, you enable the "snap" feature, and then to find the current "snapped" item (the center item), you use the list's .SnappedItem property which gives you the last snapped item.

Which item does it snap to by default? The top of the list?
Brady wrote:On the spacing issue, without looking at it, it's tough to say. Though one suggestion is that if you're using UIListItemContainers, make sure you're positioning the child controls as desired relative to the parent container's center/pivot point. In other words, make sure they aren't really far offset from the parent object's center since the items are positioned using the parent object's transform.

All child control transforms are Vector3.zero relative to the parent.
Brady wrote:Aside from that, if you would like to e-mail me a quick package that demonstrates the issue, I'd be happy to diagnose it for you.

Thank you for the offer; i'll try to isolate the list & send you a package off list.
ByDesignGames
 
Posts: 16
Joined: Tue Jan 04, 2011 8:20 am

Re: Scroll List How-To

Postby Brady » Fri Aug 12, 2011 7:04 pm

ByDesignGames wrote:Was trying with the Castle Storm demo; here's what I did to see a bunch of errors:
    Opened test project w/out any EZGUI
    Installed latest Beta
    Installed Castle_Storm_Demo.unityPackage


I performed these steps to test and I did see two messages about a MonoBehavior being attached to a particular prefab that Unity could not find. I've been trying to figure out A) what exactly this message means, and B) why it is happening since as far as I can tell, the object in question is just fine and has only the components it is supposed to. I've tried re-prefabbing the object clean, etc, but it keeps saying that. At any rate, it runs exactly as it should, so for now, this message appears to be most likely due to some kind of glitch in Unity's asset library entry for the object in question since I can't find any problem with the object itself.

Which item does it snap to by default? The top of the list?

Yes, it doesn't consider it an actual "snap" position, but it is aligned with the top item at the top of the list by default. You can, of course, manually snap to a specific item through code by calling one of the .ScrollToItem() methods.

Thank you for the offer; i'll try to isolate the list & send you a package off list.

Okay, cool.
Brady
 
Posts: 5361
Joined: Tue Jul 06, 2010 11:33 pm

Re: Scroll List How-To

Postby ByDesignGames » Fri Aug 12, 2011 7:56 pm

Brady wrote:I performed these steps to test and I did see two messages about a MonoBehavior being attached to a particular prefab that Unity could not find. I've been trying to figure out A) what exactly this message means, and B) why it is happening since as far as I can tell, the object in question is just fine and has only the components it is supposed to. I've tried re-prefabbing the object clean, etc, but it keeps saying that. At any rate, it runs exactly as it should, so for now, this message appears to be most likely due to some kind of glitch in Unity's asset library entry for the object in question since I can't find any problem with the object itself.

Might be my demo then; usually download the latest with each release, but didn't see any version info on the package.

Anyway, am past the need to use the demo at this point, so will download latest next time I have need to review the demos & try again.

Brady wrote:
Which item does it snap to by default? The top of the list?

Yes, it doesn't consider it an actual "snap" position, but it is aligned with the top item at the top of the list by default. You can, of course, manually snap to a specific item through code by calling one of the .ScrollToItem() methods.

Hmm...

Brady wrote:
Thank you for the offer; i'll try to isolate the list & send you a package off list.

Okay, cool.

Sent! :)
ByDesignGames
 
Posts: 16
Joined: Tue Jan 04, 2011 8:20 am

Re: Scroll List How-To

Postby Brady » Fri Aug 12, 2011 8:13 pm

I replied directly to your e-mail, but for the sake of posterity:

It appears that the end spacing you have added is what is responsible for the items being aligned as desired initially. That's because when the list reaches the end, it just clamps to 0 or 1 (the very beginning or very end of the list). But the alignment when snapping to items elsewhere in the list appears off because that's actually how the items themselves are constructed. If you try scrolling and note the center position of the scroll list, then look at the center position of the list item that is "snapped", you'll find that the items are snapping to the correct positions. The problem is that the list item content itself is offset from this center point. You can remedy this by changing the "Anchor" setting of the list item. However, TEXTURE_OFFSET normally works just fine. The reason I suspect it is not would be because the source artwork actually has the image offset in the canvas itself. See the EZ GUI docs under the "Building Atlases" topic (see the "Texture Trimming" section on that page) for more details on how this TEXTURE_OFFSET anchor is affected by the position of an image on a canvas.

Either centering the list item image in the canvas of the original source artwork, or else changing the anchor to something like MIDDLE_CENTER, should cause the item's visual element to be centered relative to the GameObject's own transform center, which means that when the item is centered in the list, it should be properly aligned as expected. This, however, means you'l need to add a bit more end spacing so that when the list is at its extremities, the items at the ends align as desired.
Brady
 
Posts: 5361
Joined: Tue Jul 06, 2010 11:33 pm

Re: Scroll List How-To

Postby ByDesignGames » Fri Aug 12, 2011 9:54 pm

Brady wrote:Either centering the list item image in the canvas of the original source artwork, or else changing the anchor to something like MIDDLE_CENTER, should cause the item's visual element to be centered relative to the GameObject's own transform center, which means that when the item is centered in the list, it should be properly aligned as expected. This, however, means you'l need to add a bit more end spacing so that when the list is at its extremities, the items at the ends align as desired.

Excellenté! Yeah, needed to fudge the end spacing a bit, but it works beautifully now. Thanks for the quick reply Brady!
ByDesignGames
 
Posts: 16
Joined: Tue Jan 04, 2011 8:20 am

jhgjtghrt

Postby hxmy018 » Thu Jul 07, 2016 11:11 am

moncler girls
scarpe hogan
fitflop slippers
botas de futbol nike baratas
womens timberland boots
chaussures de foot pas cher
Soccer Boots Outlet nike
discount ray bans
zapatos de futbol nike
nike schuhe
botas de futbol
pandora bracelets
michael kors handbags on sale
hogan outlet
nike sportschuhe
nike soccer cleats cheap
official NHL jerseys
air max 90 pas cher
pink toms
moncler outlet usa
cheap fitflops
Michael Kors Sale
jordan retro 10
pandora rings
nike mercurial soccer cleats
raybans glasses
toms women shoes
oakley outlet
cheap michael kors purses
Cheap Coach
NHL jerseys cheap
Nike Roshe Run
cheap vans shoes
Coach Purses Outlet
where to buy toms
pandora jewelry store
botas futbol baratas
womens toms
toms on sale
oakley sunglass outlet
oakley goggles
nfl jerseys cheap
timberland outlet
cheap ray ban aviators
nike mercurial
Cheap oakley sunglasses sale
Nike Air Jordan 11
pandora rings silver
Ray ban sale online
chaussure nike homme pas cher
toms shoes outlet
nike tiempo
new yeezy shoes
new jordans 2016
oakley prescription glasses
retro jordans for cheap
Canada Goose Women
cheap oakley sunglasses outlet
cheap christian louboutin
pandora necklace charms
newest lebron shoes
michael kors black bag
Cheap Michael Kors
soccer shoes nike
cheap oakley goggles
Toms shoes sale
Ray Ban Outlet
Nike Free 4.0
Boutique nike paris
Canada Goose Jackets
Nike Factory Store
timberland shoes for men
shop nfl
cheap pandora charms
Uomo Hogan
scarpe hogan outlet
nike futbol
Cheap Adidas Soccer Shoes
women toms shoes
Nike Air Jordan 13
nfl store
cheap nike air max 90
toms outlet
toms clearance
cheap air max outlet
vans shoes for sale
christian louboutin outlet
pandora charm bracelet sale
authentic retro jordans for sale
Michael Kors
Air Jordan Retro 11
a&f usa
ray ban store
oakley eyeglasses
nike jordan shoes
cheap jordan shoes for women
oakley cheap sunglasses
nike air max 2013
Cheap Ray Bans
nike free run 5.0 femme
black toms
ray ban 3025
ray bans for cheap
botas de futbol baratas
roshe run nike
Cheap Toms Shoes
fitflops sale uk
Ray Ban Aviators
michael kors wallets on sale
moncler coats for women
max air 2013
Toms Outlet Online
oakley sunglasses clearance
official nfl jerseys
yeezy adidas
scarpe hogan uomo
NHL store
pandora store
Discount toms
Nike Air Jordan Store
Nike Outlet Store
pandora charms sale
nike mercurial superfly
cheap timberland boots for men
nike schuhe damen
nike air max
Jordan Sneakers For Sale
Ray Ban Cheap
Cheap Canada Goose
christian louboutin sale
lebrons 11
pandora rings jewelry
womens vans
pandora beads
Toms Wedges
lebron james shoes for sale
sito ufficiale di Hogan
abercrombie outlet store
ray ban sunglasses for men
toms sale
toms outlet store
fitflop sandals sale
ray ban sunglasses cheap
nike air max 1
Air Jordan 11
Toms Shoes For Women
toms cheap
yeezy shoes
adidas yeezy boost 350
retro 11 jordans for sale
hogan scontate
Michael Kors Outlet
Coach Bags On Sale
nike sb stefan janoski
Toms Glitter
chaussure basket homme
Cheap Nike Soccer Shoes
ray ban sale
Canada Goose Outlet
Cheap Soccer Shoes
nike free
Toms Shoes On Sale
vans shoe store
toms retailers
Nike Store
pandora glass beads
toms store
christian louboutin shoes
abercombie and fitch
abercrombie and fitch store
NHL shop
Cheap Jordans
Air Max 90
mens lebron james shoes
jordan 10
hogan scarpe donna
cheap nike air max
7.7
hxmy018
 
Posts: 65
Joined: Thu Jul 07, 2016 10:34 am

PreviousNext

Return to EZ GUI How to...

Who is online

Users browsing this forum: AlfredoSam and 3 guests

cron