diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/LSLGuiMess.lua | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/lib/LSLGuiMess.lua b/lib/LSLGuiMess.lua index 44eae67..ff6d2f8 100644 --- a/lib/LSLGuiMess.lua +++ b/lib/LSLGuiMess.lua | |||
@@ -34,19 +34,23 @@ llSetTouchText(string text) | |||
34 | local buttCount = 12 * 8 | 34 | local buttCount = 12 * 8 |
35 | local w = 80 | 35 | local w = 80 |
36 | local h = 20 | 36 | local h = 20 |
37 | local l = 4 | ||
37 | local x = 2 + (((1 - 1) % 3) * w) | 38 | local x = 2 + (((1 - 1) % 3) * w) |
38 | local y = h * math.floor((1 - 1) / 3) | 39 | local y = h * math.floor((1 - 1) / 3) |
39 | local dialog = skang.window(4 + w * 3, (h * 3) + (h * math.ceil((buttCount + 1) / 3)), message, 'llDialogWindow') | 40 | local dialog = skang.window(4 + w * 3, (h * l) + (h * math.ceil((buttCount + 1) / 3)), message, 'llDialogWindow') |
40 | 41 | ||
41 | skang.thingasm{dialog, 'message', 'Dialog message', types = 'widget', widget='"textbox", "", ' .. 2 .. ', ' .. 2 .. ', ' .. (w * 3) .. ', ' .. (h * 3)} | 42 | skang.thingasm{dialog, 'message', 'Dialog message', types = 'widget', widget='"textbox", "", ' .. 2 .. ', ' .. 2 .. ', ' .. (w * 3) .. ', ' .. (h * l)} |
42 | for i = 1, buttCount do | 43 | for i = 1, buttCount do |
43 | x = 2 + (((i - 1) % 3) * w) | 44 | x = 2 + (((i - 1) % 3) * w) |
44 | y = (h * 3) + (h * math.floor((i - 1) / 3)) | 45 | y = 2 + (h * l) + (h * math.floor((i - 1) / 3)) |
45 | skang.thingasm{dialog, 'button' .. i, 'Selects button ' .. i, types = 'widget', widget='"button", "' .. i .. '", ' .. x .. ', ' .. y .. ', ' .. w .. ', ' .. h} | 46 | skang.thingasm{dialog, 'button' .. i, 'Selects button ' .. i, types = 'widget', widget='"button", "' .. i .. '", ' .. x .. ', ' .. y .. ', ' .. w .. ', ' .. h} |
46 | skang.hide(dialog.W['button' .. i].Cwidget) | 47 | skang.hide(dialog.W['button' .. i].Cwidget) |
47 | end | 48 | end |
48 | x = 2 + (((3 - 1) % 3) * w) | 49 | x = 2 + (((3 - 1) % 3) * w) |
49 | y = (h * 3) + (h * math.floor((buttCount + 1) / 3)) | 50 | y = 2 + (h * l) + (h * math.floor((buttCount + 1) / 3)) |
51 | -- TODO - LL's V3 has a block button to. Dunno how I'll deal with blocking stuff, think about that later. | ||
52 | -- TODO - Not sure of the point of an ignore button once I have close buttons in the window titles. | ||
53 | -- Though I guess if it's showing multiple dialogs, then you could ignore individual ones. | ||
50 | skang.thingasm{dialog, 'ignore', 'Ignore this dialog', types = 'widget', widget='"button", "ignore", ' .. x .. ', ' .. y .. ', ' .. w - 20 .. ', ' .. h} | 54 | skang.thingasm{dialog, 'ignore', 'Ignore this dialog', types = 'widget', widget='"button", "ignore", ' .. x .. ', ' .. y .. ', ' .. w - 20 .. ', ' .. h} |
51 | dialog.W['ignore'].action = 'dialogIgnore()' | 55 | dialog.W['ignore'].action = 'dialogIgnore()' |
52 | skang.thingasm{dialog, 'switch', 'Switch to next dialog', types = 'widget', widget='"button", ">", ' .. (x + w - 20) .. ', ' .. y .. ', ' .. 20 .. ', ' .. h} | 56 | skang.thingasm{dialog, 'switch', 'Switch to next dialog', types = 'widget', widget='"button", ">", ' .. (x + w - 20) .. ', ' .. y .. ', ' .. 20 .. ', ' .. h} |