linuxgurugamer

[1.8.x] Click Through Blocker

Recommended Posts

1 hour ago, Lisias said:

Now I'm sure. It's the CTB (or/and Toolbar+Blizzy - I'm only mentioning it because it's the other code intervention I did) running on KSP 1.4.4 + MH 1.3  under MacOSX.

By using a old, 1.3 binary, for a mod I'm using (HLAirships), I can select the HLA window (the window border became white) and Shift and Control (and everything else) works.

By using "my" binary, modified to use Toolbar and CTB, when the HLA window is selected, all the keystrokes are ignored.

I hope this is not yet another Unity's idiosyncrasy. :)

 

— EDIT — 

HLA is not the only mod with the issue. Every single mod those window border became white does it, MechJeb2 is another one. I don't know if MJ2 uses or not the CTB, but HLA didn't presented the problem before recompiling with CTB, so it is at least a trigger.

MechJeb does not use CBT

1 hour ago, 4x4cheesecake said:

So, I tried my setup on a linux install and got the same issue but since I had to download all the mods again, I noticed the CTB 1.6.6 update....I just missed it before. Well, lets keep it short: the issue is gone with ne new version of CTB :) No frame drop, not a single spike in memgraph or GC monitor and the GC keeps calm.

@linuxgurugamer thank you very much for your help and the quick update and ofc @DMagic @Lisias thank you too, I really appreciate your help :)

Very strange, the changes I did were very minor.  But, glad to know it solved your problems

Share this post


Link to post
Share on other sites
7 hours ago, linuxgurugamer said:

What do you mean about keystrokes leaking into the game?

ClickThroughBlocker doesn't do anything with keystrokes, only mouse clicks

...guess that explains why I repeatedly had science rovers get damaged after I fiddled with the debug window's gravity hack slider and it released the mouse focus of CTB but not the keyboard focus, resulting in near-instant 12 g as soon as I tried steering the rover.

Share this post


Link to post
Share on other sites
7 hours ago, linuxgurugamer said:

What do you mean about keystrokes leaking into the game?

ClickThroughBlocker doesn't do anything with keystrokes, only mouse clicks

Clarification:  While CTB doesn't do anything with keystrokes, it's quite possible that the window on top may be eating keystrokes,  But it doesn't affect the base game itself

Share this post


Link to post
Share on other sites
42 minutes ago, linuxgurugamer said:

Clarification:  While CTB doesn't do anything with keystrokes, it's quite possible that the window on top may be eating keystrokes,  But it doesn't affect the base game itself

Should be something that CTB relies into, as the HLA didn't presented the problem until I added CTB on it.

Since MJ2 does not use CTB, MJ2 relies on the same thing, as it has the same behaviour. =/

48 minutes ago, Fraktal said:

...guess that explains why I repeatedly had science rovers get damaged after I fiddled with the debug window's gravity hack slider and it released the mouse focus of CTB but not the keyboard focus, resulting in near-instant 12 g as soon as I tried steering the rover.

What is your setup (KSP Version and OS, with or without MH)?

Share this post


Link to post
Share on other sites
2 minutes ago, Lisias said:

Since MJ2 does not use CTB, MJ2 relies on the same thing, as it has the same behaviour. =/

Probably the same code, CTB uses some code from Mechjeb

Share this post


Link to post
Share on other sites
8 minutes ago, Lisias said:

What is your setup (KSP Version and OS, with or without MH)?

Latest Steam version, Windows 10, x64 (albeit only four gigs of RAM). No idea what MH is.

Share this post


Link to post
Share on other sites
Just now, Fraktal said:

Latest Steam version, Windows 10, x64 (albeit only four gigs of RAM). No idea what MH is.

Steam, MacOSX, 16GB Ram. MH is Mission Builder (what I have installed).

So at least is consistent. It's the same for everybody, what it make it plausible to be fixed or perhaps workarounded.

Share this post


Link to post
Share on other sites
1 hour ago, Lisias said:

Steam, MacOSX, 16GB Ram. MH is Mission Builder (what I have installed).

So at least is consistent. It's the same for everybody, what it make it plausible to be fixed or perhaps workarounded.

MH is Making History, which includes the Mission Builder.

And I'm not sure what you mean by "same for everybody", so far, all I see are three, somewhat different issues

Share this post


Link to post
Share on other sites
5 minutes ago, linuxgurugamer said:

MH is Making History, which includes the Mission Builder.

And I'm not sure what you mean by "same for everybody", so far, all I see are three, somewhat different issues

My bad.

Fraktal's problem is similar to mine, and the "good news" is that the problem also happens on Win64, it's not something exclusive to MaxOSX  or Linux. This suggests that the problem can be on a higher, platform independent level - and so, easier accessible.

