User Tools

Site Tools


macros:example:colourchasechanger_v2

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
macros:example:colourchasechanger_v2 [2018/06/25 18:14]
icke_siegen
macros:example:colourchasechanger_v2 [2020/04/05 10:02]
icke_siegen [functions]
Line 20: Line 20:
   * [[macros:​function:​Palette.ApplyPalette]]   * [[macros:​function:​Palette.ApplyPalette]]
   * [[macros:​function:​actionscript.setproperty]]   * [[macros:​function:​actionscript.setproperty]]
-  * [[macros:​function:​Palette.StoreCurrentPaletteReplace]]+  * [[macros:​function:​Palette.StoreCurrentPaletteReplace]] ​-- alternatively [[macros:​function:​Palette.MergeCurrentPalette]] (see [[#​explanation]])
   * [[macros:​function:​Programmer.Editor.Clear]]   * [[macros:​function:​Programmer.Editor.Clear]]
  
Line 79: Line 79:
   * ''​Palette.ApplyPalette("​Location=Colours,​1,​16",​ false)''​ selects the colour palette on the first page of the Colours workspace window, 16th slot   * ''​Palette.ApplyPalette("​Location=Colours,​1,​16",​ false)''​ selects the colour palette on the first page of the Colours workspace window, 16th slot
   * ''​ActionScript.SetProperty("​Palette.CurrentPaletteHandle",​ handle:"​Location=Colours,​2,​1"​)''​ sets the colour palette on the second page on the 1th slot into the desks memory, i.e. makes it the current palette handle for the next actions   * ''​ActionScript.SetProperty("​Palette.CurrentPaletteHandle",​ handle:"​Location=Colours,​2,​1"​)''​ sets the colour palette on the second page on the 1th slot into the desks memory, i.e. makes it the current palette handle for the next actions
-  * ''​Palette.StoreCurrentPaletteReplace()''​ replaces the palette in the desks memory - the active palette handle - with what's in the programmer+  * ''​Palette.StoreCurrentPaletteReplace()''​ replaces the palette in the desks memory - the active palette handle - with what's in the programmer ​\\ **HINT:** if you instead want to replace only a part of the palette then you need to merge it instead of replace the entire palette. Use [[macros:​function:​palette.mergecurrentpalette|]] instead
   * ''​Programmer.Editor.Clear(...)''​ clears the programmer (for the parameters see [[macros:​function:​Programmer.Editor.Clear]] - clears according to the current clear mask, clearing the presets as setglobally,​ in the globally set clear/​release time)    * ''​Programmer.Editor.Clear(...)''​ clears the programmer (for the parameters see [[macros:​function:​Programmer.Editor.Clear]] - clears according to the current clear mask, clearing the presets as setglobally,​ in the globally set clear/​release time) 
   * repeat the above steps, now with ''​Palette.ApplyPalette("​Location=Colours,​1,​17",​ false)''​ and ''​ActionScript.SetProperty("​Palette.CurrentPaletteHandle",​ handle:"​Location=Colours,​2,​2"​)'',​ in order to replace the background colour   * repeat the above steps, now with ''​Palette.ApplyPalette("​Location=Colours,​1,​17",​ false)''​ and ''​ActionScript.SetProperty("​Palette.CurrentPaletteHandle",​ handle:"​Location=Colours,​2,​2"​)'',​ in order to replace the background colour
macros/example/colourchasechanger_v2.txt · Last modified: 2020/04/05 10:02 by icke_siegen