[Ohrrpgce] SVN: teeemcee/7792 Fix Select slices updating child visibility when drawing instead of refr

Ralph Versteegen teeemcee at gmail.com
Tue Mar 15 19:26:25 PDT 2016


On 16 March 2016 at 03:08, James Paige <Bob at hamsterrepublic.com> wrote:
>
>
> On Tue, Mar 15, 2016 at 1:52 AM, Ralph Versteegen <teeemcee at gmail.com>
> wrote:
>>
>> On 15 March 2016 at 03:30, James Paige <Bob at hamsterrepublic.com> wrote:
>> >
>> >
>> > On Sat, Mar 12, 2016 at 8:05 PM, <subversion at hamsterrepublic.com> wrote:
>> >>
>> >> teeemcee
>> >> 2016-03-12 20:05:27 -0800 (Sat, 12 Mar 2016)
>> >> 1750
>> >> Fix Select slices updating child visibility when drawing instead of
>> >> refreshing
>> >>
>> >> This change affects when a script will see up-to-date visibility of
>> >> select
>> >> child slices. You still need to do something to cause the slice to be
>> >> refreshed.
>> >> This also affects "slice at pixel" and "find colliding slice" called
>> >> with
>> >> visibleonly=true.
>> >>
>> >> ChildRefresh is now called even on non-visible slices by DrawSlice, but
>> >> it
>> >> takes an additional visibleonly argument to skip refreshing the size
>> >> and
>> >> position in that case. This is both to avoid unneeded processing for
>> >> hidden
>> >> slices and to exactly match the previous behaviour for non-select
>> >> slices
>> >> (although I really hope noone is relying on the size of hidden slices
>> >> not
>> >> being
>> >> updated!)
>> >
>> >
>> > I know I am not worried. All of my invisible-slice-voodoo is using
>> > container
>> > slices, not selects.
>>
>> It took me a moment to work out what you mean, but you must mean
>> storing data as the width and height of a slice. I actually had not
>> thought of that, but it is a very good reason why it wouldn't have
>> been safe to start refreshing hidden slices that previously weren't. I
>> see the slice system as a whole as highly delicate, where changes are
>> likely to break backcompat, unfortunately.
>>
>
> Yeah, I phrased that really badly :)
>
> I use width and height as data for hidden slices all the time, but never in
> situations where those heights would be auto-updated if the slice was
> visible.The hidden data slice is never set to fill, and it is only ever
> parented to a rect, sprite, or container, not to any of the child-shaping
> slice types.

A related thing that irks me is that the script commands forbid
setting the size of sprite sizes or certain dimensions of text slices,
and yet you can freely edit them in the slice editor, plus 'fill
parent' changes them so scripts can indirectly set the sizes of those
"unresizable" slices. Although, if you try to set a sprite size in a
sprite collection, when the sprite is actually loaded (on first draw)
the size of the slice gets reset.


More information about the Ohrrpgce mailing list