Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UUI integration #1153

Merged
merged 18 commits into from
Sep 20, 2021
Merged

UUI integration #1153

merged 18 commits into from
Sep 20, 2021

Conversation

kianzarrin
Copy link
Collaborator

@kianzarrin kianzarrin commented Sep 3, 2021

user can optionally turn on:

  • UUI's cross-mod hotkey conflict resolution for TMPE.
  • Add TMPE button to UUI.

How it works:

  • I do not check if user is subscribed to UUI. if user is not subscribed I just use the stand alone library.
  • TMPE always uses UUI's cross-mod hot-key resolution. for this reason TMPE's activation key is handled by UUI (so that it can be suppressed).
  • if the "Use UnifiedUI" option is enabled, TMPE icon will appear inside UUI. otherwise it will appear outside UUI. (in both cases UUI's cross-mod hotkey resolution is used.

how to test:
don't use UnifiedUI mod at all
or download latest version from here: https://github.com/kianzarrin/UnifiedUI/releases
the WS version is too old (i will update).

I updated WS

TMPE.zip

@kianzarrin kianzarrin added the UI User interface updates label Sep 3, 2021
@kianzarrin kianzarrin self-assigned this Sep 3, 2021
@kianzarrin
Copy link
Collaborator Author

this is draft because I still need to add option to option menu.
and update TMPE texture

@kianzarrin kianzarrin changed the base branch from master to log-dir September 3, 2021 15:55
@krzychu124
Copy link
Member

why log-dir is the target branch?

@kianzarrin kianzarrin marked this pull request as ready for review September 3, 2021 21:43
Base automatically changed from log-dir to master September 3, 2021 22:12
@@ -82,6 +86,18 @@ public static class OptionsGeneralTab {
defaultValue: GlobalConfig.Instance.Main.MainMenuPosLocked,
eventCallback: OnLockMenuChanged) as UICheckBox;

_useUUI = generalGroup.AddCheckbox(
text: T("General.Checkbox:Use UnifedUI"),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo in UnifiedUI translation key, translation fix will probably be enough

var hotkeys = new UUIHotKeys { ActivationKey = KeybindSettingsBase.ToggleMainMenu.Key };
hotkeys.AddInToolKey(KeybindSettingsBase.ToggleTrafficLightTool.Key);
hotkeys.AddInToolKey(KeybindSettingsBase.LaneArrowTool.Key);
hotkeys.AddInToolKey(KeybindSettingsBase.LaneConnectionsTool.Key, () => Options.laneConnectorEnabled);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Names on the options are ambiguous
We have switches in TM:PE which enable entire feature
And also we have hotkeys which don't toggle the feature, but they activate tool button
Change names for hotkeys which activate tools from ***Enabled to for example Use***Tool

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it is out of scope of this PR. you should create an issue.

@DaEgi01 DaEgi01 self-requested a review September 5, 2021 16:07
Copy link
Member

@krzychu124 krzychu124 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Everything seem to be working in-game, I left one question in the code.

TLM/TLM/State/ConfigData/Main.cs Outdated Show resolved Hide resolved
@krzychu124
Copy link
Member

@kianzarrin hehe, you requested review but didn't change anything 😄
Anyways, I fixed Appveyor build pipeline to include UnifiedUILib.dll in the zip file

Copy link
Member

@krzychu124 krzychu124 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool 👍

@kianzarrin kianzarrin merged commit 3929c58 into master Sep 20, 2021
@kianzarrin kianzarrin deleted the UUI branch September 20, 2021 09:52
@originalfoo originalfoo added Usability Make mod easier to use EXTERNAL Mod conflict or other external factor labels Dec 23, 2021
@originalfoo originalfoo added this to the 11.6.0 milestone Dec 23, 2021
@originalfoo originalfoo modified the milestones: 11.6.0, 11.6.1.2 Jan 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
EXTERNAL Mod conflict or other external factor UI User interface updates Usability Make mod easier to use
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants