Jump to content

[1.2.0] Toolbar 1.7.13 - Common API for draggable/resizable buttons toolbar


blizzy78

Recommended Posts

I think I found the problem. Kerbal Engineer Redux removes its button while the pause menu is open, and the toolbar gets confused if it is currently in auto-hidden mode while being positioned at the right or bottom screen edge. The problem should not occur at the left or top screen edge, or if the toolbar is currently not auto-hidden.

Edit: Fixed it. The bugfix will come with the next update.

Workaround until then: Don't use auto-hide, or don't position at the right or top screen edge if you want auto-hide.

Edited by blizzy78
Link to comment
Share on other sites

Don't know if it is just with my game, but the active area for toolbar locking/unlocking/autohide is really small and appears to be positioned in the lower right part of the rect where that small triangle appears with the toolbar. I believe that, if correct, the active area with those toolbar functions should be covering the whole part where the triangle appears (e.g. the rightmost part with a horizontal toolbar, where no button is displayed).

Link to comment
Share on other sites

I have a suggestion you have probably already thought about. If you can get more mods on board, and I hope they do, eventually the toolbar could become extremely cluttered. I would suggest allowing a button to be a 'folder' that can open up and provide access to the other shortcuts, basically it would just extend another toolbar. Even if specific mods don't use it, allowing the player to group them would be an awesome feature.

Link to comment
Share on other sites

@ blizzy: I reckon that toolbar position and size are saved, for each scene (easy enough to see: those info get written in toolbar-settings.dat).

However, I continue to have the toolbar "lose" its settings about flight mode. Each time I restart the game, my toolbar is back to a (long) horizontal line of buttons, instead of a rect box of x by y. For info in case, my screen is at 1280x960 windowed, the toolbar box positioned @ x=840, y=820, width=137, Height=147, no autohide. No issues with the toolbar in other scenes, but then there are not that many buttons in those so I am fine with just the horizontal line there.

I suspect it may be down to one mod calling the toolbar plugin in a improper way, so forcing it back to default each time it loads.

What may I do to trace what goes on, or would it be possible to have it displayed when your plugin can't load its settings properly or otherwise has to reset them (and possibly what caused that) ?

Thanks again.

Link to comment
Share on other sites

Each time I restart the game, my toolbar is back to a (long) horizontal line of buttons, instead of a rect box of x by y.

I suppose this is caused by how the toolbar handles the addition of new buttons. For example, if your toolbar is currently a single row, and some other plugin decides to add a new button to it, that single row will be extended to the right, maintaining the single row. If you had it in a single column before, the toolbar will extend to the bottom, maintaining the single column.

Now, some plugins will create their buttons after the toolbar has initialized its screen position, provoking the above behaviour. If they created their buttons before that initialization, the same behaviour would take place, but would be "overwritten" by that initialization in a later step. (I hope that does make sense.)

Note that the third-party plugins are not at fault here. Some of them don't need to be started right when the game starts, so they just don't and of course will not create their buttons right away. The Toolbar Plugin cannot differentiate between "plugin has been started and creates its button" (but the button has been known in previous game sessions) and "some plugin creates a new button." So it doesn't really know whether to keep the current toolbar width or not. In the case of a single row it will never keep the current width, in all other cases it will.

I think I have an idea on how to fix this, will need to test it of course.

Link to comment
Share on other sites

I think I have an idea on how to fix this, will need to test it of course.

Thank you. Your explanation is clear, enough for me to get it.

If you need a tester, I'm in (but will be away from PC some days around New Year's eve).

Link to comment
Share on other sites

Toolbar Plugin 1.2.2 is now available for download, adding the ability to hide the toolbar border and switching to the KSP skin for buttons.

Thanks.

I like the ingame update notification thingy ^^

But, this version crashes KSP when returning from the launchpad to the space center.

I can reproduce this by doing the following :

- load a ship on the launch pad,

- playing a little with the toolbar (changing skin, position, ...)

- ESC and return to space center.

I can provide .logs if needed ;)

Link to comment
Share on other sites

Query for Blizzy or anyone else who's run into this before:

In the last couple days, I've realized that MechJeb2 is no longer showing in the Toolbar at all, and Crew Manifest is appearing twice. Both the Crew Manifest icons work, too. And with regard to MechJeb2, the newest version MechJebMenuToolbar.dll IS installed. And it WAS working a few days ago. Toolbar is working fine with Navyfish's Docking Port Alignment Tool and with SteamGauges too.

So the only problems I've got are that Crew Manifest is doubled and MJ2 doesn't show at all. Any idea how I can fix this kind of thing?

Thanks!

Link to comment
Share on other sites

Please check if there is a second Toolbar.dll in GameData\NavyFish\Plugins\ - if so, delete that.

I'm at holiday festivities with family right now but I'll check this afternoon when we get home. Thanks for getting back to me.

EDITED TO ADD: There was indeed. Thanks!

Edited by LameLefty
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...