xkonti

testprogram v0.2.3

Mar 18th, 2013
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.15 KB | None | 0 0
  1. os.loadAPI("textXAPI")
  2. os.loadAPI("monitorXAPI")
  3.  
  4. btnFill = colors.lightGray
  5. btnText = colors.black
  6. btnDisFill = colors.gray
  7. btnDisText = colors.black
  8.  
  9. mainPage = {}
  10. mainPage[1] = monitorXAPI.StatusBar:new()
  11. mainPage[2] = monitorXAPI.Button:new
  12.                         {   x = 2,
  13.                             y = 3,
  14.                             size = 2,
  15.                             length = 25,
  16.                             text = "Touch to set path1",
  17.                             enabled = true,
  18.                             visible = true,
  19.                             enabledFillColor = btnFill,
  20.                             enabledTextColor = btnText,
  21.                             disabledFillColor = btnDisFill,
  22.                             disabledTextColor = btnDisText,
  23.                             onClickFunction = function() mainPage[1].path = "Zmieniono tytul 1!" end
  24.                         }
  25.  
  26. mainPage[3] = monitorXAPI.Button:new
  27.                         {   x = 2,
  28.                             y = 9,
  29.                             size = 2,
  30.                             length = 25,
  31.                             text = "Touch to set path2",
  32.                             enabled = false,
  33.                             visible = true,
  34.                             enabledFillColor = btnFill,
  35.                             enabledTextColor = btnText,
  36.                             disabledFillColor = btnDisFill,
  37.                             disabledTextColor = btnDisText,
  38.                             onClickFunction = function() mainPage[1].path = "Zmieniono tytul 2!" end
  39.                         }
  40.  
  41.  
  42. monitorXAPI.monitorSetup("right", 0.5, colors.blue)
  43. monitorXAPI.uiEvents(mainPage, 1)
Add Comment
Please, Sign In to add comment