Theme pack for editor

From Moondust Wiki
Jump to navigation Jump to search

The Editor's user interface can be easily customized, replacing some or all of the images and icons. In Moondust, this is implemented via theme packs. The theme packs are a collection of image and setting files that replace the default UI elements with the pack's contents.


Structure

All themes have a structure:


themes/

  • <ThemeDir>/
    • theme.ini
    • img1.png
    • img2.png
      • icons2/
      • myIcon3.png
      • MyIcon5.png
      • ...
    • ...


Images can be placed into sub-folders as necessary in theme folders, allowing for the concise organization.

theme.ini is the theme config file that defines which images are replaced in the editor. Reference of theme.ini file

theme.ini reference

This is a full reference to the theme.ini file which allows you to customize any built-in graphics. All values which aren't present in your theme.ini file will cause usage of built-in stuff without any customization, so you need to set up the values which you wish to customize.

Is a main section of file

[ main ]
Parameter Allowed values Example value Description
theme-name string theme-name = "My beautiful theme" The understandable name of theme
default-splash file path default-splash = "my_splash.png" The default splash image which will be used if config pack is not have own
style-sheet file path style-sheet = "style.css" Optional CSS file to recolor interface of The Editor. See CSS reference here.

Replace some window and file type icons

[ file-icons ]
Parameter Allowed values Example value Description
level-16 string level-16 = "fileicons/level-16.png" New -> Level
level-24 string level-24 = "fileicons/level-24.png" Level icon
world-16 string world-16 = "fileicons/world-16.png" New -> World
world-24 string world-24 = "fileicons/world-24.png" World icon
npc-16 string npc-16 = "fileicons/npc-16.png" New -> NPC, NPC Editor, NPC dialog, etc.

Icons of file I/O toolbar icons

[ file-io ]
Parameter Allowed values Example value Description
file-open string file-open = Open exist file
file-new string file-new = Create new file
file-save string file-save = Save file
file-save-as string file-save-as = Save file as
file-reload string file-reload = Reload current file

Replacement of icons of some tools

[ icons ]
Parameter Allowed values Example value Description
debugger string debugger = Debugger tool (inside View menu)
bookmarks string bookmarks = Bookmarks item box
tileset-box string tileset-box = Tileset item box

Scene special cursors

[ cursors ]
Parameter Allowed values Example value Description
normal string normal = Normal arrow cursor
normal-x >=0 normal-x = Normal cursor hot spot x (from 0 to width-1)
normal-y >=0 normal-y = Normal cursor hot spot y (from 0 to height-1)
resizing string resizing = Cursor of resizing mode
resizing-x >=0 resizing-x = hot spot x (from 0 to width-1)
resizing-y >=0 resizing-y = hot spot y (from 0 to height-1)
pasting string pasting = Pasting mode cursor
pasting-x >=0 pasting-x = hot spot x (from 0 to width-1)
pasting-y >=0 pasting-y = hot spot y (from 0 to height-1)
placing string placing = Placing mode cursor
placing-x >=0 placing-x = hot spot x (from 0 to width-1)
placing-y >=0 placing-y = hot spot y (from 0 to height-1)
erasing string erasing = Rubber, this cursor displaying when enabled erasing mode
erasing-x >=0 erasing-x = hot spot x (from 0 to width-1)
erasing-y >=0 erasing-y = hot spot y (from 0 to height-1)
flood-fill string flood-fill = Flood fill cursor
flood-fill-x >=0 flood-fill-x = hot spot x (from 0 to width-1)
flood-fill-y >=0 flood-fill-y = hot spot y (from 0 to height-1)
square-fill string square-fill = Square fill cursor
square-fill-x >=0 square-fill-x = hot spot x (from 0 to width-1)
square-fill-y >=0 square-fill-y = hot spot y (from 0 to height-1)
line-fill string line-fill = Line drawing cursor
line-fill-x >=0 line-fill-x = hot spot x (from 0 to width-1)
line-fill-y >=0 line-fill-y = hot spot y (from 0 to height-1)

Common edit process tools

[ edit-common ]
Parameter Allowed values Example value Description
playmusic string playmusic = Music player icon
grid-snap string grid-snap = Grid snap switch
show-grid string show-grid = Grid showing switch
camera-grid string camera-grid = Camera grid showing switch
animation string animation = Animation switch
search string search = Search icon
pencil string pencil = Edit of custom tileset in the tileset item box

Clipboard icons

[ edit-clipboard ]
Parameter Allowed values Example value Description
copy string copy = Copy (toolbar icon)
copy-16 string copy-16 = Duplicate layer icon
cut string cut = Cut (toolbar icon)
paste string paste = Paste (toolbar icon)

History manager icons

[ edit-history ]
Parameter Allowed values Example value Description
undo string undo = Cancel last action
redo string redo = Repeat canceled action

Editing mode switch icons

