gui.h 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733
  1. char *tt_gui = "#line quiet #port init gui 0\n"
  2. "#function gui_link\n"
  3. "{\n"
  4. " #format gui[link] {%+11h} {%3};\n"
  5. " #replace gui[link] {#} { };\n"
  6. " #line sub esc #var gui[link] {\e]68;2;%1;%2\a\e[4;24m$gui[link]\e[24m};\n"
  7. " #return $gui[link]\n"
  8. "}\n"
  9. "#function gui_profile_link\n"
  10. "{\n"
  11. " #format gui[link] {%-24.24s} {%3};\n"
  12. " #line sub esc #var gui[link] {\e]68;2;%1;%2\a\e[4;24m$gui[link]\e[24m};\n"
  13. " #return $gui[link]\n"
  14. "}\n"
  15. "#event {PRESSED SECURE LINK COMMAND MOUSE BUTTON ONE} {%4}\n"
  16. "#event {PRESSED SECURE LINK COMMAND MOUSE BUTTON THREE}\n"
  17. "{\n"
  18. " #line ignore #showme {<138>Group<178>: %6 <138>Command<178>: %4}\n"
  19. "}\n"
  20. "#event {PRESSED SECURE LINK WORLD MOUSE BUTTON ONE}\n"
  21. "{\n"
  22. " world_click {%4}\n"
  23. "}\n"
  24. "#event {PRESSED SECURE LINK WORLD MOUSE BUTTON THREE}\n"
  25. "{\n"
  26. " #line ignore #showme {<138>Group<178>: %6 <138>Command<178>: %4}\n"
  27. "}\n"
  28. "#event {DOUBLE-CLICKED SECURE LINK WORLD MOUSE BUTTON ONE} {gui_connect}\n"
  29. "#button {-2 28 -2 -28;PRESSED MOUSE BUTTON ONE}\n"
  30. "{\n"
  31. " profile_tab_update;\n"
  32. " #screen inputregion -2 28 -2 -28 profile_tab_INPUT;\n"
  33. " profile_tab_set INPUT\n"
  34. "}\n"
  35. "#alias {gui_worlds} {world_tab worlds}\n"
  36. "#alias {gui_sponsors} {world_tab sponsors}\n"
  37. "#alias {world_tab}\n"
  38. "{\n"
  39. " #var gui[world_tab] %1;\n"
  40. " #class world_tab kill;\n"
  41. " #if {{$gui[world_tab]} == {worlds}}\n"
  42. " {\n"
  43. " #draw jade Yellow rounded calign box 1 1 3 13 {@gui_link{COMMAND;{profile_tab_cancel;world_tab worlds;draw_worlds};worlds}};\n"
  44. " #draw jade Azure rounded calign box 1 14 3 26 {@gui_link{COMMAND;{profile_tab_cancel;world_tab sponsors;draw_sponsors};sponsors}}\n"
  45. " };\n"
  46. " #else\n"
  47. " {\n"
  48. " #draw jade Azure rounded calign box 1 1 3 13 {@gui_link{COMMAND;{profile_tab_cancel;world_tab worlds;draw_worlds};worlds}};\n"
  49. " #draw jade Yellow rounded calign box 1 14 3 26 {@gui_link{COMMAND;{profile_tab_cancel;world_tab sponsors;draw_sponsors};sponsors}}\n"
  50. " };\n"
  51. " #draw jade Green rounded calign box -3 1 -1 13 {@gui_link{COMMAND;gui_new;new}};\n"
  52. " #draw jade Green rounded calign box -3 14 -1 26 {@gui_link{COMMAND;#delay 0 #end;exit}}\n"
  53. "}\n"
  54. "#alias {draw_world}\n"
  55. "{\n"
  56. " #if {{%2} == {%3}}\n"
  57. " {\n"
  58. " #draw jade Yellow rounded TALIGN tile %1*2+3 2 %1*2+3 25 @gui_profile_link{WORLD;%2;%2};\n"
  59. " };\n"
  60. " #else\n"
  61. " {\n"
  62. " #draw jade Azure rounded TALIGN tile %1*2+3 2 %1*2+3 25 @gui_profile_link{WORLD;%2;%2}\n"
  63. " }\n"
  64. "}\n"
  65. "#alias {world_click}\n"
  66. "{\n"
  67. " #var gui[active] {%1};\n"
  68. " #nop profile_tab_cancel;\n"
  69. " #if {{$gui[world_tab]} == {worlds}}\n"
  70. " {\n"
  71. " #var gui[new] {$worldlist[%1]};\n"
  72. " draw_worlds\n"
  73. " };\n"
  74. " #else\n"
  75. " {\n"
  76. " #var gui[new] {$info[BANNERS][%1]} {{SSL}{off}} {{FILE}{}} {{CHARACTER}{}} {{PASSWORD}{}} {{INPUT}{}};\n"
  77. " draw_sponsors\n"
  78. " };\n"
  79. " reload_profile_tab;\n"
  80. " #buffer end\n"
  81. "}\n"
  82. "#function {gui_size_left}\n"
  83. "{\n"
  84. " #if {{$gui[world_tab]} == {worlds}}\n"
  85. " {\n"
  86. " #return &worldlist[];\n"
  87. " };\n"
  88. " #else\n"
  89. " {\n"
  90. " #return &info[BANNERS][];\n"
  91. " }\n"
  92. "}\n"
  93. "#alias {gui_draw_left}\n"
  94. "{\n"
  95. " #if {{$gui[world_tab]} == {worlds}}\n"
  96. " {\n"
  97. " draw_worlds\n"
  98. " };\n"
  99. " #else\n"
  100. " {\n"
  101. " draw_sponsors\n"
  102. " }\n"
  103. "}\n"
  104. "#alias {draw_worlds}\n"
  105. "{\n"
  106. " #class world_tab kill;\n"
  107. " #class profile_tab kill;\n"
  108. " #draw tile 4 1 -4 26 { };\n"
  109. " #if {&worldlist[] == 0}\n"
  110. " {\n"
  111. " #return;\n"
  112. " };\n"
  113. " #local index $gui[index];\n"
  114. " #local offset 1;\n"
  115. " #local rows 0;\n"
  116. " #if {&worldlist[] * 2 - $index * 2 > $gui[rows] - 9}\n"
  117. " {\n"
  118. " #math rows ($gui[rows] - 3) & ~1;\n"
  119. " }\n"
  120. " {\n"
  121. " #math rows 6 + &worldlist[] * 2 - $index * 2;\n"
  122. " };\n"
  123. " #draw jade Azure rounded grid table 4 1 $rows 26 { }$worldlist[];\n"
  124. " #loop $gui[index] &worldlist[] index\n"
  125. " {\n"
  126. " draw_world {$offset} {$worldlist[+$index][NAME]} {$gui[active]};\n"
  127. " #math offset $offset + 1;\n"
  128. " #if {$offset * 2 + 1 > $gui[rows] - 6}\n"
  129. " {\n"
  130. " #break;\n"
  131. " };\n"
  132. " }\n"
  133. "}\n"
  134. "#alias {draw_sponsors}\n"
  135. "{\n"
  136. " #class world_tab kill;\n"
  137. " #class profile_tab kill;\n"
  138. " #draw tile 4 1 -4 26 { };\n"
  139. " #if {&info[BANNERS][] == 0}\n"
  140. " {\n"
  141. " #line ignore #showme <faa>Sponsors: No banners found.;\n"
  142. " #return;\n"
  143. " };\n"
  144. " #local index $gui[index];\n"
  145. " #local offset 1;\n"
  146. " #local rows 0;\n"
  147. " #if {&info[BANNERS][] * 2 - $index * 2 > $gui[rows] - 9}\n"
  148. " {\n"
  149. " #math rows ($gui[rows] - 3) & ~1;\n"
  150. " }\n"
  151. " {\n"
  152. " #math rows 6 + &info[BANNERS][] * 2 - $index * 2;\n"
  153. " };\n"
  154. " #draw jade Azure rounded grid table 4 1 $rows 26 { }$info[BANNERS][];\n"
  155. " #loop $gui[index] &info[BANNERS][] index\n"
  156. " {\n"
  157. " draw_world {$offset} {$info[BANNERS][+$index][NAME]} {$gui[active]};\n"
  158. " #math offset $offset + 1;\n"
  159. " #if {$offset * 2 + 1 > $gui[rows] - 6}\n"
  160. " {\n"
  161. " #break\n"
  162. " }\n"
  163. " }\n"
  164. "}\n"
  165. "#alias {gui_tab_forward}\n"
  166. "{\n"
  167. " #screen get INPUT_NAME input_name;\n"
  168. " #switch {{$input_name}}\n"
  169. " {\n"
  170. " #case {{profile_tab_NAME}} {profile_tab_cycle ALIAS NAME};\n"
  171. " #case {{profile_tab_ALIAS}} {profile_tab_cycle HOST ALIAS};\n"
  172. " #case {{profile_tab_HOST}} {profile_tab_cycle PORT HOST};\n"
  173. " #case {{profile_tab_PORT}} {profile_tab_cycle FILE PORT};\n"
  174. " #case {{profile_tab_FILE}} {profile_tab_cycle CHARACTER FILE};\n"
  175. " #case {{profile_tab_CHARACTER}} {profile_tab_cycle PASSWORD CHARACTER};\n"
  176. " #case {{profile_tab_PASSWORD}} {profile_tab_cycle INPUT PASSWORD};\n"
  177. " #case {{profile_tab_INPUT}} {profile_tab_cycle NAME INPUT};\n"
  178. " }\n"
  179. "}\n"
  180. "#alias {gui_tab_backward}\n"
  181. "{\n"
  182. " #screen get INPUT_NAME input_name;\n"
  183. " #switch {{$input_name}}\n"
  184. " {\n"
  185. " #case {{profile_tab_NAME}} {profile_tab_cycle INPUT NAME};\n"
  186. " #case {{profile_tab_ALIAS}} {profile_tab_cycle NAME ALIAS};\n"
  187. " #case {{profile_tab_HOST}} {profile_tab_cycle ALIAS HOST};\n"
  188. " #case {{profile_tab_PORT}} {profile_tab_cycle HOST PORT};\n"
  189. " #case {{profile_tab_FILE}} {profile_tab_cycle PORT FILE};\n"
  190. " #case {{profile_tab_CHARACTER}} {profile_tab_cycle FILE CHARACTER};\n"
  191. " #case {{profile_tab_PASSWORD}} {profile_tab_cycle CHARACTER PASSWORD};\n"
  192. " #case {{profile_tab_INPUT}} {profile_tab_cycle PASSWORD INPUT};\n"
  193. " }\n"
  194. "}\n"
  195. "#alias {profile_tab_cycle}\n"
  196. "{\n"
  197. " profile_tab_pull %2;\n"
  198. " #screen inputregion $gui[input][%1][top_row] $gui[input][%1][top_col] $gui[input][%1][bot_row] $gui[input][%1][bot_col] profile_tab_%1;\n"
  199. " profile_tab_set %1;\n"
  200. "}\n"
  201. "#alias {profile_tab_pull}\n"
  202. "{\n"
  203. " #if {{%1} == {PASSWORD}}\n"
  204. " {\n"
  205. " #cursor get temp;\n"
  206. " #var gui[new][%1] {@b64z{$temp}};\n"
  207. " #unvar temp\n"
  208. " };\n"
  209. " #else\n"
  210. " {\n"
  211. " #cursor get {gui[new][%1]};\n"
  212. " };\n"
  213. " #cursor clear;\n"
  214. " profile_tab %1\n"
  215. "}\n"
  216. "#alias {profile_tab_update}\n"
  217. "{\n"
  218. " #screen get INPUT_NAME input_name;\n"
  219. " #regex {$input_name} {profile_tab_{NAME|ALIAS|INPUT|HOST|PORT|FILE|CHARACTER|PASSWORD}}\n"
  220. " {\n"
  221. " profile_tab_pull &1\n"
  222. " }\n"
  223. "}\n"
  224. "#function gui_toggle\n"
  225. "{\n"
  226. " #if {{%1} == {%2}}\n"
  227. " {\n"
  228. " #return %3\n"
  229. " };\n"
  230. " #return %2\n"
  231. "}\n"
  232. "#alias {profile_tab_set}\n"
  233. "{\n"
  234. " #if {{%1} == {PASSWORD}}\n"
  235. " {\n"
  236. " #local temp {};\n"
  237. " #format temp %+64Z {$gui[new][%1]};\n"
  238. " #cursor set {$temp}\n"
  239. " };\n"
  240. " #else\n"
  241. " {\n"
  242. " #cursor set {$gui[new][%1]};\n"
  243. " }\n"
  244. "}\n"
  245. "#alias {profile_tab_input}\n"
  246. "{\n"
  247. " #var gui[input][%5] {{top_row}{%1}{top_col}{%2}{bot_row}{%3}{bot_col}{%4}};\n"
  248. " #if {{%6} == {toggle}}\n"
  249. " {\n"
  250. " #button {%1 %2 %3 %4;PRESSED MOUSE BUTTON ONE}\n"
  251. " {\n"
  252. " #var gui[new][%5] @gui_toggle{$gui[new][%5];on;off};\n"
  253. " profile_tab %5\n"
  254. " }\n"
  255. " };\n"
  256. " #else\n"
  257. " {\n"
  258. " #button {%1 %2 %3 %4;PRESSED MOUSE BUTTON ONE}\n"
  259. " {\n"
  260. " profile_tab_update;\n"
  261. " #screen inputregion %1 %2 %3 %4 profile_tab_%5;\n"
  262. " profile_tab_set %5;\n"
  263. " };\n"
  264. " #event {CATCH RECEIVED INPUT profile_tab_%5}\n"
  265. " {\n"
  266. " profile_tab_pull %5;\n"
  267. " #screen inputregion -2 28 -2 -28 profile_tab_INPUT;\n"
  268. " }\n"
  269. " }\n"
  270. "}\n"
  271. "#function b64z\n"
  272. "{\n"
  273. " #if {{%0} === {}}\n"
  274. " {\n"
  275. " #return {}\n"
  276. " };\n"
  277. " #local temp {};\n"
  278. " #format temp %+64z {%0};\n"
  279. " #return $temp\n"
  280. "}\n"
  281. "#function b64Z\n"
  282. "{\n"
  283. " #if {{%0} === {}}\n"
  284. " {\n"
  285. " #return {}\n"
  286. " };\n"
  287. " #local temp {};\n"
  288. " #format temp %+64Z {%0};\n"
  289. " #return $temp\n"
  290. "}\n"
  291. "#function starout\n"
  292. "{\n"
  293. " #local temp {%0};\n"
  294. " #replace temp {%.} {*};\n"
  295. " #return $temp\n"
  296. "}\n"
  297. "#alias {profile_tab_draw}\n"
  298. "{\n"
  299. " #if {{%5} == {PASSWORD}}\n"
  300. " {\n"
  301. " #var temp @b64Z{$gui[new][%5]};\n"
  302. " #draw jade Silver rounded talign box %1 %2 %3 %4 {@starout{$temp}};\n"
  303. " #unvar temp\n"
  304. " };\n"
  305. " #else\n"
  306. " {\n"
  307. " #draw jade Silver rounded talign box %1 %2 %3 %4 {$gui[new][%5]};\n"
  308. " };\n"
  309. " #draw jade Azure scaled tile %1 %2+2 %1 %2+3 *gui[new][%5];\n"
  310. " #class profile_tab assign\n"
  311. " {\n"
  312. " profile_tab_input %1+1 %2+1 %1+1 %4-1 %5 %6\n"
  313. " };\n"
  314. "}\n"
  315. "#alias {profile_tab}\n"
  316. "{\n"
  317. " #switch {{%1}}\n"
  318. " {\n"
  319. " #case {{NAME}} {profile_tab_draw 1 -26 3 -1 NAME};\n"
  320. " #case {{ALIAS}} {profile_tab_draw 4 -26 6 -1 ALIAS};\n"
  321. " #case {{HOST}} {profile_tab_draw 7 -26 9 -1 HOST};\n"
  322. " #case {{PORT}} {profile_tab_draw 10 -26 12 -9 PORT};\n"
  323. " #case {{SSL}} {profile_tab_draw 10 -7 12 -1 SSL toggle};\n"
  324. " #case {{FILE}} {profile_tab_draw 13 -26 15 -1 FILE};\n"
  325. " #case {{CHARACTER}} {profile_tab_draw 16 -26 18 -1 CHARACTER};\n"
  326. " #case {{PASSWORD}} {profile_tab_draw 19 -26 21 -1 PASSWORD}\n"
  327. " };\n"
  328. "}\n"
  329. "#alias {profile_tab_cancel}\n"
  330. "{\n"
  331. " #screen get INPUT_NAME input_name;\n"
  332. " #regex {$input_name} {profile_tab_{NAME|ALIAS|HOST|PORT|SSL|FILE|CHARACTER|PASSWORD}}\n"
  333. " {\n"
  334. " profile_tab_cycle INPUT &1\n"
  335. " };\n"
  336. " #screen clear square 1 -26 -1 -1;\n"
  337. " #var gui[profile_tab] 0;\n"
  338. " #math gui[index] 1\n"
  339. "}\n"
  340. "#alias {profile_tab_save}\n"
  341. "{\n"
  342. " #screen get INPUT_NAME input_name;\n"
  343. " #regex {$input_name} {profile_tab_{NAME|ALIAS|INPUT|HOST|PORT|SSL|FILE|CHARACTER|PASSWORD}}\n"
  344. " {\n"
  345. " profile_tab_pull &1\n"
  346. " }\n"
  347. "}\n"
  348. "#alias {gui_new}\n"
  349. "{\n"
  350. " #class profile_tab kill;\n"
  351. " #var gui[new] {{NAME}{} {ALIAS}{} {HOST}{} {PORT}{} {SSL}{off} {FILE}{} {CHARACTER}{} {PASSWORD}{} {INPUT}{}};\n"
  352. " reload_profile_tab\n"
  353. "}\n"
  354. "#alias {gui_connect}\n"
  355. "{\n"
  356. " #if {&gui[new] == 0}\n"
  357. " {\n"
  358. " #line ignore #showme <faa>Connect: No world selected;#return;\n"
  359. " };\n"
  360. " profile_tab_update;\n"
  361. " #screen inputregion -2 28 -2 -28 profile_tab_INPUT;\n"
  362. " #cursor clear;\n"
  363. " #if {{$gui[new][ALIAS]} == {}}\n"
  364. " {\n"
  365. " #line ignore #showme <faa>Connect: No alias set;\n"
  366. " #return\n"
  367. " };\n"
  368. " #if {{$gui[new][HOST]} == {}}\n"
  369. " {\n"
  370. " #line ignore #showme <faa>Connect: No host set;\n"
  371. " #return\n"
  372. " };\n"
  373. " #if {{$gui[new][PORT]} == {}}\n"
  374. " {\n"
  375. " #line ignore #showme <faa>Connect: No port set;\n"
  376. " #return\n"
  377. " };\n"
  378. " #line ignore #showme {<acf>Connecting to <ffa>$gui[new][NAME]<acf>..};\n"
  379. " #config mouse off;\n"
  380. " #buffer refresh;\n"
  381. " #if {{$gui[new][SSL]} == {off}}\n"
  382. " {\n"
  383. " #session $gui[new][ALIAS] $gui[new][HOST] $gui[new][PORT] $gui[new][FILE];\n"
  384. " };\n"
  385. " #else\n"
  386. " {\n"
  387. " #ssl $gui[new][ALIAS] $gui[new][HOST] $gui[new][PORT] $gui[new][FILE];\n"
  388. " };\n"
  389. " #info SESSION save;\n"
  390. " #if {{$info[SESSION][NAME]} !== {gui}}\n"
  391. " {\n"
  392. " #if {{@gui{$gui[new][CHARACTER]}} !== {}}\n"
  393. " {\n"
  394. " @gui{$gui[new][CHARACTER]};\n"
  395. " #if {{@gui{$gui[new][PASSWORD]}} !== {}}\n"
  396. " {\n"
  397. " @gui{@b64Z{$gui[new][PASSWORD]}}\n"
  398. " }\n"
  399. " }\n"
  400. " };\n"
  401. " #else\n"
  402. " {\n"
  403. " #line ignore #showme <faa>Connect: Failed to connect to <ffa>$gui[new][NAME]<faa>.\n"
  404. " }\n"
  405. "}\n"
  406. "#alias {gui_save}\n"
  407. "{\n"
  408. " #if {&gui[new] == 0}\n"
  409. " {\n"
  410. " #CLASS WORLDS WRITE $info[SYSTEM][TINTIN]/worlds.tin;\n"
  411. " #showme {<acf>Saving worlds.};\n"
  412. " #return;\n"
  413. " };\n"
  414. " profile_tab_update;\n"
  415. " #if {{$gui[new][NAME]} === {}}\n"
  416. " {\n"
  417. " #showme {<faa>Save: No profile name set.};\n"
  418. " #return;\n"
  419. " };\n"
  420. " #screen inputregion -2 28 -2 -28 profile_tab_INPUT;\n"
  421. " #var {worldlist[$gui[new][NAME]]} {$gui[new]};\n"
  422. " #unvar {worldlist[$gui[new][NAME]][DESC]};\n"
  423. " gui_worlds;\n"
  424. " draw_worlds;\n"
  425. " reload_profile_tab;\n"
  426. " #line ignore #showme {<acf>World <ffa>$gui[new][NAME]<acf> saved.};\n"
  427. " #CLASS WORLDS WRITE $info[SYSTEM][TINTIN]/worlds.tin;\n"
  428. "}\n"
  429. "#alias {gui_remove}\n"
  430. "{\n"
  431. " #if {&gui[new] == 0}\n"
  432. " {\n"
  433. " #showme {<faa>Remove: No profile loaded.};\n"
  434. " #return;\n"
  435. " };\n"
  436. " #if {{$gui[new][NAME]} === {}}\n"
  437. " {\n"
  438. " #showme {<faa>Remove: No profile name set.};\n"
  439. " #return;\n"
  440. " };\n"
  441. " profile_tab_save;\n"
  442. " #unvar {worldlist[$gui[new][NAME]]};\n"
  443. " profile_tab_cancel;\n"
  444. " draw_worlds;\n"
  445. " #line ignore #showme {<acf>World <ffa>$gui[new][NAME]<acf> removed.};\n"
  446. " #CLASS WORLDS WRITE $info[SYSTEM][TINTIN]/worlds.tin;\n"
  447. "}\n"
  448. "#alias {reload_profile_tab}\n"
  449. "{\n"
  450. " #var gui[profile_tab] 1;\n"
  451. " profile_tab NAME;\n"
  452. " profile_tab ALIAS;\n"
  453. " profile_tab HOST;\n"
  454. " profile_tab PORT;\n"
  455. " profile_tab SSL;\n"
  456. " profile_tab FILE;\n"
  457. " profile_tab CHARACTER;\n"
  458. " profile_tab PASSWORD;\n"
  459. " #buffer clear;\n"
  460. " #if {&gui[new][DESC] && $gui[cols] >= 26}\n"
  461. " {\n"
  462. //" #draw jade bumped ualign rounded scaled calign scroll box 1 1 1 $gui[cols] {<ffa>$gui[new][NAME] <fff>- <ffa>$gui[new][WEBSITE]};\n"
  463. " #draw jade bumped ualign rounded scaled calign scroll box 1 1 1 $gui[cols] {<ffa>$gui[new][NAME] <fff>- <ffa>\e]8;;$gui[new][WEBSITE]\a\e[04m$gui[new][WEBSITE]\e[24m\e]8;;\a};\n"
  464. " #draw jade Silver ualign rounded scaled scroll box 1 1 1 $gui[cols] {$gui[new][DESC]}\n"
  465. " };\n"
  466. " #draw jade Green rounded calign box -3 14 -1 26 {@gui_link{COMMAND;gui_connect;connect}};\n"
  467. " #draw jade Green rounded calign box -3 -26 -1 -14 {@gui_link{COMMAND;gui_save;save}};\n"
  468. " #if {{$gui[world_tab]} !== {sponsors}}\n"
  469. " {\n"
  470. " #draw jade Green rounded calign box -3 -13 -1 -1 {@gui_link{COMMAND;gui_remove;remove}};\n"
  471. " };\n"
  472. " #macro {\\t} {gui_tab_forward};\n"
  473. " #macro {\\e[Z} {gui_tab_backward};\n"
  474. "}\n"
  475. "#event {SESSION ACTIVATED}\n"
  476. "{\n"
  477. " gui_reload\n"
  478. "}\n"
  479. "#alias {gui_reload}\n"
  480. "{\n"
  481. " #split 1 3 27 27;\n"
  482. " #config mouse on;\n"
  483. " #screen clear split;\n"
  484. " #screen inputregion -2 28 -2 -28 profile_tab_INPUT;\n"
  485. " #screen get rows gui[rows];\n"
  486. " #screen get cols gui[cols];\n"
  487. " #math gui[cols] $gui[cols] - 54;\n"
  488. " #var gui[index] 1;\n"
  489. " #draw Orange rounded box -3 27 -1 -27;\n"
  490. " #draw Orange rounded box 1 27 -4 -27;\n"
  491. " world_tab $gui[world_tab];\n"
  492. " #switch {{$gui[world_tab]}}\n"
  493. " {\n"
  494. " #case {{worlds}} {draw_worlds};\n"
  495. " #case {{sponsors}} {draw_sponsors}\n"
  496. " };\n"
  497. " #if {$gui[profile_tab] == 1}\n"
  498. " {\n"
  499. " reload_profile_tab\n"
  500. " }\n"
  501. "}\n"
  502. "#alias {gui_init}\n"
  503. "{\n"
  504. " #config scroll_lock off;\n"
  505. " #class WORLDS assign #variable {worldlist} {};\n"
  506. " #info system save;\n"
  507. " #banner save;\n"
  508. " #line quiet #read $info[SYSTEM][TINTIN]/worlds.tin;\n"
  509. " #var gui[pause] 0;\n"
  510. " #var gui[profile_tab] 0;\n"
  511. " #var gui[world_tab] worlds;\n"
  512. " #screen inputregion -2 28 -2 -28 profile_tab_INPUT;\n"
  513. " #var gui[input][INPUT] {{top_row}{-2}{top_col}{28}{bot_row}{-2}{bot_col}{-28}};\n"
  514. " gui_reload;\n"
  515. " #if {$gui[cols] > 75}\n"
  516. " {\n"
  517. " #draw Silver huge traced scroll tile 1 1 6 73 { TINTIN++};\n"
  518. " #draw Silver calign scroll tile 1 1 2 75 {}{$info[SYSTEM][CLIENT_VERSION]};\n"
  519. " #draw Silver calign scroll tile 1 1 3 75 {}{Code by Peter Unold, Bill Reiss, and Igor van den Hoven}\n"
  520. " };\n"
  521. " #elseif {$gui[cols] > 40}\n"
  522. " {\n"
  523. " #draw Silver huge traced scroll tile 1 1 6 40 { TT++};\n"
  524. " #draw Silver calign scroll tile 1 1 2 40 {}{$info[SYSTEM][CLIENT_VERSION]};\n"
  525. " #draw Silver calign scroll tile 1 1 4 40 {}{Code by Peter Unold, Bill Reiss,}{}{and Igor van den Hoven}\n"
  526. " };\n"
  527. " #elseif {$gui[cols] > 18}\n"
  528. " {\n"
  529. " #draw Silver calign scroll tile 1 1 14 $gui[cols] {T I N T I N + +}{}{$info[SYSTEM][CLIENT_VERSION]}{}{Code by}{}{Peter Unold}{}{Bill Reiss}{}{and}{}{Igor van den Hoven};\n"
  530. " };\n"
  531. " #elseif {$gui[cols] > 8}\n"
  532. " {\n"
  533. " #draw Silver huge traced scroll tile 1 1 6 9 {T};\n"
  534. " #draw Silver huge traced scroll tile 1 1 6 9 {T};\n"
  535. " #draw Silver huge traced scroll tile 1 1 6 9 {+};\n"
  536. " #draw Silver huge traced scroll tile 1 1 6 9 {+};\n"
  537. " #draw Silver calign scroll tile 1 1 1 9 {$info[SYSTEM][CLIENT_VERSION]}\n"
  538. " };\n"
  539. " #elseif {$gui[cols] > 1}\n"
  540. " {\n"
  541. " #draw Silver calign scroll tile 1 1 8 $gui[cols] {T}{i}{n}{T}{i}{n}{+}{+}\n"
  542. " }\n"
  543. "}\n"
  544. "#EVENT {SCREEN RESIZE}\n"
  545. "{\n"
  546. " #delay {gui_reload} {gui_reload;#buffer end} {0.1}\n"
  547. "}\n"
  548. "#EVENT {SESSION DESTROYED} {#gts #delay 0 #end}\n"
  549. "#event {SCROLLED MOUSE WHEEL UP}\n"
  550. "{\n"
  551. " #if {%1 <= 26}\n"
  552. " {\n"
  553. " #if {$gui[profile_tab] >= 0 && $gui[index] > 1}\n"
  554. " {\n"
  555. " #math gui[index] $gui[index] - 1;\n"
  556. " gui_draw_left\n"
  557. " }\n"
  558. " };\n"
  559. " #elseif {$gui[profile_tab] && %3 >= -26}\n"
  560. " {\n"
  561. " #if {$gui[pause] == 1}\n"
  562. " {\n"
  563. " #return;\n"
  564. " };\n"
  565. " gui_tab_backward;\n"
  566. " #var gui[pause] 1;\n"
  567. " #delay 0.2 #var gui[pause] 0\n"
  568. " };\n"
  569. " #else\n"
  570. " {\n"
  571. " #buffer up 1\n"
  572. " }\n"
  573. "}\n"
  574. "#event {SCROLLED MOUSE WHEEL DOWN}\n"
  575. "{\n"
  576. " #if {%1 <= 26}\n"
  577. " {\n"
  578. " #if {$gui[profile_tab] >= 0 && $gui[index] < @gui_size_left{} && @gui_size_left{} > $gui[rows] / 3 - 6}\n"
  579. " {\n"
  580. " #math gui[index] $gui[index] + 1;\n"
  581. " gui_draw_left\n"
  582. " }\n"
  583. " };\n"
  584. " #elseif {$gui[profile_tab] && %3 >= -26}\n"
  585. " {\n"
  586. " #if {$gui[pause] == 1}\n"
  587. " {\n"
  588. " #return;\n"
  589. " };\n"
  590. " gui_tab_forward;\n"
  591. " #var gui[pause] 1;\n"
  592. " #delay 0.2 #var gui[pause] 0\n"
  593. " };\n"
  594. " #else\n"
  595. " {\n"
  596. " #buffer down 1;\n"
  597. " }\n"
  598. "}\n"
  599. "#delay 0 gui_init\n";