Thanks for the reply.
In my game I’m declaring a button like this
local widget = require "widget" widget.setTheme( "myWidgetThemes" ) local button = widget.newButton{ style = "mainMenuSmall1", label = "Water and Lava", onRelease = highLightSelected }
and in myWidgetThemes.lua the theme.button table can contain several ‘styles’ of buttons.
themeTable.button = { -- if no style is specified, will use default: -- default = assetDir .. "button/default.png", -- over = assetDir .. "button/over.png", -- width = 278, height = 46, -- font = "Helvetica-Bold", -- fontSize = 20, -- labelColor = { default={0}, over={255} }, -- emboss = true, -- button styles mainMenuBig = { font = "Dwarf\_font", fontSize = 48, yOffset = -2, labelColor = { default={ 255 } , over={ 255, 204, 70, 255} }, defaultColor = { 255, 204, 70, 255 }, overColor = { 0 }, emboss = true, cornerRadius = 4, width = 240, }, mainMenuSmall = { font = "Dwarf\_font", fontSize = 24, yOffset = -2, labelColor = { default={ 255 } , over={ 255, 204, 70, 255} }, defaultColor = { 255, 204, 70, 255 }, overColor = { 0 }, emboss = true, cornerRadius = 2, width =160, height = 36, }, }
Basically it allowed the user to have a theme containing more than one button which made a lot of sense.
With widgets 2.0 it seems like you’re either forced to only have one type of button or styling each widget manually, leading to a lot of copy pasting and lethargic code.