@@ -209,16 +209,20 @@ Class UCRMain extends _UCRBase {
209209 ; Gui, % this.hwnd ":Show"
210210 }
211211
212+ ; Creates the objects for the Main Menu
212213 _CreateMainMenu (){
213214 this.MainMenu := new _Menu()
214215 this.MainMenu.AddSubMenu(" &View" , " View" )
215216 .AddMenuItem(" Start Minimized" , " StartMinimized" , this._MenuHandler.Bind(this, " StartMinimized" ))
216217 .parent.AddMenuItem(" Minimize to Tray" , " MinimizeToTray" , this._MenuHandler.Bind(this, " MinimizeToTray" ))
217218 this.MainMenu.AddSubMenu(" Gui&Controls" , " GuiControls" )
218219 .AddMenuItem(" Show Joystick &Names (Requires Restart)" , " ShowJoystickNames" , this._MenuHandler.Bind(this, " ShowJoystickNames" ))
220+ this.MainMenu.AddSubMenu(" &Debug" , " Debug" )
221+ .AddMenuItem(" Show vJoy Log" , " ShowvJoyLog" , this._MenuHandler.Bind(this, " ShowvJoyLog" ))
219222 Gui , % this.hwnd " :Menu" , % this.MainMenu.id
220223 }
221224
225+ ; Called once at Startup to synch state of Main Menu with the INI file
222226 _SetMenuState (){
223227 for k, v in this.UserSettings.MinimizeOptions {
224228 this.MainMenu.MenusByName[" View" ].ItemsByName[k].SetCheckState(v)
@@ -230,13 +234,16 @@ Class UCRMain extends _UCRBase {
230234
231235 }
232236
237+ ; When an option is chose in the main menu, this is called
233238 _MenuHandler (name ){
234239 if (name = " MinimizeToTray" || name = " StartMinimized" ){
235240 this.UserSettings.MinimizeOptions[name] := ! this.UserSettings.MinimizeOptions[name]
236241 this.MainMenu.MenusByName[" View" ].ItemsByName[name].ToggleCheck()
237242 } else if (name = " ShowJoystickNames" ){
238243 this.UserSettings.GuiControls[name] := ! this.UserSettings.GuiControls[name]
239244 this.MainMenu.MenusByName[" GuiControls" ].ItemsByName[name].ToggleCheck()
245+ } else if (name = " ShowvJoyLog" ){
246+ this.ShowvJoyLog()
240247 }
241248 this._SaveSettings()
242249 }
@@ -903,7 +910,23 @@ Class UCRMain extends _UCRBase {
903910 cy := ((uh / 2 ) - ch) + uy
904911 return {x: cx, y: cy}
905912 }
913+
914+ ShowvJoyLog (){
915+ Clipboard := this.Libraries.vJoy.LoadLibraryLog
916+ msgbox % this.Libraries.vJoy.LoadLibraryLog " `n`nThis information has been copied to the clipboard"
917+ }
906918
919+ MergeObject (base, patch ){
920+ for k, v in patch {
921+ if (IsObject (v)){
922+ this.MergeObject(base[k], v)
923+ } else {
924+ base[k] := v
925+ }
926+
927+ }
928+ }
929+
907930 ; Serialize this object down to the bare essentials for loading it's state
908931 _Serialize (){
909932 obj := {SettingsVersion: this.SettingsVersion
@@ -936,17 +959,6 @@ Class UCRMain extends _UCRBase {
936959 if (IsObject (obj.CurrentPos))
937960 this.CurrentPos := obj.CurrentPos
938961 }
939-
940- MergeObject (base, patch ){
941- for k, v in patch {
942- if (IsObject (v)){
943- this.MergeObject(base[k], v)
944- } else {
945- base[k] := v
946- }
947-
948- }
949- }
950962}
951963
952964Class _UCRBase {
0 commit comments