<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Mar 12, 2016 at 8:05 PM,  <span dir="ltr"><<a href="mailto:subversion@hamsterrepublic.com" target="_blank">subversion@hamsterrepublic.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">teeemcee<br>
2016-03-12 20:05:27 -0800 (Sat, 12 Mar 2016)<br>
1750<br>
Fix Select slices updating child visibility when drawing instead of refreshing<br>
<br>
This change affects when a script will see up-to-date visibility of select<br>
child slices. You still need to do something to cause the slice to be refreshed.<br>
This also affects "slice at pixel" and "find colliding slice" called with<br>
visibleonly=true.<br>
<br>
ChildRefresh is now called even on non-visible slices by DrawSlice, but it<br>
takes an additional visibleonly argument to skip refreshing the size and<br>
position in that case. This is both to avoid unneeded processing for hidden<br>
slices and to exactly match the previous behaviour for non-select slices<br>
(although I really hope noone is relying on the size of hidden slices not being<br>
updated!)<br></blockquote><div><br></div><div>I know I am not worried. All of my invisible-slice-voodoo is using container slices, not selects. <br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Slices shouldn't modify themselves when drawn, aside from calling ChildRefresh,<br>
so that we can draw slices more or less than expected without breaking anything<br>
as long as they're refreshed somehow (e.g. RefreshSliceTreeScreenPos()).<br>
For example, slice velocity is applied in AdvanceSlice, not DrawSlice.<br>
In future this will allow things like frame skpping and drawing slices multiple<br>
times on small wrapping maps.<br></blockquote><div><br></div><div>Will this allow multiple views of the same map? I had some crazy ideas a while back about split screen multiplayer, but gave up on them at the time because I couldn't do that with mapslices. <br></div><div><br> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Unfortunately other slice types don't entirely obey the pure-draw-function rule.<br>
Both rect and sprite slices delay loading styles or sprites until the first<br>
draw, which causes modifications.<br>
Even worse, auto-advancing dissolving sprites advance when being drawn; which<br>
is definitely the wrong place to do so.<br>
Text slices toggle .insert_tog and recompute .line_count when drawn. The latter<br>
doesn't directly affect drawing but is related to the bug that the height of<br>
text slices isn't recomputed when their .line_count changes (e.g. because their<br>
width changes), because that's only done when ChangeTextSlice is called.<br></blockquote><div><br></div></div><br></div></div>