Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

Tom

By: a guest on Jan 16th, 2010  |  syntax: JavaScript  |  size: 1.30 KB  |  views: 386  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. // Used in window.GetColorCUI()
  2. ColorTypeCUI = {
  3.         text: 0,
  4.         selection_text: 1,
  5.         inactive_selection_text: 2,
  6.         background: 3,
  7.         selection_background: 4,
  8.         inactive_selection_background: 5,
  9.         active_item_frame: 6
  10. };
  11.  
  12. // Used in window.GetFontCUI()
  13. FontTypeCUI = {
  14.         items: 0,
  15.         labels: 1
  16. };
  17.  
  18. // Used in window.GetColorDUI()
  19. ColorTypeDUI = {
  20.         text: 0,
  21.         background: 1,
  22.         highlight: 2,
  23.         selection: 3
  24. };
  25.  
  26. // Used in window.GetFontDUI()
  27. FontTypeDUI = {
  28.         defaults: 0,
  29.         tabs: 1,
  30.         lists: 2,
  31.         playlists: 3,
  32.         statusbar: 4,
  33.         console: 5
  34. };
  35.  
  36. var font = window.InstanceType?window.GetFontDUI(FontTypeDUI.defaults):window.GetFontCUI(FontTypeCUI.items);
  37. var txtcol = window.InstanceType?window.GetColorDUI(ColorTypeDUI.text):window.GetColorCUI(ColorTypeCUI.text);
  38. var bg = window.InstanceType?window.GetColorDUI(ColorTypeDUI.background):window.GetColorCUI(ColorTypeCUI.background);
  39.  
  40. function on_font_changed() {
  41.         font = window.InstanceType?window.GetFontDUI(FontTypeDUI.defaults):window.GetFontCUI(FontTypeCUI.items);
  42.         window.Repaint();
  43. }
  44.  
  45. function on_colors_changed() {
  46.         txtcol = window.InstanceType?window.GetColorDUI(ColorTypeDUI.text):window.GetColorCUI(ColorTypeCUI.text);
  47.         bg = window.InstanceType?window.GetColorDUI(ColorTypeDUI.background):window.GetColorCUI(ColorTypeCUI.background);
  48.         window.Repaint();
  49. }