





🌟 Special thanks to our amazing supporters:
✨ $10 Tier: [Geeks Love Detail]
🌈 $5 Tier: [Benedikt][David Martínez Martí]
Hello, a wave of illness has afflicted the team these last few weeks, but things are starting to pick up again. With the collective health of the office back to normal, progress is advancing well on the features for 0.15.
function create_gui(player)
player.gui.left.add
{
type = "sprite-button",
name = "My_mod_button",
sprite = "item/my-mod-item",
style = "My-mod-button-style"
}
player.gui.left.add
{
type = "frame",
name = "My_mod_frame",
caption = "My mod frame",
style = "My-mod-frame-style"
}
end
This is very simple, and easy enough to understand, but will require each mod to define their own style, or use the LuaStyle script interface to set their style during the game. The issue of odd styling comes from perhaps there being no built in simple and effective styling mods can use. Another problem is that with multiple mods installed, there is no overall control about how and where the Gui elements interact and 'fight' with one another for space.
So to begin to help this, I've implemented an optional Lua script that modders can use, which should help unify things, as well as being simple to use for anybody new.
require("mod-gui")
function create_gui(player)
mod_gui.get_button_flow(player).add
{
type = "sprite-button",
name = "My_mod_button",
sprite = "item/my-mod-item",
style = mod_gui.button_style
}
mod_gui.get_frame_flow(player).add
{
type = "frame",
name = "My_mod_frame",
caption = "My mod frame",
style = mod_gui.frame_style
}
end
Which can look something like this:
[ 6081 ]
[ 1481 ]
[ 2067 ]