SHOW:
|
|
- or go back to the newest paste.
| 1 | - | os.loadAPI("guiapi")
|
| 1 | + | os.loadAPI("CCGUI")
|
| 2 | ||
| 3 | - | bar = guiapi.newMenu() |
| 3 | + | def = CCGUI.newMenu() |
| 4 | - | cat = guiapi.newMenu() |
| 4 | + | |
| 5 | - | lark = guiapi.newMenu() |
| 5 | + | b1 = CCGUI.newItem() |
| 6 | b2 = CCGUI.newItem() | |
| 7 | - | foo = guiapi.newItem() |
| 7 | + | b3 = CCGUI.newItem() |
| 8 | - | a = guiapi.newItem() |
| 8 | + | b4 = CCGUI.newItem() |
| 9 | - | b = guiapi.newItem() |
| 9 | + | b5 = CCGUI.newItem() |
| 10 | - | c = guiapi.newItem() |
| 10 | + | b6 = CCGUI.newItem() |
| 11 | - | d = guiapi.newItem() |
| 11 | + | b7 = CCGUI.newItem() |
| 12 | - | e = guiapi.newItem() |
| 12 | + | b8 = CCGUI.newItem() |
| 13 | - | f = guiapi.newItem() |
| 13 | + | b9 = CCGUI.newItem() |
| 14 | - | g = guiapi.newItem() |
| 14 | + | |
| 15 | - | h = guiapi.newItem() |
| 15 | + | |
| 16 | - | i = guiapi.newItem() |
| 16 | + | b1:newName("[ 1]")
|
| 17 | - | dog = guiapi.newItem() |
| 17 | + | b1:newType("bp1")
|
| 18 | - | mat = guiapi.newItem() |
| 18 | + | b1:newColour(colours.magenta) |
| 19 | ||
| 20 | - | foo:newType("menu")
|
| 20 | + | b2:newName("[ 0]")
|
| 21 | - | foo:addData(bar) |
| 21 | + | b2:newType("bp2")
|
| 22 | - | foo:newColour(colours.green) |
| 22 | + | b2:newColour(colours.magenta) |
| 23 | ||
| 24 | - | mat:newType("menu")
|
| 24 | + | b3:newName("[-1]")
|
| 25 | - | mat:addData(bar) |
| 25 | + | b3:newType("bp3")
|
| 26 | - | mat:newColour(colours.orange) |
| 26 | + | b3:newColour(colours.magenta) |
| 27 | ||
| 28 | - | cat:newItem(foo) |
| 28 | + | b4:newName("[-2]")
|
| 29 | - | lark:newItem(mat) |
| 29 | + | b4:newType("bp4")
|
| 30 | b4:newColour(colours.magenta) | |
| 31 | - | a:addData(lark) |
| 31 | + | |
| 32 | - | a:newType("menu")
|
| 32 | + | b5:newName("[-3]")
|
| 33 | - | a:newColour(colours.blue) |
| 33 | + | b5:newType("bp5")
|
| 34 | b5:newColour(colours.magenta) | |
| 35 | - | b:newColour(colours.lightBlue) |
| 35 | + | |
| 36 | b6:newName("[-4]")
| |
| 37 | - | c:newName("Quit")
|
| 37 | + | b6:newType("bp6")
|
| 38 | - | c:newType("quit")
|
| 38 | + | b6:newColour(colours.magenta) |
| 39 | - | c:newColour(colours.lime) |
| 39 | + | |
| 40 | b7:newName("[-5]")
| |
| 41 | - | d:newName("Message box!")
|
| 41 | + | b7:newType("bp7")
|
| 42 | - | d:addData("This is")
|
| 42 | + | b7:newColour(colours.magenta) |
| 43 | - | d:addData("something helpful")
|
| 43 | + | |
| 44 | - | d:newType("msgbox")
|
| 44 | + | b8:newName("[-6]")
|
| 45 | - | d:newColour(colours.magenta) |
| 45 | + | b8:newType("bp8")
|
| 46 | b8:newColour(colours.magenta) | |
| 47 | - | e:newName("Input Box!")
|
| 47 | + | |
| 48 | - | e:addData("Enter")
|
| 48 | + | b9:newName("[-7]")
|
| 49 | - | e:addData("something")
|
| 49 | + | b9:newType("bp9")
|
| 50 | - | e:newType("inpbox")
|
| 50 | + | b9:newColour(colours.magenta) |
| 51 | - | e:newColour(colours.magenta) |
| 51 | + | |
| 52 | ||
| 53 | - | dog:newType("menu")
|
| 53 | + | def:newItem(b1) |
| 54 | - | dog:addData(cat) |
| 54 | + | def:newItem(b2) |
| 55 | - | dog:newColour(colours.pink) |
| 55 | + | def:newItem(b3) |
| 56 | - | bar:newItem(dog) |
| 56 | + | def:newItem(b4) |
| 57 | - | bar:newItem(a) |
| 57 | + | def:newItem(b5) |
| 58 | - | bar:newItem(b) |
| 58 | + | def:newItem(b6) |
| 59 | - | bar:newItem(d) |
| 59 | + | def:newItem(b7) |
| 60 | - | bar:newItem(e) |
| 60 | + | def:newItem(b8) |
| 61 | - | bar:newItem(c) |
| 61 | + | def:newItem(b9) |
| 62 | - | bar:newItem(g) |
| 62 | + | |
| 63 | - | bar:newItem(h) |
| 63 | + | |
| 64 | - | bar:newItem(i) |
| 64 | + | bp = def:draw() |
| 65 | - | lark:newItem(foo) |
| 65 | + | if bp =="bp1" then CCGUI.msgBox({"Going to 1","They see me rollin","They waitin"}); end
|
| 66 | if bp =="bp2" then CCGUI.msgBox({"Going to 0"}); end
| |
| 67 | if bp =="bp3" then CCGUI.msgBox({"Going to -1"}); end
| |
| 68 | - | stype, data = cat:draw() |
| 68 | + | if bp =="bp4" then CCGUI.msgBox({"Going to -2"}); end
|
| 69 | - | if stype =="inpbox" then guiapi.msgBox({"You said :", guiapi.inpBox(data)}); end
|
| 69 | + | if bp =="bp5" then CCGUI.msgBox({"Going to -3"}); end
|
| 70 | - | if stype =="quit" then term.clear(); term.setCursorPos(1,1); break end |
| 70 | + | if bp =="bp6" then CCGUI.msgBox({"Going to -4"}); end
|
| 71 | if bp =="bp7" then CCGUI.msgBox({"Going to -5"}); end
| |
| 72 | if bp =="bp8" then CCGUI.msgBox({"Going to -6"}); end
| |
| 73 | if bp =="bp9" then CCGUI.msgBox({"Going to -7"}); end
| |
| 74 | end |