I'm making a somewhat obscure and out-of-print game, Creatures & Cultists, available on Tabletop Simulator. The player board has various text-boxes. For two of those text-boxes, I need the text to reduce in size, when there's not enough room to display what the player types in.
I've made programs in C# and there's a built-in auto-resize feature that can be toggled on for fields like text-boxes. Does the Tabletop Simulator LUA & API allow for such a feature?
I'm using the text-box template from Mr. Stump.
Parameters for one of the text-boxes:
--name Credo
{
pos = {0.35,0.12,0.93},
rows = 1,
width = 6000,
font_size = 450,
label = "",
value = "Enter in Cult Credo Here",
alignment = 2,
rotation = {0,0,0},
height = 500,
scale = {0.1,0.0075,0.1},
},
Those parameters are passed to the create_text-box function from Mr. Stump:
function create_textboxes()
for i, data in ipairs(ref_buttonData.house_inputs) do
--Sets up reference function
local funcName = "textboxes"..i
local func = function(_,_,val,sel) click_textboxes(i,val,sel) end
self.setVar(funcName, func)
self.createInput({
input_function = funcName,
function_owner = self,
label = data.label,
alignment = data.alignment,
position = data.pos,
scale = buttonScale,
width = data.width,
height = (data.font_size*data.rows)+24,
font_size = data.font_size,
color = buttonColor,
font_color = buttonFontColor,
value = data.value,
rotation = data.rotation,
height = data.height,
scale = data.scale,
})
end
end
Thanks for any help.