Slick Forums

Discuss the Slick 2D Library
It is currently Sun Dec 17, 2017 6:15 am

All times are UTC




Post new topic Reply to topic  [ 6 posts ] 
Author Message
PostPosted: Mon Jul 29, 2013 10:49 am 
Offline

Joined: Sat Aug 13, 2011 8:04 pm
Posts: 87
Location: Canada
Hi Matthias,

I've made an image like a kind of speech bubble to show help on my app. It has an arrow that points to one corner and the scrolling region expands away from that point. Here's an image from ThemeEditor to show you what I mean:
Attachment:
themeEditor.png
themeEditor.png [ 4.72 KiB | Viewed 3054 times ]


The xml looks like this, and it works perfectly like so:
Code:
<area name="helpBoxArrowTopRightBackgrd" xywh="58,134,62,57" border="16,10,10,51" splity="T46,B10" splitx="L10,R51"/>
Attachment:
topRight.png
topRight.png [ 11.99 KiB | Viewed 3054 times ]


And by happy accident, instead of duplicating my image to get an upside down version, I used the flip vertical setting, and figured out that by reversing the splity params it also works perfectly...:
Code:
<area name="helpBoxArrowBottomRightBackgrd" xywh="58,134,62,-57" border="10,10,16,51" splity="T-46,B-10" splitx="L10,R51"/>
Attachment:
bottomRight.png
bottomRight.png [ 15.43 KiB | Viewed 3054 times ]


So far so good, so I figured I can make the horizontal reverse of both of these as follows:
Code:
<area name="helpBoxArrowTopLeftBackgrd" xywh="58,134,-62,57" border="16,51,10,10" splity="T46,B10" splitx="L-10,R-51"/>
<area name="helpBoxArrowBottomLeftBackgrd" xywh="58,134,-62,-57" border="10,51,16,10" splity="T-46,B-10" splitx="L-10,R-51"/>
But here it didn't work out as I hoped, and I've played with the top left version quite a bit to see if I could get it to work... eg. splitx="L-51,R-10", but nothing I tried gets the results. (I'll make a reply to this asap to show the results... it seems I can only post 3 images at a time)

So, I'm wondering if I'm doing something wrong, or using TWL in an unintended way, or if there's some fix required. Obviously, I do have some workarounds, but the very easiest for me is if the above can be made to work.

Thanks for all help!
tomas


Top
 Profile  
 
PostPosted: Mon Jul 29, 2013 10:51 am 
Offline

Joined: Sat Aug 13, 2011 8:04 pm
Posts: 87
Location: Canada
And here's what those 2 last definitions produce:
Attachment:
topLeft.png
topLeft.png [ 10.48 KiB | Viewed 3052 times ]
Attachment:
bottomLeft.png
bottomLeft.png [ 23.67 KiB | Viewed 3052 times ]


Thanks :)


Top
 Profile  
 
PostPosted: Mon Jul 29, 2013 7:05 pm 
Offline
Slick Zombie

Joined: Fri Jan 29, 2010 7:02 pm
Posts: 1242
First the splitx/y don't accept negative values - these are clamped against 0.

But it seems as splitx/y doesn't correctly work with flipx/y. I'll try to fix that.

_________________
TWL - The Themable Widget Library


Top
 Profile  
 
PostPosted: Mon Jul 29, 2013 7:10 pm 
Offline

Joined: Sat Aug 13, 2011 8:04 pm
Posts: 87
Location: Canada
Ok I see... my best bet is to make it with grids then, I think.

Thanks!
:D

edit: Hmm, maybe I don't see... I think I misunderstood originally... do you mean you will make it so positive split values will work on flipped images, and so I'll be able to do what I was trying to do?


Top
 Profile  
 
PostPosted: Mon Jul 29, 2013 7:39 pm 
Offline
Slick Zombie

Joined: Fri Jan 29, 2010 7:02 pm
Posts: 1242
Yes, positive split values should work now with this patch.

The split values are specified on the flipped image.

_________________
TWL - The Themable Widget Library


Top
 Profile  
 
PostPosted: Mon Jul 29, 2013 8:11 pm 
Offline

Joined: Sat Aug 13, 2011 8:04 pm
Posts: 87
Location: Canada
Perfect!

Thanks so much... wow, that was quick! :D


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group