gen_pageguids.m 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. /*---------------------------------------------------
  2. -----------------------------------------------------
  3. Filename: gen_pageguids.m
  4. Version: 1.0
  5. Type: maki/page guid definitions
  6. Date: 03. Jul. 2006 - 18:29
  7. Author: Martin Poehlmann aka Deimos
  8. E-Mail: [email protected]
  9. Internet: www.skinconsortium.com
  10. www.martin.deimos.de.vu
  11. -----------------------------------------------------
  12. ---------------------------------------------------*/
  13. #ifndef included
  14. #error This script can only be compiled as a #include
  15. #endif
  16. #ifndef __GEN_PAGEGUIDS_M
  17. #define __GEN_PAGEGUIDS_M
  18. #include <lib/config.mi>
  19. Function initPages();
  20. /*--NON CHANGEABLE GUIDS:--------------------------*/
  21. // this is the page that maps its items to the options menu, you can add attribs or more pages (submenus)
  22. #define CUSTOM_OPTIONSMENU_ITEMS "{1828D28F-78DD-4647-8532-EBA504B8FC04}"
  23. Global ConfigItem optionsmenu_page;
  24. // this is the page that maps its items to the windows menu (aka View), you can add attribs or more pages (submenus)
  25. #define CUSTOM_WINDOWSMENU_ITEMS "{6559CA61-7EB2-4415-A8A9-A2AEEF762B7F}"
  26. Global ConfigItem custom_windows_page;
  27. // non exposed attribs page
  28. #define CUSTOM_PAGE_NONEXPOSED "{E9C2D926-53CA-400f-9A4D-85E31755A4CF}"
  29. Global ConfigItem custom_page_nonexposed;
  30. /*--DECLARE PAGES HERE:----------------------------*/
  31. initPages()
  32. {
  33. #ifndef __PAGES
  34. #define __PAGES
  35. custom_page_nonexposed = Config.newItem("Hidden", CUSTOM_PAGE_NONEXPOSED);
  36. // load up the cfgpage in which we'll insert our custom page
  37. optionsmenu_page = Config.getItem(CUSTOM_OPTIONSMENU_ITEMS);
  38. custom_windows_page = Config.getItem(CUSTOM_WINDOWSMENU_ITEMS);
  39. #endif
  40. }
  41. /*--GLOBAL DEFINITIONS:----------------------------*/
  42. #define NOOFF if (getData()=="0") { setData("1"); return; }
  43. Global Int attribs_mychange, attribs_mychange2;
  44. Global ConfigAttribute sep;
  45. Global Int sep_count = 0;
  46. Function addMenuSeparator(ConfigItem cfgmenupage);
  47. addMenuSeparator(ConfigItem cfgmenupage)
  48. {
  49. #ifdef MAIN_ATTRIBS_LOADER
  50. sep_count = sep_count + 1;
  51. sep = cfgmenupage.newAttribute(getSkinName() + "seperator" + integerToString(sep_count), "");
  52. sep.setData("-");
  53. #endif
  54. }
  55. Function ConfigItem addConfigSubMenu(configitem parent, string name, string guid);
  56. ConfigItem addConfigSubMenu(configitem parent, string name, string guid)
  57. {
  58. ConfigItem __ret = Config.newItem(name, guid);
  59. ConfigAttribute __dret = parent.newAttribute(name, "");
  60. __dret.setData(guid);
  61. return __ret;
  62. }
  63. Function toggleAttrib(ConfigAttribute attrib);
  64. toggleAttrib(ConfigAttribute attrib)
  65. {
  66. if (attrib.getData() == "0")
  67. {
  68. attrib.setData("1");
  69. }
  70. else
  71. {
  72. attrib.setData("0");
  73. }
  74. }
  75. #endif