Advertisement
Guest User

Untitled

a guest
Feb 22nd, 2014
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.41 KB | None | 0 0
  1. i have a table of string values for different themes. I want to set this up so that i can use
  2. for -,v in pairs(availableThemes) do
  3. menuStr = v[1]
  4. end
  5.  
  6. when i go through the menu and select a theme, say Water (the default theme)
  7. i can then set a variable called theme to refernce the second value of the availableThemes
  8. which is one of the tables show below.
  9.  
  10. I have tried every way i could think of but nothing worked
  11.  
  12.  
  13.  
  14.  
  15. -- -------- Themes
  16.  
  17. local availableThemes = {
  18. "Water (Default)", defaultTheme,
  19. "Fire", fireTheme,
  20. "Sublime Text 2", st2Theme,
  21. "Midnight", midnightTheme,
  22. "TheOriginalBIT", originalBitTheme,
  23. "Superaxander", superaxanderTheme,
  24. "Forest", forestTheme,
  25. "Night", nightTheme,
  26. "Original", originalTheme
  27. }
  28.  
  29.  
  30. local defaultTheme = { -- Water Theme
  31. background = 0xBEBEBE,
  32. backgroundHighlight = 0xD3D3D3,
  33. prompt = 0x00FFFF,
  34. promptHighlight = 0xADD8E6,
  35.  
  36. err = 0xFF0000,
  37. errHighlight = 0xFFC0CB,
  38.  
  39. editorBackground = 0xBEBEBE,
  40. editorLineHightlight = 0xADD8E6,
  41. editorLineNumbers = 0xBEBEBE,
  42. editorLineNumbersHighlight = 0xD3D3D3,
  43. editorError = 0xFFC0CB,
  44. editorErrorHighlight = 0xFF0000,
  45.  
  46. textColor = 0xFFFFFF,
  47. conditional = 0xFFFF00,
  48. constant = 0xFFA500,
  49. ["function"] = 0xFF00FF,
  50. string = 0xFF0000,
  51. comment = 0x32CD32
  52. }
  53.  
  54.  
  55. local fireTheme = { -- Fire Theme
  56. background=0xBEBEBE,
  57. backgroundHighlight=0xD3D3D3,
  58. prompt=0xFF0000,
  59. promptHighlight=0xFFA500,
  60. err=0xFF0000,
  61. errHighlight=0xFFC0CB,
  62.  
  63. editorBackground=0xBEBEBE,
  64. editorLineHightlight=0xFFA500,
  65. editorLineNumbers=0xBEBEBE,
  66. editorLineNumbersHighlight=0xD3D3D3,
  67. editorError=0xFF0000,
  68. editorErrorHighlight=0xFFC0CB,
  69.  
  70. textColor=0xFFFFFF,
  71. conditional=0xFFFF00,
  72. constant=0xADD8E6,
  73. ["function"]=0xFF00FF,
  74. string=0x0000FF,
  75. comment=0x32CD32
  76. }
  77.  
  78. local st2Theme = { -- Sublime Text 2
  79. background=0xBEBEBE,
  80. backgroundHighlight=0xD3D3D3,
  81. prompt=0xD3D3D3,
  82. promptHighlight=0x0000FF,
  83. err=0xFFA500,
  84. errHighlight=0xFF0000,
  85.  
  86. editorBackground=0xBEBEBE,
  87. editorLineHightlight=0xBEBEBE,
  88. editorLineNumbers=0xBEBEBE,
  89. editorLineNumbersHighlight=0xD3D3D3,
  90. editorError=0xFF0000,
  91. editorErrorHighlight=0xFFA500,
  92.  
  93. textColor=0xFFFFFF,
  94. conditional=0xFF00FF,
  95. constant=0xA020F0,
  96. ["function"]=0xFF00FF,
  97. string=0xFFFF00,
  98. comment=0xD3D3D3
  99. }
  100.  
  101. local midnightTheme = { -- Midnight Theme
  102. background=0xD3D3D3,
  103. backgroundHighlight=0xADD8E6,
  104. prompt=0xADD8E6,
  105.  
  106. promptHighlight=0x0000FF,
  107. err=0xFFA500,
  108. errHighlight=0xFF0000,
  109.  
  110. editorBackground=0x000000,
  111. editorLineHightlight=0x000000,
  112. editorLineNumbers=0x000000,
  113. editorLineNumbersHighlight=0xBEBEBE,
  114. editorError=0xFFC0CB,
  115. editorErrorHighlight=0xFF0000,
  116.  
  117. textColor=0xFFFFFF,
  118. conditional=0xFF00FF,
  119. constant=0xA020F0,
  120. ["function"]=0xFFA500,
  121. string=0xFF0000,
  122. comment=0x32CD32
  123. }
  124.  
  125. local originalBitTheme = { -- The Oringal BIT Theme
  126. background=0xBEBEBE,
  127. backgroundHighlight=0xADD8E6,
  128. prompt=0x0000FF,
  129. promptHighlight=0xADD8E6,
  130. err=0xFF0000,
  131. errHighlight=0xFFA500,
  132.  
  133. editorBackground=0xD3D3D3,
  134. editorLineHightlight=0xADD8E6,
  135. editorLineNumbers=0xADD8E6,
  136. editorLineNumbersHighlight=0x0000FF,
  137. editorError=0xFF0000,
  138. editorErrorHighlight=0xFFA500,
  139.  
  140. textColor=0xFFFFFF,
  141. conditional=0xA020F0,
  142. constant=0x0000FF,
  143. ["function"]=0xA020F0,
  144. string=0x00FF00,
  145. comment=0x32CD32
  146. }
  147.  
  148. local superaxanderTheme = { -- Superaxander Theme
  149. background=0x000000,
  150. backgroundHighlight=0x32CD32,
  151. prompt=0x0000FF,
  152. promptHighlight=0xADD8E6,
  153. err=0xFFFFFF,
  154. errHighlight=0xFF0000,
  155.  
  156. editorBackground=0xD3D3D3,
  157. editorLineHightlight=0xADD8E6,
  158. editorLineNumbers=0xADD8E6,
  159. editorLineNumbersHighlight=0x0000FF,
  160. editorError=0xFFFFFF,
  161. editorErrorHighlight=0xFF0000,
  162.  
  163. textColor=0xFFFFFF,
  164. conditional=0xA020F0,
  165. constant=0xFF0000,
  166. ["function"]=0xFFFF00,
  167. string=0x00FF00,
  168. comment=0x00FFFF
  169. }
  170.  
  171. local forestTheme = { -- Forest Theme
  172. background=0xBEBEBE,
  173. backgroundHighlight=0xD3D3D3,
  174. prompt=0x00FF00,
  175. promptHighlight=0x32CD32,
  176. err=0xFFFF00,
  177. errHighlight=0xFFA500,
  178.  
  179. editorBackground=0xD3D3D3,
  180. editorLineHightlight=0x32CD32,
  181. editorLineNumbers=0xBEBEBE,
  182. editorLineNumbersHighlight=0xD3D3D3,
  183. editorError=0xFFFF00,
  184. editorErrorHighlight=0xFFA500,
  185.  
  186. textColor=0xFFFFFF,
  187. conditional=0xFFFF00,
  188. constant=0xADD8E6,
  189. ["function"]=0xFF00FF,
  190. string=0x0000FF,
  191. comment=0x32CD32
  192. }
  193.  
  194. local nightTheme = { -- Night Theme
  195. background=0x000000,
  196. backgroundHighlight=0xBEBEBE,
  197. prompt=0xBEBEBE,
  198. promptHighlight=0xD3D3D3,
  199. err=0xFF0000,
  200. errHighlight=0xFFA500,
  201.  
  202. editorBackground=0x000000,
  203. editorLineHightlight=0xBEBEBE,
  204. editorLineNumbers=0xBEBEBE,
  205. editorLineNumbersHighlight=0xD3D3D3,
  206. editorError=0xFF0000,
  207. editorErrorHighlight=0xFFA500,
  208.  
  209. textColor=0xFFFFFF,
  210. conditional=0xFFFF00,
  211. constant=0xADD8E6,
  212. ["function"]=0xFF00FF,
  213. string=0xFF0000,
  214. comment=0x32CD32
  215. }
  216.  
  217. local originalTheme = { -- Original Theme
  218. background=0x000000,
  219. backgroundHighlight=0xBEBEBE,
  220. prompt=0xBEBEBE,
  221. promptHighlight=0xD3D3D3,
  222. err=0xFF0000,
  223. errHighlight=0xFFA500,
  224.  
  225. editorBackground=0x000000,
  226. editorLineHightlight=0xBEBEBE,
  227. editorLineNumbers=0xBEBEBE,
  228. editorLineNumbersHighlight=0xD3D3D3,
  229. editorError=0xFF0000,
  230. editorErrorHighlight=0xFFA500,
  231.  
  232. textColor=0xFFFFFF,
  233. conditional=0xFFFF00,
  234. constant=0xADD8E6,
  235. ["function"]=0xFF00FF,
  236. string=0xFF0000,
  237. comment=0x32CD32
  238. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement