Best practice for creating a resizable HUD-style widget stack background?

Nonsanity form at nonsanity.com
Wed Mar 16 12:29:26 EDT 2011


You can probably get away with drag-to-resize a round-cornered window by
changing to a square-cornered window when they start to drag, perhaps a
transparent one. The round-cornered graphics can still be visible and
expanding live. When they let go of the drag, re-calculate the
round-cornered mask from the now-resized graphics and re-apply.

(Hmmm, there sure were a lot of dashed-words in there...)

 ~ Chris Innanen
 ~ Nonsanity


On Wed, Mar 16, 2011 at 4:14 AM, Keith Clarke <
keith.clarke at clarkeandclarke.co.uk> wrote:

> Hi Scott,
> Thanks for the response, comprehensive clarification and the link to the
> newsletter and hence, your demo stacks - all really useful stuff.
>
> I see now that managing these custom stack window shapes is (without
> wishing to sound critical of LiveCode) very similar to managing rounded
> rectangles in web pages for IE compatibility - i.e. the nine-image trick.
>
> As I don't need drag-to-resize, I reckon I can create a script-driven,
> rounded rectangle window shape that grows to fit its contents. If I keep the
> background colouring simple I reckon I can adapt a trick I've used on web
> pages into a script:
> 1. Import the 4 corner images but use LiveCode rectangles for the 5
> rectangles that form the central cross;
> 2. Setting the HUD contents to a group and use the group's dimensions (plus
> margins) to set the size of the cross' component rectangles;
>
> Thanks again - oh, and item 8 in the newsletter
> http://runrev.com/newsletter/may/issue70/newsletter3.php has inspired me
> to have a go with adding a resizing preferences drawer, too!
> Best,
> Keith..
>
> On 15 Mar 2011, at 21:51, Scott Rossi wrote:
>
> >
> > For a resizable custom window, you must create a mask image for every
> > size/orientation of window that you'll need.  But a window that a user
> can
> > drag-to-resize is out of the question because you'd have to generate a
> mask
> > image each step of the way during the drag and redraw the window
> repeatedly.
>
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>



More information about the use-livecode mailing list