Skip to content

Commit

Permalink
config window respects UI toggle (F2)
Browse files Browse the repository at this point in the history
  • Loading branch information
JonnyOThan committed Jul 24, 2024
1 parent 81af6ae commit bfe7e29
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 12 deletions.
13 changes: 6 additions & 7 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,19 @@

## Unreleased

### New Dependencies

* ClickThroughBlocker
* ToolbarController

### Notable Changes

* New dependencies: ClickThroughBlocker, ToolbarController
* Remove patch that disables scatterer's temporal antialiasing
* Better default profile settings (mostly removing the neutral tonemapper which tended to result in a desaturated image)
* Added toolbarcontrol integration (you can use this to hide the toolbar button)
* Added clickthroughblocker support and other code to prevent mouse interactions from affecting other things when interacting with the config window
* Fixed icons appearing blurry when game is not at full texture resolution
* Added a "close window" button to the config window so that you can click it when in photo mode. To use TUFX in photo mode:
* Open the TUFX window
* Press escape
* Press F2
* You can now move the camera around and change TUFX settings
* When you have the settings you like, close the TUFX window and press F1 to take a screenshot
* TUFX window is now hidden when you press F2 (this is useful in photo mode - press escape then F2)
* Disable stock antialiasing when HDR and bloom are enabled to prevent strobing artifacts
* Configuration window now loads and saves directly to cfg files
* Redesigned profile editor UI
Expand Down
13 changes: 8 additions & 5 deletions Source/GUI/ConfigurationGUI.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using ClickThroughFix;
using KSP.UI;
using System;
using System.Collections.Generic;
using System.Linq;
Expand Down Expand Up @@ -82,12 +83,14 @@ public void OnGUI()
{
try
{
windowRect = ClickThruBlocker.GUIWindow(windowID, windowRect, updateWindow, "TUFXSettings", HighLogic.Skin.window);
if (UIMasterController.Instance.IsUIShowing)
{
windowRect = ClickThruBlocker.GUIWindow(windowID, windowRect, updateWindow, "TUFXSettings", HighLogic.Skin.window);

var rectTransform = transform as RectTransform;
rectTransform.anchoredPosition = new Vector2(windowRect.x, Screen.height - windowRect.y - windowRect.height);
rectTransform.sizeDelta = new Vector2(windowRect.width, windowRect.height);

var rectTransform = transform as RectTransform;
rectTransform.anchoredPosition = new Vector2(windowRect.x, Screen.height - windowRect.y - windowRect.height);
rectTransform.sizeDelta = new Vector2(windowRect.width, windowRect.height);
}
}
catch (Exception e)
{
Expand Down

0 comments on commit bfe7e29

Please sign in to comment.