Dialog Slider not showing default value
Case number: | 845813-991321 |
Topic: | Game: Tools |
Opened by: | bertro |
Status: | Closed |
Type: | Bug |
Opened on: | Saturday, December 17, 2011 - 21:45 |
Last modified: | Thursday, December 29, 2011 - 17:39 |
In LUA v2, the dialog slider object (integer or decimal):
1) does not initially show a default value unless the default value is bigger than the minimum value. If you move the slider a bit, the value will appear. See attached file...
2) the left and right arrows are not working.
Attachment | Size |
---|---|
Test Dialog ouput.png | 68.4 KB |
Here is the code:
function AskVerbose()
local ask = dialog.CreateDialog("Test Dialog")
ask.Instructions = dialog.AddLabel("Set these values:")
ask.Invert = dialog.AddCheckbox("Invert", true)
ask.Iterations = dialog.AddSlider("Iterations", 1, 1, 25, 0) -- (default, min, max, 1=Int/0=Decimal)
ask.Iterations1 = dialog.AddSlider("Iterations1", 2, 2, 25, 0) -- (default, min, max, 1=Int/0=Decimal)
ask.Iterations2 = dialog.AddSlider("Iterations2", 1, 0, 25, 0) -- (default, min, max, 1=Int/0=Decimal)
ask.BandStrength = dialog.AddSlider("Band Strength", 5.3, 0.1, 10.0, 1) -- (default, min, max, 1=Int/0=Decimal)
ask.BandStrength1 = dialog.AddSlider("Band Strength1", 0.1, 0.1, 10.0, 1) -- (default, min, max, 1=Int/0=Decimal)
ask.Comment = dialog.AddTextbox("Comment", "Cool!")
ask.OK = dialog.AddButton("OK", 1)
ask.Cancel = dialog.AddButton("Cancel", 0)
if (dialog.Show(ask) > 0) then
Verbose = true
local tell = dialog.CreateDialog("Test Dialog Results")
if (ask.Invert.value) then
tell.Invert = dialog.AddLabel("Invert=true")
else
tell.Invert = dialog.AddLabel("Invert=false")
end
tell.Iterations = dialog.AddLabel("Iterations="..ask.Iterations.value)
tell.BandStrength = dialog.AddLabel("Band Strength="..ask.BandStrength.value)
tell.Comment = dialog.AddLabel("Comment="..ask.Comment.value)
tell.OK = dialog.AddButton("OK", 1)
dialog.Show(tell)
else
Verbose = false
print("Dialog cancelled")
end
end
AskVerbose()
Status: Open » Closed |
This will be fixed in the next update.
Thanks
Topic: Developer Preview » Game: Tools |
Status: Closed » Closed |
This should be out in a recent update.
Plz post code you have used to create it.