Jump to content

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


linuxgurugamer
 Share

Recommended Posts

3 hours ago, devoid said:

It would have helped if you had mentioned that you were running on Linux.

your log is filled with exceptions from KSP-AVC, like the following:


KSP-AVC -> System.ArgumentException: Getting control 0's position in a group with only 0 controls when doing Repaint
Aborting
  at UnityEngine.GUILayoutGroup.GetNext () [0x00000] in <filename unknown>:0 
  at UnityEngine.GUILayoutUtility.BeginLayoutGroup (UnityEngine.GUIStyle style, UnityEngine.GUILayoutOption[] options, System.Type layoutType) [0x00000] in <filename unknown>:0 
  at UnityEngine.GUILayout.BeginHorizontal (UnityEngine.GUIContent content, UnityEngine.GUIStyle style, UnityEngine.GUILayoutOption[] options) [0x00000] in <filename unknown>:0 
  at UnityEngine.GUILayout.BeginHorizontal (UnityEngine.GUILayoutOption[] options) [0x00000] in <filename unknown>:0 
  at KSP_AVC.Toolbar.ToolbarWindow.Window (Int32 windowId) [0x00000] in <filename unknown>:0 
 

 

Remove KSP_AVC and see if that solves the problem

Link to comment
Share on other sites

5 hours ago, linuxgurugamer said:

It would have helped if you had mentioned that you were running on Linux.

your log is filled with exceptions from KSP-AVC, like the following:


KSP-AVC -> System.ArgumentException: Getting control 0's position in a group with only 0 controls when doing Repaint
Aborting
  at UnityEngine.GUILayoutGroup.GetNext () [0x00000] in <filename unknown>:0 
  at UnityEngine.GUILayoutUtility.BeginLayoutGroup (UnityEngine.GUIStyle style, UnityEngine.GUILayoutOption[] options, System.Type layoutType) [0x00000] in <filename unknown>:0 
  at UnityEngine.GUILayout.BeginHorizontal (UnityEngine.GUIContent content, UnityEngine.GUIStyle style, UnityEngine.GUILayoutOption[] options) [0x00000] in <filename unknown>:0 
  at UnityEngine.GUILayout.BeginHorizontal (UnityEngine.GUILayoutOption[] options) [0x00000] in <filename unknown>:0 
  at KSP_AVC.Toolbar.ToolbarWindow.Window (Int32 windowId) [0x00000] in <filename unknown>:0 
 

 

Remove KSP_AVC and see if that solves the problem

 

Ran with only toolbar, toolbar controller, and waypoint manager, as I needed some mod to try to load an icon to the toolbar so it would show up. Updated log file, didn't re-record as I did the same procedure.

https://drive.google.com/drive/folders/1slfwuQfhSwd_C56tknu55PkENL4m6rGN?usp=sharing

Link to comment
Share on other sites

10 minutes ago, linuxgurugamer said:

Ok, the GOOD news is that there aren't any exceptions.

The bad news, I don't know yet what's happening, I may need to build a Linux install to test this.  

Take your time, I know you have a lot of priorities to juggle.  I'll just use stock toolbar for now.  I greatly appreciate the work you do.  Let me know if you need anything (I dev too just not for KSP yet).

Link to comment
Share on other sites

22 minutes ago, devoid said:

Take your time, I know you have a lot of priorities to juggle.  I'll just use stock toolbar for now.  I greatly appreciate the work you do.  Let me know if you need anything (I dev too just not for KSP yet).

I may send you a debug  version, would help to see what's going on.   I'll PM you with the details

Link to comment
Share on other sites

16 hours ago, devoid said:

Ran with only toolbar, toolbar controller, and waypoint manager, as I needed some mod to try to load an icon to the toolbar so it would show up. Updated log file, didn't re-record as I did the same procedure.

 

Do a quick test, please, or maybe you already know the answer:

Actually, two tests:

First, just unlock the positin and size, and then lock it again.  What happens to the cursor?

Second, you will need two buttons for this.  Unlock the button order, reorder them. What happens to the cursor?  Then Lock the button order.  What happens to the cursor?

Thanks

 

Link to comment
Share on other sites

23 minutes ago, linuxgurugamer said:

Do a quick test, please, or maybe you already know the answer:

Actually, two tests:

First, just unlock the positin and size, and then lock it again.  What happens to the cursor?

Second, you will need two buttons for this.  Unlock the button order, reorder them. What happens to the cursor?  Then Lock the button order.  What happens to the cursor?

Thanks

 

I'll test the 2nd this afternoon, but the first I know already.  The cursor completely disappears if I re-lock it. While it's unlocked, I can see the 4-way cursor but ONLY when it's over the toolbar icon.  

Link to comment
Share on other sites

2 minutes ago, devoid said:

I'll test the 2nd this afternoon, but the first I know already.  The cursor completely disappears if I re-lock it. While it's unlocked, I can see the 4-way cursor but ONLY when it's over the toolbar icon.  

Ok, I kind of figured that, thanks.