Would this thing happening on a platform and not in the others (or not happening only on one platform), this would be harder to fix.

Share this post


Link to post
Share on other sites

New release, 0.1.6.7

  • Fixed ArgumentOutOfRangeException in Update

Share this post


Link to post
Share on other sites

For anyone who wishes to disable the CTB functionality, I've created a dummy DLL, available here:

https://github.com/linuxgurugamer/ClickThroughBlocker/releases/download/0.1.6.7/CTB-Dummy.zip

Simply replace the dll in the folder with this one, and it will be disabled.  This can be useful if you are trying to isolate performance problems.

Share this post


Link to post
Share on other sites
4 minutes ago, banditsan said:

@linuxgurugamer does Click Through Blocker have any function for window/element locking from moving or for that better use stock functions?

Nope.  Not part of what it was made to do.

Share this post


Link to post
Share on other sites

I got these for two days now; each time I "do anything with action groups" in VAB, I get a few dozens spammed of these:

NullReferenceException: Object reference not set to an instance of an object
  at KSP.UI.Screens.EditorActionGroups.ConstructGroupActionList () [0x00000] in <filename unknown>:0 
  at KSP.UI.Screens.EditorActionGroups.ConstructGroupList () [0x00000] in <filename unknown>:0 
  at KSP.UI.Screens.EditorActionGroups.ClearSelection (Boolean reconstruct) [0x00000] in <filename unknown>:0 
  at ClickThroughFix.CBTMonitor.Update () [0x00000] in <filename unknown>:0 
 
(Filename:  Line: -1)

I'm not sure if it's again unofficial FAR what's the culprit...

Full log and stuff:
https://www.dropbox.com/s/em3358jrzrt4uxl/2018-10-04_1 KSP.log and stuff.7z?dl=1

Share this post


Link to post
Share on other sites

Oh well, actually the same issue as above is spamming my log after I decided to try Action Group Manager Renewed ... which does not work at all.
Only the choice where the button should be shown is available in Toolbar Controller.

Same issue about "something with action groups and CTB" ...

Edit:

Full log and stuff:
https://www.dropbox.com/s/0lbaubw4tawqfq8/2018-10-05_1 KSP.log and stuff.7z?dl=1

Edited by Gordon Dry

Share this post


Link to post
Share on other sites

@Gordon Dry please remove the unofficial FAR and test to see if thats causing the problem.  I’ll be looking at the log file later today, when I get some time

Share this post


Link to post
Share on other sites

Removing that unofficial FAR really seems to solve the issue ...

But that means nothing tbh - remember that using D3D11 makes the VAB part icons hazy-blue?
 

I mean it means something, but game core also is a weirdo. Or Unity. Nevermind.

Share this post


Link to post
Share on other sites
2 hours ago, Gordon Dry said:

Removing that unofficial FAR really seems to solve the issue ...

But that means nothing tbh - remember that using D3D11 makes the VAB part icons hazy-blue?
 

I mean it means something, but game core also is a weirdo. Or Unity. Nevermind.

Glad that fixed the issue.  For obvious reasons, I can't support any unofficial mods  (other than my own, of course)

Share this post


Link to post
Share on other sites

after updating the tool bar controller in the flight scene i started getting these. 

[EXC 18:35:45.474] FileNotFoundException: Could not load file or assembly 'ClickThroughBlocker, Version=0.1.6.9, Culture=neutral, PublicKeyToken=null' or one of its dependencies.
 

Share this post


Link to post
Share on other sites
3 hours ago, COL.R.Neville said:

after updating the tool bar controller in the flight scene i started getting these. 

[EXC 18:35:45.474] FileNotFoundException: Could not load file or assembly 'ClickThroughBlocker, Version=0.1.6.9, Culture=neutral, PublicKeyToken=null' or one of its dependencies.
 

You need to install the ClickThroughBlocker, or update it

Edited by linuxgurugamer

Share this post


Link to post
Share on other sites

Linux, I wanted to see about adding a wish list item to this mod.  It would really be nice if this would not only block click through from the mouse but also the scroll wheel from zooming when scrolling a menu.  When setting up ScienceAlert ReAlerted, I just about zoomed out to the Mun before I got to the last menu option.

Thanks!

Share this post


Link to post
Share on other sites

Just a note, FMRS uses this. Maybe you might want to add FMRS to the list.

Share this post


Link to post
Share on other sites

I'm pretty sure Mechjeb is using this. My clicks don't seem to interact with game UI elements, but it still untargets my current target while in map mode. This is especially infuriating when using the Maneuver Node Editor in map mode. Is that intended, or am I experiencing some wonky excrements?

Share this post


Link to post
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.