Li0n Posted February 20, 2018 Share Posted February 20, 2018 @linuxgurugamer I've noticed that you can't set a button to be visible only on the flight scene (not the map view) with blizzy's toolbar. It works fine with the stock toolbar. Reveal hidden contents toolbarController = gameObject.AddComponent<ToolbarControl> (); toolbarController.AddToAllToolbars ( ToolbarButtonOnTrue, ToolbarButtonOnFalse, KSP.UI.Screens.ApplicationLauncher.AppScenes.FLIGHT, "AntennaHelper", "368879", "AntennaHelper/Textures/icon_sat_on", "AntennaHelper/Textures/icon_off", "AntennaHelper/Textures/icon_dish_on_small", "AntennaHelper/Textures/icon_dish_off_small", "Antenna Helper"); toolbarController.UseBlizzy (true); With this setting I expect the button to NOT be visible in the map view. Quote Link to comment Share on other sites More sharing options...
linuxgurugamer Posted February 20, 2018 Author Share Posted February 20, 2018 Ok,ill get it fixed Thanks Quote Link to comment Share on other sites More sharing options...
linuxgurugamer Posted February 21, 2018 Author Share Posted February 21, 2018 Actually, this is going to be difficult, since the Blizzy Toolbar does not support that functionality directly. I'm going to have to totally replicate the way stock does it, which is a real PITA Quote Link to comment Share on other sites More sharing options...
linuxgurugamer Posted February 21, 2018 Author Share Posted February 21, 2018 I have it done, just need to test, it’s a rather complicated expression Quote Link to comment Share on other sites More sharing options...
linuxgurugamer Posted February 22, 2018 Author Share Posted February 22, 2018 New release, 0.1.4.7: Fixed bug with not being able to have a button on the Blizzy toolbar only in the flight scene and not in the map view Added void SetTexture(string large, string small) to allow mod to change the button textures directly Quote Link to comment Share on other sites More sharing options...
linuxgurugamer Posted March 16, 2018 Author Share Posted March 16, 2018 New release, 0.1.5.1 Filled nullref when first called Fixed bug when a mod called SetTrue or SetFalse, the button would be set true/false, but the texture wasn't being changed Quote Link to comment Share on other sites More sharing options...
linuxgurugamer Posted March 16, 2018 Author Share Posted March 16, 2018 New release 0.1.5.2: Fixed AddLeftRightClickCallbacks call 0.1.5.1 Filled nullref when first called Fixed bug when a mod called SetTrue or SetFalse, the button would be set true/false, but the texture wasn't being changed Quote Link to comment Share on other sites More sharing options...
Acvila Posted March 18, 2018 Share Posted March 18, 2018 after installing last 2 versions avc still reporting version 0.1.5.1 Quote Link to comment Share on other sites More sharing options...
linuxgurugamer Posted March 18, 2018 Author Share Posted March 18, 2018 Delete the mod and reinstall it, be sure to delete the directory as well. I just verified that the .version file is correct Quote Link to comment Share on other sites More sharing options...
Acvila Posted March 18, 2018 Share Posted March 18, 2018 (edited) On 3/18/2018 at 11:23 AM, linuxgurugamer said: Delete the mod and reinstall it, be sure to delete the directory as well. I just verified that the .version file is correct Expand same thing, also mini avc report 3-4 times same messages. L.E. never-mind, my fault, i copied it in kerbal foundries too by mistake... mini avc also working fine now. Edited March 18, 2018 by Acvila Quote Link to comment Share on other sites More sharing options...
linuxgurugamer Posted March 19, 2018 Author Share Posted March 19, 2018 New release, 0.1.5.4 Fix for fuzzy buttons Quote Link to comment Share on other sites More sharing options...
bkerman Posted March 21, 2018 Share Posted March 21, 2018 I'm experiencing a nasty bug with this mod and KAC. Anytime the cursor changes to a different icon, it disappears when it tries to change back. For example, when I click "unlock position and size", it will change to the new icon, but it will disappear instead of switching back to regular cursor. The logs don't show anything of value. KAC has similar bug with its window resizer cursor that appears on the right side of the KAC window (I know you don't work on that mod, just elaborating). In both instances, everything still works it's just impossible to know where my cursor is and requires a restart to fix. Thanks! Ubuntu 17.10 build 1.4.1.2089 Quote Link to comment Share on other sites More sharing options...
devoid Posted March 21, 2018 Share Posted March 21, 2018 On 3/21/2018 at 4:13 PM, bkerman said: I'm experiencing a nasty bug with this mod and KAC. Anytime the cursor changes to a different icon, it disappears when it tries to change back. For example, when I click "unlock position and size", it will change to the new icon, but it will disappear instead of switching back to regular cursor. The logs don't show anything of value. KAC has similar bug with its window resizer cursor that appears on the right side of the KAC window (I know you don't work on that mod, just elaborating). In both instances, everything still works it's just impossible to know where my cursor is and requires a restart to fix. Thanks! Ubuntu 17.10 build 1.4.1.2089 Expand Just letting you know, that this bug is being worked on and is known. Quote Link to comment Share on other sites More sharing options...
DStaal Posted April 8, 2018 Share Posted April 8, 2018 An idea I had, related to this an the stock problem of to many preference pages: With more and more mods using this, I'm starting to get a lot of preference panes with only the one button: Whether to use the toolbar or not. Would it be possible for *this* mod to create a preference pane, and aggregate the mods that are using it, so that you just have an array of buttons? I'd guess you'd want to make it opt-in on the other mod's part, so if they have other options they don't need to have this one option be on it's own - but for the mods which only have this one option, opting in would greatly reduce clutter for the user, and the amount of clicks it takes to start a new save. Quote Link to comment Share on other sites More sharing options...
linuxgurugamer Posted April 8, 2018 Author Share Posted April 8, 2018 On 4/8/2018 at 3:40 PM, DStaal said: An idea I had, related to this an the stock problem of to many preference pages: With more and more mods using this, I'm starting to get a lot of preference panes with only the one button: Whether to use the toolbar or not. Would it be possible for *this* mod to create a preference pane, and aggregate the mods that are using it, so that you just have an array of buttons? I'd guess you'd want to make it opt-in on the other mod's part, so if they have other options they don't need to have this one option be on it's own - but for the mods which only have this one option, opting in would greatly reduce clutter for the user, and the amount of clicks it takes to start a new save. Expand Most if not all of those mods are mine, I'd be interested in hearing about another mod which is using this. It's a great idea, but I have to think about how to do it Shouldn't be that difficult, maybe just a call to register the mod and get/set the value Quote Link to comment Share on other sites More sharing options...
linuxgurugamer Posted April 8, 2018 Author Share Posted April 8, 2018 Well, it's written, I need to test it. And then, gaaaah. More mods to update Quote Link to comment Share on other sites More sharing options...
DStaal Posted April 8, 2018 Share Posted April 8, 2018 Thanks. (And yeah, by 'more and more mods' I mostly mean *your* mods...) Quote Link to comment Share on other sites More sharing options...
linuxgurugamer Posted April 13, 2018 Author Share Posted April 13, 2018 New release, 0.1.6: Added code for mods to register with the toolbar Controller Added functions for mods to set and get the setting for the Blizzy toolbar Added window to allow users to change setting without having to go into the mod Added following methods, see the README for details: public void toolbarControl.UseButtons(string NameSpace); public static bool RegisterMod(string NameSpace, string DisplayName = "", bool useBlizzy = false, bool useStock = true, bool NoneAllowed = true) public static bool BlizzyActive(string NameSpace, bool? useBlizzy = null) public static bool StockActive(string NameSpace, bool? useStock = null) public static void ButtonsActive(string NameSpace, bool? useStock, bool? useBlizzy) public void UseStock(bool useStock) Cleaned up old commented-out code Current mods which use the previous version will remain compatible, but as new mods get updated and released, this version will be required Quote Link to comment Share on other sites More sharing options...
releansol Posted April 13, 2018 Share Posted April 13, 2018 Is there a way to change the sequence in stock bar (without coding)? Quote Link to comment Share on other sites More sharing options...
nightingale Posted April 14, 2018 Share Posted April 14, 2018 On 1/14/2018 at 4:34 PM, linuxgurugamer said: Sorry, but its necessary to be sure everything gets loaded in in the correct order Once this starts to be used, I’ll package the toolbar dll in the same zip file, and will set up ckan to not have a problem with that Expand Really late to the party here, but in case you're unaware of KSPAssembly and KSPAssemblyDependency I figured I'd pipe in. If you add this to you AssemblyInfo.cs: [assembly: KSPAssembly("ToolbarController", 1, 0)] Others can then do a: [assembly: KSPAssemblyDependency("ToolbarController", 1, 0)] ... which will guarantee the load order. One benefit is that KSP will output a warning and won't load an assembly if it's dependencies aren't met (which may be better than puking out a bunch of exceptions). The only other real problem with the forced to the top of the sort list method is that technically there's a couple characters before zero ('~', '!', '@', etc.) and dlls directly in GameData come first too. Of course someone pretty much has to be trying to break things if you have to worry about this particular case. Quote Link to comment Share on other sites More sharing options...
linuxgurugamer Posted April 14, 2018 Author Share Posted April 14, 2018 On 4/14/2018 at 5:43 AM, nightingale said: Really late to the party here, but in case you're unaware of KSPAssembly and KSPAssemblyDependency I figured I'd pipe in. If you add this to you AssemblyInfo.cs: [assembly: KSPAssembly("ToolbarController", 1, 0)] Others can then do a: [assembly: KSPAssemblyDependency("ToolbarController", 1, 0)] ... which will guarantee the load order. One benefit is that KSP will output a warning and won't load an assembly if it's dependencies aren't met (which may be better than puking out a bunch of exceptions). The only other real problem with the forced to the top of the sort list method is that technically there's a couple characters before zero ('~', '!', '@', etc.) and dlls directly in GameData come first too. Of course someone pretty much has to be trying to break things if you have to worry about this particular case. Expand I wasn't, thanks, will be updating with this immediately, will also update the OP. Greatly appreciate it New release, 0.1.6.1, The Nightingale Update Added KSPAssembly to AssemblyInfo.cs, will help with load order of DLLs Mod authors should add the following line to their AssemblyInfo.cs to control the loading order: [assembly: KSPAssemblyDependency("ToolbarController", 1, 0)] Thanks to @nightingale for the information about this Quote Link to comment Share on other sites More sharing options...
linuxgurugamer Posted April 15, 2018 Author Share Posted April 15, 2018 On 4/13/2018 at 3:43 PM, releansol said: Is there a way to change the sequence in stock bar (without coding)? Expand No On 4/8/2018 at 3:40 PM, DStaal said: An idea I had, related to this an the stock problem of to many preference pages: With more and more mods using this, I'm starting to get a lot of preference panes with only the one button: Whether to use the toolbar or not. Would it be possible for *this* mod to create a preference pane, and aggregate the mods that are using it, so that you just have an array of buttons? I'd guess you'd want to make it opt-in on the other mod's part, so if they have other options they don't need to have this one option be on it's own - but for the mods which only have this one option, opting in would greatly reduce clutter for the user, and the amount of clicks it takes to start a new save. Expand Thanks for the suggestion. It took a week, but is now available. Once I finish all my mod updates, I'll be go8ng back and updating the ones I did earlier Quote Link to comment Share on other sites More sharing options...
Wyzard Posted April 15, 2018 Share Posted April 15, 2018 Although I think ToolbarController's new stock/Blizzy switching option is a great idea, it's currently a little dangerous because it allows you to select the Blizzy option even when the Blizzy toolbar isn't installed — including for ToolbarController itself. I don't use Blizzy, but if I click the ToolbarController button in the space center and then click the Blizzy checkbox on the ToolbarController line, the ToolbarController button immediately disappears from the stock toolbar (and a NullReferenceException is thrown). If I were to close the window at that point, I'd have no way to get it back (except by installing the Blizzy toolbar, I guess). I'd suggest disabling the checkboxes in the Blizzy column when that mod isn't installed. They can still be visible, to make it clear that the option exists, but there's no sense in having the option be selectable when it isn't actually usable. On a related but separate note, going forward you may want to think about how ToolbarController interacts with Adjustable Mod Panel, since they now both have options to hide and show toolbar buttons. They do slightly different things: AMP only controls the stock toolbar, but it lets you hide buttons in specific scenes rather than just globally. But they overlap, and it's a little awkward that a mod can be configured as hidden in TC but visible in AMP, or vice versa; maybe the two could integrate together somehow when both are installed. Quote Link to comment Share on other sites More sharing options...
linuxgurugamer Posted April 15, 2018 Author Share Posted April 15, 2018 So you found a bug regards the window, but if Blizzy isnt available should be shown on stock regardless, I’ll have to fix that and add some supporting text to the help window. Regarding AMP, its buggy and quirky. The overlap is there, but AMP runs after this (in a manner of speaking) and shouldn’t interfere. Quote Link to comment Share on other sites More sharing options...
linuxgurugamer Posted April 15, 2018 Author Share Posted April 15, 2018 New release, 0.1.6.2 Fixed nullref when setting textures and no stock button set New release, 0.1.6.3: Fixed nullrefs when blizzy toolbar not installed Added code to always show buttons on stock if lbizzy not installed Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.