Will be waiting for the results of the 2nd, thanks

Link to comment
Share on other sites

3 hours ago, devoid said:

I'll test the 2nd this afternoon, but the first I know already.  The cursor completely disappears if I re-lock it. While it's unlocked, I can see the 4-way cursor but ONLY when it's over the toolbar icon.  

I just got a linux install working, and it's happening to me as well, including using the test dll I sent you , so no need to do the test 

:-(

 

Link to comment
Share on other sites

3 minutes ago, linuxgurugamer said:

I just got a linux install working, and it's happening to me as well, including using the test dll I sent you , so no need to do the test 

:-(

 

Yuck, glad you can replicate it though.  Makes it so much easier than playing forum tag with people (specially people who aren't around enough) *hides*

Link to comment
Share on other sites

New release, 1.7.17.2

  • Added code to load textures manually, since Unity tries to compress them in the db
  • Disabled cursor switching on Linux only
     

There appears to be a Unity bug on Linux only, which causes the cursor to disappear when the mod is done with switching cursor, so for now, I've just disabled the cursor swap on Linux only

Link to comment
Share on other sites

46 minutes ago, linuxgurugamer said:

New release, 1.7.17.2

  • Added code to load textures manually, since Unity tries to compress them in the db
  • Disabled cursor switching on Linux only
     

There appears to be a Unity bug on Linux only, which causes the cursor to disappear when the mod is done with switching cursor, so for now, I've just disabled the cursor swap on Linux only

I'm wondering if there's a capitalization issue with the name of the cursor file - just as something that jumps to my head if something works on Mac and Win, but not on Linux.  (Linux is case-sensitive.  Most filesystems for Mac and Win aren't.)

Link to comment
Share on other sites

7 hours ago, linuxgurugamer said:

New release, 1.7.17.2

  • Added code to load textures manually, since Unity tries to compress them in the db
  • Disabled cursor switching on Linux only
     

There appears to be a Unity bug on Linux only, which causes the cursor to disappear when the mod is done with switching cursor, so for now, I've just disabled the cursor swap on Linux only

@linuxgurugamer Updated but now some of my toolbar buttons are gray squares, where as they weren't on the last version: https://imgur.com/a/uZx6a Reverting for now.

Link to comment
Share on other sites

1 hour ago, leatherneck6017 said:

@linuxgurugamer Updated but now some of my toolbar buttons are gray squares, where as they weren't on the last version: https://imgur.com/a/uZx6a Reverting for now.

having the same issue here:

[ERR 02:13:36.159] [Toolbar] [ERROR] Cannot find texture to load:<snip>/Kerbal Space Program_current/KSP_Data/../GameData/ScienceChecklist/ChecklistSmall.png

[ERR 02:13:36.162] [Toolbar] [ERROR] Cannot find texture to load:<snip>/Kerbal Space Program_current/KSP_Data/../GameData/Chatterer/Textures/chatterer_icon_toolbar

"ChecklistSmall.png" (assuming that is the [x] science icon) I could not find as file, but I found a "chatterer_icon_toolbar.dds" in ./GameData/Chatterer/Textures. both are grey to me

Link to comment
Share on other sites

2 hours ago, leatherneck6017 said:

@linuxgurugamer Updated but now some of my toolbar buttons are gray squares, where as they weren't on the last version: https://imgur.com/a/uZx6a Reverting for now.

 

12 minutes ago, LatiMacciato said:

having the same issue here:

[ERR 02:13:36.159] [Toolbar] [ERROR] Cannot find texture to load:<snip>/Kerbal Space Program_current/KSP_Data/../GameData/ScienceChecklist/ChecklistSmall.png

[ERR 02:13:36.162] [Toolbar] [ERROR] Cannot find texture to load:<snip>/Kerbal Space Program_current/KSP_Data/../GameData/Chatterer/Textures/chatterer_icon_toolbar

"ChecklistSmall.png" (assuming that is the [x] science icon) I could not find as file, but I found a "chatterer_icon_toolbar.dds" in ./GameData/Chatterer/Textures. both are grey to me

What OS are you running?

And, a list of the missing icons would be helpful.

I wonder if it's the code to load the icon files, it did get changed at some point recently

It just happened to me with Chatterer.  I still need the list of mod so whatever I fix will be tested against.

Oh, it's the dds format.  I'll fix ASAP

Edited by linuxgurugamer
Link to comment
Share on other sites

51 minutes ago, linuxgurugamer said:

New release: 1.7.17.3

  • Added dds format to texture loading code

I'm using Ubuntu to answer ya question earlier :D BTW i love how you take care of the necessary stuff! ty!

Edited by LatiMacciato
Link to comment
Share on other sites

1 hour ago, leatherneck6017 said:

@linuxgurugamer I'm sorry to report that I still have the gray box issue with TAC Fuel Balancer and ScienceAlert. Both use PNG files in their source. Could it be something to do with the way their DLL's were compiled?

No, I'll download them and take a look

Link to comment
Share on other sites

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.

 Share

×
×
  • Create New...