DayZ 1.24
Loading...
Searching...
No Matches
PluginDiagMenuModding.c
Go to the documentation of this file.
1
8#ifdef DOXYGEN
9#ifdef MODDING_TEST
10#ifdef DIAG_DEVELOPER
11
18#ifdef DOXYGEN
19 class PluginDiagMenuModded // Just to not have it show up for the regular entry... Doxygen doesn't know about modding
20#else
22#endif
23{
30 protected string m_ModdedDiagsExampleRootMenu = "BI - DiagsModdingExample";
31
35 protected string m_ModdedDiagsExampleSubMenu = "Example Sub Menu";
36
44 protected int m_ModdedDiagsExampleBoolID;
46 protected int m_ModdedDiagsExampleRangeID;
48
49 //---------------------------------------------
55 override protected void RegisterModdedDiagsIDs()
56 {
57 super.RegisterModdedDiagsIDs();
58
63 }
64
65 //---------------------------------------------
72 override protected void RegisterModdedDiags()
73 {
74 super.RegisterModdedDiags();
75
76 // Register the root menu of your mod under the ModdedRootMenu
77 // Then register all following menus and items under this menu
78 // This can not be enforced, but it will help keep things clean
79 // Including being able to easily identify where a debug is coming from
80 // So that reports of a broken debug can be sent to the correct developer
81 //
82 // If you have multiple mods, you might even want to consider to create a root menu with your developer name
83 // And then put the mod menus as a submenu
84 // To prevent someone running a lot of mods from having an overflooded menu
85 // DiagMenu.MenuExists(...) could serve to help to identify if the root menu already exists when using this format
86 // So that the multiple mods can know if they still have to register your root menu or not
88 {
90
91 // A sub menu inside the root of the mod menu
92 // The curly braces are simply for readability
94 {
96 }
97 }
98 }
99}
100
101#ifdef DOXYGEN
103{
105}
106#endif
107
113#ifdef DOXYGEN
114 class PluginDiagMenuClientModded // Just to not have it show up for the regular entry... Doxygen doesn't know about modding
115#else
117#endif
118{
123 override protected void BindCallbacks()
124 {
125 super.BindCallbacks();
126
129 }
130
142 static void CBModdedDiadIDsExampleBool(bool enabled)
143 {
144 Print("CBModdedDiadIDsExampleBool: " + enabled);
145 }
146
160 static void CBModdedDiadIDsExampleRange(float value)
161 {
162 Print("CBModdedDiadIDsExampleRange: " + value);
163 }
164}
165
166#endif
167#endif
168#endif
169
170//@}
proto void Print(void var)
Prints content of variable to console/log.
static proto void RegisterBool(int id, string shortcut, string name, int parent, bool reverse=false, func callback=null)
Register a new bool item.
static proto void RegisterRange(int id, string shortcut, string name, int parent, string valuenames, func callback=null)
Register a new range item.
static proto void RegisterMenu(int id, string name, int parent)
Register a new menu.
static proto bool BindCallback(int id, func callback)
Bind a callback to the given id.