Jump to content

[1.12.x] Toolbar Continued - Common API for draggable/resizable buttons toolbar


Recommended Posts

The UnBlur dependency has been removed

CKAN has been updated with this information

 

Dependencies

 

With @blizzy78's blessing (request, actually), I'm continuing support for this mod.  Original thread is here: http://forum.kerbalspaceprogram.com/index.php?/topic/55420-120-toolbar-1713-common-api-for-draggableresizable-buttons-toolbar/

Hi, there are quite a few plugins now that add various GUI buttons to the game. Right now, every plugin author has to implement button behaviour themselves. Also, there is no consistent button style between different plugins' buttons.

I have written a plugin that is targeted towards those plugins. Specifically, it provides an API for third-party plugins to provide GUI buttons to a toolbar. Those buttons then can invoke an arbitrary action specified by the plugin's author, such as opening a new window. The ultimate goal of this plugin is the separation of specifying a button's contents (such as text or image) and its action from the actual display style and position of the button. The player should be free to position buttons anywhere they please.

Availability

There is now a dependency to the ClickThroughBlocker (Minimum version of the ClickThroughBlocker needs to be 0.1.7)

Older video demonstrating some of the features:

 

 

Mod spotlight from HAWX Gaming:

 

 

Feature List

 

  • A draggable and resizable toolbar holds all buttons
  • Buttons have a texture (icon)
  • Custom button order can be maintained
  • Unlimited number of toolbars per game scene
  • Custom button folders can be created to improve organization
  • Toolbar position is saved between KSP restarts
  • Toolbar will auto-clamp to screen area so that it cannot be dragged off-screen
  • Toolbar may auto-hide itself if positioned at screen edge
  • Clicking a button invokes an arbitrary action specified by plugin author
  • Every button looks the same, no need for plugin author to provide any styles

 

Please note that this is not a regular plugin in the usual sense. You can install it, but it won't actually do anything on its own unless being told to do so by other plugins.

However, if you're a player and would like your favorite plugin to use the Toolbar Plugin, please tell that plugin's author to look into it.

Are you a plugin author and would like to use the Toolbar Plugin? Please head over to the development thread which has all the info you need.

Frequently Asked Questions

Your download link is dead!?

It is not. It works just fine. Clear your browser's cache and try again.

How do I reposition the toolbar on my screen?

Click on the little triangle button on the toolbar, then select "Unlock Position and Size" from the menu. You can now drag the toolbar around. When done, click on the triangle button again, then select "Lock Position and Size."

How do I change the layout of the toolbar? I want there to be two rows of buttons, or two columns, or ...

Click on the little triangle button on the toolbar, then select "Unlock Position and Size" from the menu. You can now resize the toolbar by clicking and dragging in the lower-right corner of it. When done, click on the triangle button again, then select "Lock Position and Size."

How do I change the order of the buttons?

Click on the little triangle button on the toolbar, then select "Unlock Button Order" from the menu. You can now drag the buttons around. When done, click on the triangle button again, then select "Lock Button Order."

Does the toolbar remember position, layout, button order, and button visibility dependent on current game scene?

Yes, all those settings are saved dependent on the current game scene.

Is there a way to automatically hide the toolbar when I don't need it?

First, drag the toolbar to the screen edge. Then, click the triangle button and select "Activate Auto-Hide at Screen Edge" from the menu. The toolbar should now auto-hide itself when the mouse pointer is not hovering above it. To disable this behaviour, click the triangle button again, then select "Deactivate Auto-Hide at Screen Edge."

I've installed a new plugin, how do I make its buttons visible?

Click on the little triangle button on the toolbar, then select "Configure Visible Buttons" from the menu. Activate or deactivate buttons as desired. Click "Close" to close the configuration window.

How do I create a new button folder? How do I put buttons into a folder?

Click the triangle button, then select "Create New Folder" from the menu.

To put buttons into the folder, click the triangle button, then select "Unlock Button Order" from the menu. Then drag any regular button onto the folder button (not into the folder, should it be visible.) To exit the button drag mode, click the triangle button, then select "Lock Button Order."

How do I delete a button folder?

Right-click on the button folder, then select "Delete Folder" from the menu.

Folders are not enough, I need more toolbars. How do I add them?

Click the triangle button, then select "Create New Toolbar" to add a new toolbar.

How do I delete a toolbar?

Click the triangle button on the toolbar in question, then select "Delete Toolbar". Note that you cannot delete the last toolbar.

How do I change a folder button's tool tip text?

