ConnectedLivingSpace

ConnectedLivingSpace

8.1k Downloads

multiple stick CLS buttons appear when toolbar is not installed

codepoetpbowden opened this issue · 14 comments

commented

I added CLS to a stock 1.02 install and saw the multiple CLS buttons were added to the stock toolbar. When I installed the blizzy toolbar the behavior stopped even though the blizzy toolbar was not being use for CLS.
I had a look at the code, but I have forgotten how it all works!! Also I could not get it to build as it did not understand IButton - is there a missing update to the project file?

commented

Thanks. I will duplicate your steps and have a look.

commented

Interesting. I followed your steps and cannot duplicate issue. What folder path did you install to?

commented

Also, forgot to ask, did you use the KSP installer, or did you use the Zip?

commented

Hadn't seen that one. I'll check it out. Also, I added a class to support Blizzy Toolbar, You had it there back in the day... I'll look at the project file to see if it did not update.

commented

Ok I added ToolbarWrapper.cs to the project file nere in the Master. That was the code to support Blizzy's toolbar. The IButton comes from there. Pull that file, and you should be able to compile now.

commented

Just checked my install, removed Blizzy's toolbar and I have only 1 CLS Icon in Flight. Same with VAB...Now I do have other mods installed, but that should make no difference... I'm using the downloaded version of CLS and not a local build of it...

Okay, just tested a stock install with CLS... no issues...

Are you getting multiple icons in VAB/SPH or in Flight, or both?

commented

I think I just downloaded 1.0.2, and ckan, used ckan to install CLS and that was it. I will try again to see if I can reproduce it.

Phill

From: Joseph Korinek [mailto:[email protected]]
Sent: 12 June 2015 15:37
To: codepoetpbowden/ConnectedLivingSpace
Cc: Philip W. Bowden
Subject: Re: [ConnectedLivingSpace] multiple stick CLS buttons appear when toolbar is not installed (#56)

Just checked my install, removed Blizzy's toolbar and I have only 1 CLS Icon in Flight. Same with VAB...Now I do have other mods installed, but that should make no difference... I'm using the downloaded version of CLS and not a local build of it...


Reply to this email directly or view it on GitHub #56 (comment) . https://github.com/notifications/beacon/AExrO_LKkA7xrKwAEO1PZ0k_PPJVyt2Xks5oSuYSgaJpZM4FA9_c.gif

commented

I can reproduce the issue by:

  1. downloading a clean KSP1.0.2,
  2. download ckan
  3. use ckan to install CLS
  4. play the game

I have al;so found this in the log which looks releveant:

NullReferenceException: Object reference not set to an instance of an object
at UIListItemContainer.ScanChildren (Boolean includeInactive) [0x00000] in :0

at UIListItemContainer.Start () [0x00000] in :0

at UIListItemContainer.FindOuterEdges () [0x00000] in :0

at UIScrollList.PositionNewItems () [0x00000] in :0

at UIScrollList.InsertItem (IUIListObject item, Int32 position, System.String text, Boolean doEasing) [0x00000] in :0

at UIScrollList.AddItem (IUIListObject item, System.String text) [0x00000] in :0

at UIScrollList.AddItem (IUIListObject item) [0x00000] in :0

at ApplicationLauncher.AddModApplication (.ApplicationLauncherButton button) [0x00000] in :0

at ApplicationLauncher.AddModApplication (.OnTrue onTrue, .OnFalse onFalse, .OnHover onHover, .OnHoverOut onHoverOut, .OnEnable onEnable, .OnDisable onDisable, AppScenes visibleInScenes, UnityEngine.Texture texture) [0x00000] in :0

at ConnectedLivingSpace.CLSAddon.OnGUIAppLauncherReady () [0x00000] in :0

at ConnectedLivingSpace.CLSAddon.Start () [0x00000] in :0

commented

I used the zip and installed it to c:\Users\pbowden\Desktop\KSP_win.1.0.2.CLEAN
I am running on windows 8.1 64bit.

commented

I've updated the code to disable and turn off the Use Blizzy Toolbar option in the CLS window.

This should resolve any issues with it's use. If the user previously had it installed and enabled, the check will disable and turn off the option so that it is stored correctly in the settings file.

If the user subsequently reinstalls it or installs it for the first time, they will be required to select it to enable/reenable the Blizzy toolbar. Pull request has been submitted.

I noticed during the pull request yo uhave some active changes in progress, so you can either merge or close my pull request as desired.

commented

I had a little fiddle with it yesterday. I think the the issue can be reproduced by not having blizzy toolbar installed, and then trying to set the "use blizzy toolbar option" in CLS.
It all made me wonder if there was value in being ale to choose between the two. Would it simplify things if it were to just detect blizzy on start up and if it is there use it otherwise revert to stock. It would make the code simpler, and the UI. Would it be loosing much functionality?

commented

Interesting. The correct behavior should be that the option is disabled if Blizzy is not installed. That way, it can still be a choice, but not allow you to "break" it.

However, I'd be glad to make it behave any way you think it should. If you think it should use Blizzy when installed, rather than giving the user the choice, I can make that happen. Or, if you are of a mind and have the time, it IS your mod, so you can certainly make whatever changes you see fit :D

commented

I have not changed anything other than to display the options when there is not active vessel. If you fix resolves the multiple icons problem, then feel free to merge your pull request in and ship it :)

commented

New version released, correcting issue.