COMMUNITY FORUM

simple UI for GE10.0.6 Script

Forum Overview >> Scripting

CategoryScripting
Created28.08.2025 15:02


James Smith (JamesS) 28.08.2025 15:02
Hi

Is there a guide to show how to exactly make a simple UI for a GE script with just a apply button and an number input?

thanks.

Andreas Pantke (Panne) 30.08.2025 13:01
Ja

James Smith (JamesS) 31.08.2025 10:10
Andreas Pantke (Panne), Thank you for your absolutely useful comment, really appreciate it.

Andreas Pantke (Panne) 02.09.2025 10:25
James Smith (JamesS) Bitte gerne

Gamerdesigns (askewdesigns) 06.09.2025 16:44
Honestly the best bet would be check into some existing things with a UI. Not really much doc into the editor scripting sadly

Gtx | Andy (GtX_Andy) 26.09.2025 09:35
Hey James,

Not sure if this is still something you're looking to create but I thought I could give you a couple options that are relatively easy using some Dialogs included with the 10.0 GE...

For a number input you could use the following:

--
--

if InputFloatDialog == nil then
source("ui/InputFloatDialog.lua")
end

local title = "Example Number Input"
local text = "Please enter a number between -10 and 10"

local startingValue = 0
local minimumValue = -10
local maximumValue = 10

local function inputFloatDialogCallback(ok, value)
if ok then
print(string.format("Output: %d", value))
else
print("InputFloatDialog: Closed or Pressed No")
end
end

InputFloatDialog.show(title, text, startingValue, minimumValue, maximumValue, inputFloatDialogCallback)

--
--

Now if you required something such as (x y z) you could use the the Input String Dialog and then convert the string to a vector like such.

--
--

if InputStringDialog == nil then
source("ui/InputStringDialog.lua")
end

local title = "Example String Input"
local text = "Please enter a valid 3-vector 'x x x'."

local defaultValue = ""

local function inputStringDialogCallback(ok, str)
if ok then
local result = string.getVector(str)

if result ~= nil and #result == 3 then
print(string.format("Output: %.3f, %.3f, %.3f", unpack(result)))

return
end

print("Please enter a valid 3-vector, 'x x x'")
else
print("InputStringDialog: Closed or Pressed No")
end
end

InputStringDialog.show(title, text, defaultValue, inputStringDialogCallback)

--
--

Obviously you would change the callback to do with the returned value as you wish.

Now if you're looking to include more input methods, buttons etc then let me know here and when I have a minute I can try and assist you if required otherwise hopefully one of the above methods works for you. :-)

Have fun,
GtX


Andreas Pantke (Panne) 26.09.2025 14:14
Was soll das sein ?

James Smith (JamesS) 30.09.2025 20:04
Gtx | Andy (GtX_Andy) Thank you for the detailed guide, this is what i've been looking for, really helps me out thanks!!


Note: Log in to post. Create a new account here.