MechJeb2

MechJeb2

4M Downloads

UI glitches and conflicts with the standard interface

angavrilov opened this issue ยท 5 comments

commented

As noted in the forum thread, the tab on the right in VAB obscures part of the staging interface.

Also, the items in that tab in VAB are very glitchy: when I move the cursor over them the big save/load/etc buttons on the top right flicker (rapidly going between active and inactive), and it can take many tries for a click to be registered. I basically have to spam-click while moving the mouse in order to show the vehicle info window. Interestingly, only the tab is so affected: the info window itself works normally.

Finally, in the normal view, a click on a window shown in the top left corner in order to drag it away also goes through to the native warp control, causing unintended warp if it happens to be in the right place. The easiest work-around could be not to create windows exactly in the corner.

commented

As noted in the forum thread, the tab on the right in VAB obscures part of the staging interface.

Will be fixed at some point

Also, the items in that tab in VAB are very glitchy: when I move the cursor over them the big save/load/etc buttons on the top right flicker (rapidly going between active and inactive), and it can take many tries for a click to be registered.

This is an artifact of our hacky way of preventing click-throughs where you would e.g. select the rocket when you just wanted to click a window. We will keep an eye out for a better way of doing this.

The easiest work-around could be not to create windows exactly in the corner.

Sounds good.

commented

This is an artifact of our hacky way of preventing click-throughs where you would e.g. select the rocket when you just wanted to click a window. We will keep an eye out for a better way of doing this.

Hm, I checked and it seems to work fine for ordinary windows in the VAB, like the vehicle info one. Only the tab causes flicker in the buttons (meaning real flicker, not just them going dark when the mouse enters the window), and simultaneously has problems accepting clicks. Also, I tried with a part sticking out behind the tab, and it actually sometimes lights up if dragging the mouse over the tab with a button pressed down. And the actual 'MechJeb' button that toggles the tab doesn't appear to have the protection at all - clicking on it picks up the part.

commented

OK, I didn't read your initial post carefully enough. I can't reproduce the flickering you're talking about. Does it always happen, or only occasionally? Does it happen with the latest version, 2.0.4?

commented

Excellent, thanks, I've made your change! I'll close this.

commented

It seems it is somehow specific to the native linux version - the windows version in wine doesn't have the problem. Since you apparently don't have linux, I tried to investigate myself, and found that the issue disappears if instead of doing GUILayout.Window(..., new Rect(...,...,200,20),...), the code is changed to::

windowVector.x = Screen.width - windowProgr * 200;
windowVector.y = (Screen.height - windowPos.height) / 2;
windowPos = GUILayout.Window(..., windowPos, ...)

So that the real size of the window computed on the previous pass is fed back to the function, instead of being reset every time.