User Tools

Site Tools


crpl:docs:setscreenmode

<- CRPL reference <- Screen Commands

SetScreenMode

ArgumentsResultNotation
on or off? b1 –

Description

If the argument is TRUE, sets this CRPL core in a special mode that fixes it to the screen, instead of the map. From now on, the core's position should be set with SetScreenCoords or SetScreenPixelCoords. The old SetCurrentCoords and related will still have an effect, The core will be temporarily moved for one frame, but the core will be returned to the screen before it is painted to the screen. To avoid any sort of weird problem, you should ensure that Cores in this mode do not take map space, and are not nullifiable.

The origin is in the lower left corner.

Note that unlike for normal cores, where the minimal Z position for images is -499, for cores on screen it's only -399.

Examples

  #Puts the score, writ large, in the upper left corner of the screen, just behind the visibility button.
  "SCORE: " GetScore concat SetText

:awake
  #Stick the core to the screen
  TRUE SetScreenMode
  #Goto the upper left corner
  0 1 SetScreenCoords
  #Choose how the text looks
  2 SetTextSize
  "UpperLeft" SetTextAnchor
crpl/docs/setscreenmode.txt · Last modified: 2021/02/05 11:45 by Karsten75