Advertisement
gribbleshnibit8

MCM With MCM Functions

Sep 13th, 2015
194
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.62 KB | None | 0 0
  1. scn MCMScript
  2.  
  3. ; Initialization
  4. int masterIndex
  5. ref modList
  6. int activeMod
  7.  
  8. ; MCM vars
  9. int activeOption
  10. int activeSubmenu
  11. float value
  12. int mouseoverOption
  13.  
  14. int iTemp
  15. float fTemp
  16. int menuSection
  17.  
  18.  
  19. ;-------------------------------------------------------------------------
  20. Begin GameMode
  21.  
  22. if getGameRestarted == 1
  23.  
  24. if isModLoaded "The Mod Configuration Menu.esp" == 1
  25. set masterIndex to getModIndex "The Mod Configuration Menu.esp"
  26. set modList to buildRef masterIndex 2790
  27. listAddForm modList <ModItem>
  28. endif
  29. endif
  30.  
  31. End
  32.  
  33. ;-------------------------------------------------------------------------
  34. Begin MenuMode 1013
  35.  
  36. set activeMod to getMCMFloat 0 0 "_ActiveMod"
  37.  
  38. if activeMod == 0
  39. return
  40. endif
  41.  
  42. if activeMod != getSourceModIndex <ModItem>
  43. return
  44. endif
  45.  
  46. set activeOption to getMCMFloat 0 0 "_ActiveOption"
  47. set value to getMCMFloat 0 0 "_Value"
  48.  
  49. if GetUIFloat "StartMenu/MCM/*:5/SubMenu1/_enable" == 0
  50.  
  51. setUIFloat "StartMenu/MCM/*:5/SubMenu1/_enable" 1
  52. setUIString "StartMenu/MCM/*:5/SubMenu1/text/string" "Submenu Example"
  53. setUIString "StartMenu/MCM/*:8/SubTitle1/string" "Submenu Example"
  54. endif
  55.  
  56. set activeSubmenu to GetMCMFloat 0 0 "_ActiveSubMenu"
  57.  
  58. ;--------------------------------------------------
  59. if getMCMFloat 0 0 "_Reset" != 0 ; 1 - RESET
  60. setMCMFloat 0 0 "_Reset" 0
  61.  
  62.  
  63. ;--------------------------------------------------
  64. elseif getMCMFloat 0 0 "_Default" != 0 ; 2 - DEFAULT
  65. setMCMFloat 0 0 "_Default" 0
  66. setMCMFloat 0 0 "_Reset" 1
  67. set menuSection to 2
  68.  
  69.  
  70. ;--------------------------------------------------
  71. elseif getMCMFloat 0 0 "_NewValue" != 0 ; 3 - NEW VALUE
  72. setMCMFloat 0 0 "_NewValue" 0
  73. setMCMFloat 0 0 "_Reset" 1
  74. set menuSection to 3
  75.  
  76.  
  77. ;--------------------------------------------------
  78. elseif getMCMFloat 0 0 "_ShowList" == 1 ; 4 - SHOW LIST
  79. setMCMFloat 0 0 "_ShowList" 2
  80. set menuSection to 4
  81.  
  82.  
  83. ;--------------------------------------------------
  84. elseif getMCMFloat 0 0 "_ShowScale" == 1 ; 5 - SHOW SCALE
  85. setMCMFloat 0 0 "_ShowScale" 2
  86. set menuSection to 5
  87.  
  88.  
  89. ;--------------------------------------------------
  90. elseif getMCMFloat 0 0 "_DefaultScale" != 0 ; 6 - DEFAULT SCALE
  91. setMCMFloat 0 0 "_DefaultScale" 0
  92. setMCMFloat 0 0 "_ShowScale" 2
  93. set menuSection to 6
  94.  
  95.  
  96. endif
  97.  
  98. ;--------------------------------------------------
  99. if mouseoverOption != GetUIFloat "StartMenu/MCM/*:1/_optionID" ; 7 - MOUSE-OVER
  100. set mouseoverOption to GetUIFloat "StartMenu/MCM/*:1/_optionID"
  101. set menuSection to 7
  102. if mouseoverOption != 0
  103. setMCMFloat 9 0 "visible" 1
  104.  
  105.  
  106. elseif activeSubMenu != 0
  107. setMCMFloat 9 0 "visible" 0
  108. endif
  109. endif
  110.  
  111. End
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement