-
Posts
24,896 -
Joined
-
Last visited
Content Type
Profiles
Forums
Developer Articles
KSP2 Release Notes
Everything posted by linuxgurugamer
-
ok, but the right click on the toolbar was working in 1.0.5, and @sal_vager confirmed that it was a mistake. For now, I've changed the way the mod works a bit. I was using the right-click to bring up the setting window, and left-click to display some info. The changes I made are that the left click brings up the settings window, and the info window is now an option. This is in my TotalTime mod, but I do use the right-click on the toolbar in other mods. Re. the MultiOptionDialog, this is in KRASH (was in the old Holodeck) code. I found some examples on how to do it without using a callback, so unless I hear another way to use a callback function, I'll probably recode the dialogs
-
Some of my mods respond to a right-click on the toolbar button (stock toolbar) It's not working anymore. However, left-button clicks still work. Here is the basic code. First, this line adds the button to the toolbar: TT_Button = ApplicationLauncher.Instance.AddModApplication (GUIToggleToolbar, GUIToggleToolbar, null, null, null, null, ApplicationLauncher.AppScenes.SPACECENTER, TT_button_img); and here is the function (simplified): public void GUIToggleToolbar () { //GUIToggle (true); Log.Info("GUIToggleToolbar"); //stockToolBarcreated = true; if (Input.GetMouseButtonUp (1)) { //onRightButtonStockClick (); configDisplayActive = !configDisplayActive; if (configDisplayActive) { SetConfigVisible (true); cfgWinData = false; } } } What I saw by adding the Log.Info line, is that the toolbar is not passing right-clicks to the function. Edit: clarification: The function is not called at all when I right-click on the tool-bar button Is this a bug, or a change in the functionality? Thanks
-
What I need is access to the KerbalFSM. If there is a better way to do this, I'd appreciate hearing about it. Specifically, I need to do the following: (editorFSM.currentStateName == "st_offset_tweak" || editorFSM.currentStateName == "st_rotate_tweak")) and the following: editorFSM.lastEventName.Equals("on_rootSelect"); Thanks in advance