mirror of
https://github.com/rollerozxa/voxelmanip-wiki
synced 2024-05-05 08:01:02 -07:00
Game Theme Reimplementation: edit
This commit is contained in:
parent
356f1b75cf
commit
0ecbf472ce
21
pages/Game_Theme_Reimplementation.md
Normal file
21
pages/Game_Theme_Reimplementation.md
Normal file
@ -0,0 +1,21 @@
|
||||
The part of the main menu that controls the game theming aspects is implemented with `mm_game_theme`, in `game_theme.lua`. If you wish to rebrand the main menu, dealing with the complexity of this implementation can be rather unnecessary if you just want a single background and header that shows up on every tab.
|
||||
|
||||
What `mm_game_theme` does is essentially just abstract away calls to `core.set_background`, a function which controls background textures, but also header and footer textures. See the entry for it in `menu_lua_api.md`:
|
||||
|
||||
```
|
||||
* `core.set_background(type,texturepath,[tile],[minsize])`
|
||||
* `type`: "background", "overlay", "header" or "footer"
|
||||
* `tile`: tile the image instead of scaling (background only)
|
||||
* `minsize`: minimum tile size, images are scaled to at least this size prior
|
||||
doing tiling (background only)
|
||||
```
|
||||
|
||||
This is an example of a minimal reimplementation (from Voxelmanip Classic) that shows a static, untiled background and a header from the base textures directory in the main menu:
|
||||
|
||||
```lua
|
||||
core.set_background('header', defaulttexturedir .. "menu_header.png")
|
||||
core.set_background('background', defaulttexturedir .. "menu_bg.png")
|
||||
core.set_clouds(false)
|
||||
```
|
||||
|
||||
This would be put in the `init_globals()` function in place of calls to `mm_game_theme`.
|
Loading…
x
Reference in New Issue
Block a user