This is a plugin for Kerbal Space Program that adds a common API for a buttons toolbar. Third-party plugin authors may use the API to add their buttons to the toolbar.
For more information, please visit the Forums Feedback Thread.
This project forked from blizzy78/ksp_toolbar
Common API for GUI toolbars in KSP
License: BSD 2-Clause "Simplified" License
This is a plugin for Kerbal Space Program that adds a common API for a buttons toolbar. Third-party plugin authors may use the API to add their buttons to the toolbar.
For more information, please visit the Forums Feedback Thread.
Hovering anywhere in the Toolbar Button Visibility window turns on a whole bunch of input locks; hovering away correctly turns them back off. But Clicking the window's Close button closes the window without restoring the locks.
(locks get cleared if the window is reopened, hovered in and out; but since there's no way to close the window other than the Close button, that doesn't really help anything)
ksp 1.7.3, toolbar 1.7.22.2, ClickThroughBlocker 0.1.7.2
Posting yet again a "problem" with the latest Toolbar version (1.7.20.0) rendering. As always an image is worth a thousand word so here we go:
Use a pixel perfect application to visualize this, i.e: No resampling/correction/smoothing on zoom. I used GIMP.
First Line are actual PNG icon visual.
Second line is in-game rendering using Toolbar v1.7.18.0, the last version not using unBlur without scaling.
Third line is in-game rendering using Toolbar v1.7.20.0, without unBlur set to 24x24 scaling.
Reference calibration PNG icon at 24x24:
As you can see, something is not right with the way the new scaling works. The third image on the third line shows that, even set to 24x24 native scaling, some sort of manipulation is performed on the icon image. The red, green and yellow dot are completely lost in the process and the middle shows some heavy distortion.
I think that the Toolbar mod should, when set to 24x24, completely disable any form of image manipulation on the icon, just like it did in the past.
Edit: It looks like the plugin use 23x23 internally when set to 24x24 and so on, and so forth for other factors.
While the purple button for [x] Science! Continued is gone with 1.7.22, now the button for TAC Fuel Balancer became purple.
Whenever I create a folder in the toolbar, and assign it a different icon, it always gets reset - I think every time the scene changes. I've even tried directly editing the icon path in the toolbar settings file and changing it to be read-only, but it still keeps on being reset.
Instead of being a hard dependencies, would it be feasible to include an option somewhere to not use it? Personally, I see no reason at all to have it installed. It as problems off it's own and the author seems to have thrown the towel, so to speak...
I can click the arrow and "unlock" and click them but all of the options seem to do nothing.
The about me included.
once I click one of the options everything just closes idk whats up, I have the latest version and I have tried reinstalling the mod to no avail.
You can choose a different icon (blizzy78#16) and it shows correctly when initially selected, but the texturePath is not saved correctly. After exiting the scene and coming back later the icon reverts back to the default 000_Toolbar/folder
With the large monitors now becoming available, its necessary to be able to scale the toolbars
KSP 1.8.0 loads first time, but crashes in subsequent launches.
I've reproduced the issue by installing Toolbar, Toolbar Control and Click Through Blocker mods using CKAN on clean KSP 1.8.0 on Windows.
I've workaround the issue by deleting MiniAVC.dll and MiniAVC.xml from all GameData folders.
I've got ToolBar v1.8.0.5 loaded, using KSP v1.8.1, and ClickThrough Blocker v0.1.9.3 loaded. When I choose the Unlock Position and Size" option, I can not resize the ToolBar, only change it's position. If I'm doing something, I don't know what it is. I've used this mod in the past and not had problems. I recently started playing KSP again.
This gets spammed every time the main menu gets loaded:
_[ERR 16:21:43.535] ToolbarControl: WARNING: RegisterMod, LoadedScene: MAINMENU, called too late for: PartCommander_NS, Part Commander, button may not be registered properly
[ERR 16:21:43.547] ToolbarControl: WARNING: RegisterMod, LoadedScene: MAINMENU, called too late for: RCSBuildAid_NS, RCS Build Aid, button may not be registered properly_
A few other mods also gets reported.
Full log here: Full Log at Mediafire
Also, is it really necessary to have a MAINMENU section in the Toolbar-Settings.dat file? It gets filled with non sense toolbar definitions even though no toolbar were explicitly created there:
_MAINMENU
{
toolbar_112650527
{
x = 1580
y = -3
width = 733
height = 38
autoHide = False
drawBorder = False
useKSPSkin = True
buttonOrder = __TOOLBAR_INTERNAL.configureVisibleButtons,KerbalAlarmClock.btnToolbarIcon,ScienceChecklist.checklist_button,test.buttonDOSettings,ThrottleControlledAvionics.ThrottleControlledAvionicsButton,ToolbarController_NS.toolbarControllerButton,AmpYear.button1,WALKABOUT_NS.walkaboutButton,FinalFrontier.button,TACLifeSupport.button1,SCANsat.KSCMap,BetterTimeWarp_NS.betterTimeWarpButton,ContractsWindow.ContractWindowPlus,Kerbal_Construction_Time.MainButton
visibleButtons = test.buttonDOSettings,BetterTimeWarp_NS.betterTimeWarpButton,FinalFrontier.button,HaystackReContinued_NS.haystackContinuedButton,Patchmanger_NS.patchManagerButton,SCANsat.KSCMap,ferram4.FARDebugButtonBlizzy,Kerbal_Construction_Time.MainButton,ScienceChecklist.checklist_button,ScienceChecklist.status_button,TACLifeSupport.button1,ContractsWindow.ContractWindowPlus,KerbalAlarmClock.btnToolbarIcon,ThrottleControlledAvionics.ThrottleControlledAvionicsButton,ContractRewardModifier.CMToolbarID,WALKABOUT_NS.walkaboutButton,AmpYear.button1
}
toolbar_1383093420
{
x = 1678
y = -3
width = 571
height = 38
autoHide = False
drawBorder = False
useKSPSkin = True
buttonOrder = __TOOLBAR_INTERNAL.configureVisibleButtons,BetterTimeWarp_NS.betterTimeWarpButton,KerbalAlarmClock.btnToolbarIcon,RCSBuildAid_NS.RCSBuildAidButton,FinalFrontier.button,ThrottleControlledAvionics.ThrottleControlledAvionicsButton,WASD_NS.wasdButton,ReCoupler.ReCoupler,AmpYear.button1,TACLifeSupport.button1,ScienceChecklist.checklist_button,ContractsWindow.ContractWindowPlus,Kerbal_Construction_Time.MainButton,WaypointManager.button
visibleButtons = BetterTimeWarp_NS.betterTimeWarpButton,FinalFrontier.button,HaystackReContinued_NS.haystackContinuedButton,Kerbal_Construction_Time.MainButton,PartWizard_NS.partWizardButton,RCSBuildAid_NS.RCSBuildAidButton,sirkut.IRButton,StageRecovery_NS.stageControlButton,WASD_NS.wasdButton,WaypointManager.button,ScienceChecklist.checklist_button,ScienceChecklist.status_button,KerbalAlarmClock.btnToolbarIcon,TACLifeSupport.button1,ContractsWindow.ContractWindowPlus,ThrottleControlledAvionics.ThrottleControlledAvionicsButton,AmpYear.button1,ReCoupler.ReCoupler
}
toolbar_2110259249
{
x = 753
y = -3
width = 250
height = 38
autoHide = False
drawBorder = False
useKSPSkin = True
buttonOrder = __TOOLBAR_INTERNAL.configureVisibleButtons,MechJeb2.Custom_Window_Editor,MechJeb2.Design_Info,MechJeb2.Delta-V_Stats
visibleButtons = MechJeb2.Design_Info,MechJeb2.Delta-V_Stats,MechJeb2.Custom_Window_Editor,MechJeb2.MechJeb2MenuButton
}
toolbar_1582030038
{
x = 1106
y = 1045
width = 1142
height = 38
autoHide = False
drawBorder = True
useKSPSkin = True
buttonOrder = __TOOLBAR_INTERNAL.configureVisibleButtons,SCANsat.UIMenu,KerbalAlarmClock.btnToolbarIcon,ScienceChecklist.checklist_button,FinalFrontier.button,PersistentRotation.button,TACLifeSupport.button1,AmpYear.button1,Trajectories.TrajectoriesGUI,WaypointManager.button,ThrottleControlledAvionics.ThrottleControlledAvionicsButton,TWR1_NS.flightPlanButton
visibleButtons = FerramAerospaceResearch.FARFlightButtonBlizzy,FinalFrontier.button,ScienceChecklist.status_button,ScienceChecklist.checklist_button,SCANsat.UIMenu,TWR1_NS.flightPlanButton,WaypointManager.button,KerbalAlarmClock.btnToolbarIcon,TACLifeSupport.button1,HaystackReContinued_NS.haystackContinuedButton,ThrottleControlledAvionics.ThrottleControlledAvionicsButton,AmpYear.button1,Trajectories.TrajectoriesGUI
}
toolbar_49774081
{
x = 211
y = -35
width = 250
height = 38
autoHide = True
drawBorder = True
useKSPSkin = True
buttonOrder =
visibleButtons = BetterTimeWarp_NS.betterTimeWarpButton
}
toolbar_1849895569
{
x = 661
y = 1077
width = 435
height = 38
autoHide = True
drawBorder = True
useKSPSkin = True
buttonOrder = __TOOLBAR_INTERNAL.configureVisibleButtons,CriticalTemperatureGauge.CriticalTemperatureGaugeSettings,HotSpot.config,KerbalFlightData.KerbalFlightData,NavHud_NS.navhudButton,PlanetShine.Gui,test.buttonDOSettings,SmokeScreen.main,PersistentRotation.button,KerbalFlightIndicators.KerbalFlightIndicators,MechJeb2.Aircraft_Data_Panel
visibleButtons = HotSpot.config,CriticalTemperatureGauge.CriticalTemperatureGaugeSettings,KerbalFlightIndicators.KerbalFlightIndicators,KerbalFlightData.KerbalFlightData,NavHud_NS.navhudButton,PlanetShine.Gui,SmokeScreen.main,test.buttonDOSettings,MechJeb2.Custom_Info_Window,MechJeb2.Aircraft_Data_Panel,PersistentRotation.button,SurfaceExperimentPackage.SEPController
}
toolbar_1223376630
{
x = 204
y = 1077
width = 250
height = 38
autoHide = True
drawBorder = True
useKSPSkin = True
buttonOrder =
visibleButtons = ABFW_NS.abfwButton,EvaEnhancements_NS.evaEnhancementsButton
}
toolbar_1238406290
{
x = 1742
y = 1045
width = 250
height = 38
autoHide = False
drawBorder = True
useKSPSkin = True
buttonOrder = TOOLBAR_INTERNAL.configureVisibleButtons,MechJeb2.Custom_Window_Editor,MechJeb2.Vessel_Info,MechJeb2.Surface_Info,MechJeb2.Scripting_Module,MechJeb2.Warp_Helper,MechJeb2.Smart_A_S_S,MechJeb2.Maneuver_Planner
visibleButtons = MechJeb2.Vessel_Info,MechJeb2.Surface_Info,MechJeb2.Custom_Window_Editor,MechJeb2.Smart_A_S_S,MechJeb2.Maneuver_Planner,MechJeb2.Warp_Helper,MechJeb2.Scripting_Module
}
toolbar_772431615
{
x = 1974
y = -3
width = 250
height = 38
autoHide = False
drawBorder = True
useKSPSkin = True
buttonOrder = _TOOLBAR_INTERNAL.configureVisibleButtons,Targetron.tgbutton,SurfaceExperimentPackage.SEPController,ContractsWindow.ContractWindowPlus,Kerbal_Construction_Time.MainButton
visibleButtons = Kerbal_Construction_Time.MainButton,ContractsWindow.ContractWindowPlus,sirkut.IRButton
}
}
I was digging through the source code for this to learn a bit about modding KSP's UI, and came across a small inconsistency that you may want to clear up.
In Toolbar/Internal/Utils.cs
:63
:
// The following function was initially copied from @JPLRepo's AmpYear mod, which is covered by the GPL, as is this mod
This mod isn't licensed under the GPL, it's licensed under BSD-2.
Since the differences between the original function and this implementation of the function are relatively minor, that is a violation of the GPLv3 license used by AmpYear. You should rewrite the function from scratch & delete the comment referencing this project as being licensed under the GPL.
anal asf, I know; but I figured you would want to know about it sooner rather than later.
the toolbar icons appear over top of stock tooltips.
After updating to ksp 1.8.0, the toolbar icon disappeared, replaced by a small black square
Probably a problem with WASD Editor Camera or something else, didn't test with other mods.
GameData\WasdEditorCamera\Textures\WASD-on-24.png is read ~100 times per second
GameData\toolbar-settings.dat is saved ~500 times per second
The game's memory is growing bigger and bigger
See the attached NirSoft tool export: 1785 / 357 = 5. So the .dat is saved exactly 5 times while the icon is loaded 1 time.
Replication:
I double checked that there isn't gamedata folder in gamedata folder.
Same effect with ModuleManager installed, since I noticed this with my heavily modded pack.
GameData:
000_ClickThroughBlocker\
000_Toolbar\
001_ToolbarControl\
Squad\
WasdEditorCamera\
toolbar-settings.dat
Test environment:
Clean KSP 1.11.1 install
Without DLCs (the same effect with DLCs)
Blizzy's Toolbar / ksp_toolbar (from Toolbar-1.8.0-1.8.0.5.zip)
ToolbarControl (from ToolbarControl-1.8.0-0.1.9.4.zip)
Click Through Blocker (from ClickThroughBlocker-1.10.1-0.1.10.15.zip)
WASD Editor Camera (from WasdEditorCamera-1.10.1-0.7.3.zip)
Logs: https://gist.github.com/hatalmasalma/cd6887de8941d4e8b1a550e59fe722bf
When making these logs, the settings have been already changed, so I just started the game, loaded the save and the VAB, then exited the VAB, then Alt+F4.
NirSoft ProcessActivityView export (have been logging for a few secs)
==================================================
Index : 1
Filename : C:\Kerbal Space Program v1-11-1_2\GameData\WasdEditorCamera\Textures\WASD-on-24.png
Extension : png
Open Count : 357
Close Count : 357
Failed Count : 0
Read Count : 357
Write Count : 0
Read Bytes : 357 000
Write Bytes : 0
Last Handle : 0x00000000000005a8
Last Error Code :
Opened By Module :
Opened By Address : 0x0000000000300101
==================================================
==================================================
Index : 2
Filename : C:\Kerbal Space Program v1-11-1_2\GameData\toolbar-settings.dat
Extension : dat
Open Count : 357
Close Count : 357
Failed Count : 0
Read Count : 0
Write Count : 1785
Read Bytes : 0
Write Bytes : 215 271
Last Handle : 0x00000000000005a8
Last Error Code :
Opened By Module :
Opened By Address : 0x0000000000300101
==================================================
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.