Right-click on the button folder, then select "Edit Folder Settings" from the menu.

I like the KSP GUI skin better than Unity's default, is there a way to make the buttons look like that?

Click the triangle button, then select "Use KSP Skin" from the menu. To revert back to Unity's default skin, click the triangle button again, then select "Use Unity 'Smoke' Skin."

Is there a way to hide the toolbar's border?

Click the triangle button, then select "Hide Border" from the menu. To show the border again, click the triangle button again, then select "Show Border."

My toolbar is all messed up, how do I reset it completely?

To reset to defaults completely, exit KSP, delete the GameData\toolbar-settings.dat file from your installation, then start KSP again.

Edited by linuxgurugamer
Link to comment
Share on other sites

  • 3 weeks later...
  • 4 weeks later...
  • 1 month later...
On 7/31/2017 at 2:14 AM, DeltaDizzy said:

CKAN failed to grab Blizzy's version, so I checked that thread, found this, and am now sailing smoothly into my new RP-0 save.

 

2 hours ago, Brigadier said:

I don't know if it is intended, but the CKAN Homepage entry for this mod still points to the old forum thread.  Perhaps it should point here.

Sounds like I need to take a look at the CKAN entry for this

Link to comment
Share on other sites

On 7/31/2017 at 2:14 AM, DeltaDizzy said:

CKAN failed to grab Blizzy's version, so I checked that thread, found this, and am now sailing smoothly into my new RP-0 save.

@DeltaDizzy what version of KSP are you playing?  I just checked, am fixing the homepage but everything else is correct

Link to comment
Share on other sites

5 hours ago, linuxgurugamer said:

@DeltaDizzy what version of KSP are you playing?  I just checked, am fixing the homepage but everything else is correct

<Explanation>

It was a while ago

1.2.2(because RP-0)

CKAN said it couldnt get toolbar

I investigated

I found this thread

Problem solved

</Explanation>

Edited by DeltaDizzy
Link to comment
Share on other sites

  • 2 weeks later...
1 hour ago, fowlplayuk said:

@linuxgurugamer 

Hey, sorry, complete noob question, but CKAN is still showing the older version to this.

Is it just slow to update or am I missing something real obvious?

Sorry, it literally updated as I posted that.

Patience is a virtue.  I ask all to practice it for a few days, not just for me, but for all modders 

Link to comment
Share on other sites

Cant apologise enough there. I really should know better. Kudos for all the hard work you and all the other modders are putting in. Especially after 1.3.1 came along and broke everything. Please forgive my noobness. As Im sure you can tell, I dont know the 1st thing about the magic you make

Link to comment
Share on other sites

10 hours ago, fowlplayuk said:

Especially after 1.3.1 came along and broke everything. Please forgive my noobness.

Noob Tip nr 1 (it can't be highlighted enough): if a patch 'coming along' manages to break anything, you are playing the game from the wrong folder (Steam, I presume?).

Copy a clean game folder to a different place on your harddisk, and only ever mod and play the game from that copy - your games will never again be bothered by updates, and it will be a lot easier to exercise patience while modders catch up (because the 'old' game will still work as normal, letting you leisurely finish your running careers/projects).

Link to comment
Share on other sites

Hey @swjr-swis

Thanks for the tip!

You're right, I just run it from the steam client. I've only been PC gaming for about a year now. It's all really new to me. I'll be sure to do that once the dust settles on this one. Do I literally just make a carbon copy of the KSP folder in Steam and move it somewhere else then? I rely heavily on CKAN (again down to being a noob) so will that check against my steam version or copied version afterwards?

@linuxgurugamer Sorry for turning your thread into noob training. Feel free to have these comments removed if they belong somewhere else 

Link to comment
Share on other sites

38 minutes ago, fowlplayuk said:

Do I literally just make a carbon copy of the KSP folder in Steam and move it somewhere else then? I rely heavily on CKAN (again down to being a noob) so will that check against my steam version or copied version afterwards?

Literally a carbon copy, yes. I'd advise doing it with a clean, unmodded copy so you have a clear starting point (you can zip up your current install as a backup to return to).

CKAN allows you to administer several different instances of KSP with each their own mod set (I know, because I used to do this myself), but it's been a while so for exact instructions on that you would need to ask in the CKAN thread.

If you have other KSP questions that are not directly about the Toolbar mod, feel free to PM me or (better, helpful for others too) create a new thread in either the Gameplay Questions or Technical Support sections of this forum.

Edited by swjr-swis
added CKAN link
Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...