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!) Slices shouldn't modify themselves when drawn, aside from calling ChildRefresh, so that we can draw slices more or less than expected without breaking anything as long as they're refreshed somehow (e.g. RefreshSliceTreeScreenPos()). For example, slice velocity is applied in AdvanceSlice, not DrawSlice. In future this will allow things like frame skpping and drawing slices multiple times on small wrapping maps. Unfortunately other slice types don't entirely obey the pure-draw-function rule. Both rect and sprite slices delay loading styles or sprites until the first draw, which causes modifications. Even worse, auto-advancing dissolving sprites advance when being drawn; which is definitely the wrong place to do so. Text slices toggle .insert_tog and recompute .line_count when drawn. The latter doesn't directly affect drawing but is related to the bug that the height of text slices isn't recomputed when their .line_count changes (e.g. because their width changes), because that's only done when ChangeTextSlice is called. --- U wip/ohrhelp/sliceedit_browse_slicetype.txt U wip/slices.bas U wip/slices.bi _______________________________________________ Ohrrpgce mailing list [email protected] http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org