[ edit-mode ]
Parameter Allowed values Example value Description
selection string selection = Switch into default selecting mode
selection-only string selection-only = Switch into selecting mode without grabbing and moving of items
hand-drag string hand-drag = Scroll screen by hand drag
erasing string erasing = Erazing mode, remove all clicked or selected by rectangle items

Icons that appear when you resize something

[ edit-resizing ]
Parameter Allowed values Example value Description
accept string accept = Accept current size and position
cancel string cancel = Cancel resizing process, leave current settings

Icons that appear when placing mode is in process

[ edit-place ]
Parameter Allowed values Example value Description
square-fill string square-fill = Square fill mode switch
circle-fill string circle-fill = Circle fill mode switch
line-tool string line-tool = Line draw mode switch
flood-fill string flood-fill = Flood fill mode switch
overwrite-mode string overwrite-mode = Overwrite mode switch
properties string properties = Show properties icon

Toolbar icons

[ edit-zoom ]
Parameter Allowed values Example value Description
zoom-reset string zoom-reset = Reset zoom to 1:1
zoom-in string zoom-in = Increase zoom
zoom-out string zoom-out = Decrease zoom


Level specific tools

[ level ]
Parameter Allowed values Example value Description
item-browser string item-browser = Level items browser
section-settings string section-settings = Show/hide section settings
section-settings-16 string section-settings-16 = Section settings toolbox icon (old)
doors string doors = Warps and doors toolbox
layers string layers = Layers toolbox
events string events = Events toolbox
water string water = Draw physic environment "Water"
quicksand string quicksand = Draw physic environment "Quicksand"
player1 string player1 = Switch into placing of start point of first player
player2 string player2 = Switch into placing of start point of second player

World map specific tools

[ world ]
Parameter Allowed values Example value Description
item-browser string item-browser = World map items browser
music-boxes string music-boxes = World map music list

Replacing of player point images. You can display any available image (in PNG-format) of any size, image will be attached to bottom-center automatically.

[ level-items ]
Parameter Allowed values Example value Description
player-point string player-point = Common start point of player
player1 string player1 = Start point of firts player
player2 string player2 = Start point of second player

Switch of current sections. Section switch is a line of numbers of available to using sections

[ section-numbers ]
Parameter Allowed values Example value Description
section-*-selected string section-*-selected = Selected section number (Replace "*" by number from 0 to 20)
section-*-default string section-*-default = Normal section number (Replace "*" by number from 0 to 20)
section-goto-left-bottom string section-goto-left-bottom = Go to left-bottom of the section
section-goto-left-top string section-goto-left-top = Go to left-top of the section
section-goto-top-right string section-goto-top-right = Go to right-top of the section
section-goto-right-bottom string section-goto-right-bottom = Go to right-bottom of the section
section-reset-pos string section-reset-pos = [Deprecated] section scroll position reset position

Level specific locks by item type

[locks-level ]
Parameter Allowed values Example value Description
blocks-free string blocks-free = Default state of all blocks
blocks-locked string blocks-locked = Locked state of all blocks
bgo-free string bgo-free = Default state of all BGO
bgo-locked string bgo-locked = Locked state of BGO
npc-free string npc-free = Default state of all NPC
npc-locked string npc-locked = Locked state of NPC
warps-free string warps-free = Default state of all warps
warps-locked string warps-locked = Locked state of warps
physenv-free string physenv-free = Default state of all physics environment zones
physenv-locked string physenv-locked = Locked state of physics environment zones

World map specific locks by item type

[ locks-world ]
Parameter Allowed values Example value Description
tiles-free string tiles-free = Default state of all terrain tiles
tiles-locked string tiles-locked = Locked state of all terrain tiles
scenery-free string scenery-free = Default state of all sceneries
scenery-locked string scenery-locked = Locked state of all sceneries
paths-free string paths-free = Default state of all paths
paths-locked string paths-locked = Locked state of all paths
levels-free string levels-free = Default state of all levels
levels-locked string levels-locked = Locked state of all levels
musicboxes-free string musicboxes-free = Default state of all music boxes
musicboxes-locked string musicboxes-locked = Locked state of all music boxes

Overwrite default dummy images of items

[ items ]
Parameter Allowed values Example value Description
level-background string level-background = Dummy background image
level-bgo string level-bgo = Dummy background object image
level-block string level-block = Dummy block image
level-npc string level-npc = Dummy NPC image
world-path string world-path = Dummy path image
world-scenery string world-scenery = Dummy scenery image
world-tile string world-tile = Dummy tile image
world-level string world-level = Dummy level image
world-musicbox string world-musicbox = Music box item image

Alternative icons for a dark palette

Since July 27, 2020, an ability to switch the dark palette was introduced. Some icons may look hard when the UI palette is dark. You can give an alternative picture that will be friendly to dark palettes. Use fields with the "-dark" suffix to provide an alternative icon for a dark palette (for example, the main icon picture has the "grid-snap" field. An alternative dark variant will have the "grid-snap-dark" name).

Notes

Themes can be connected to the config pack by the "default-theme" value in the [gui] section of "main.ini", located in the config pack.