On 12 April 2013 03:31, James Paige <[email protected]> wrote: > On Fri, Apr 12, 2013 at 03:18:15AM +1200, Ralph Versteegen wrote: >> On 12 April 2013 03:01, <[email protected]> wrote: >> > james >> > 2013-04-11 08:01:07 -0700 (Thu, 11 Apr 2013) >> > 57 >> > Add a pair of functions to return the current resolution >> > --- >> > U wip/common.bi >> > U wip/common.rbas >> >> This may escalate quickly! > > I don't doubt it for a moment :) > >> BTW, my intention was that the resolution would be conveyed whereever >> possible by the dimensions of the root slice. (This pair of functions >> is still useful, of course) > > Yes. I made those functions for something I am working on in custom. I > was not planning on exposing plotscripting commands for them.
Whatever you're doing in Custom, I wonder whether it can be done using slices instead ;) (But of course game and editor resolution should be independent) Actually, to be honest I am a little concerned about using slice collections too pervasively in Custom for GUI elements which change a lot depending on editor state, as won't slice manipulation code be lengthy and less clear compared to drawing stuff directly where variability is typical which simple, eg. "IF x THEN textcolor y,0". On the other hand I suppose there are also things which will be simplified. I wouldn't know how to organise the map editor. A single slice collection with separate children for each editing mode, or separate collections? Assuming the earlier, should stuff like the position of the tool buttons be copied into each mode-specific child, or separate with some code to specialise visibility and position as necessary? >> Hmm... UpdateScreenSlice updates the slice of ScreenSlice, which is a >> special slice that I completely forgot that we had (it's not in the >> slice tree), but it's only used in the slice editor. It ought to >> update the root slice too, and be called from more places including >> when playing a game. Might as well call it every tick from Game's main >> loop, to support the !+R debug key. > > Ooh, interesting. Yes, that does seem important. > > --- > James > _______________________________________________ > Ohrrpgce mailing list > [email protected] > http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org _______________________________________________ Ohrrpgce mailing list [email protected] http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org
