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

Added UI cursor configuration to chrome metric #18458

Merged
merged 1 commit into from
Feb 14, 2021

Conversation

Mailaender
Copy link
Member

This allows different cursors in menus and in-game.

@pchote
Copy link
Member

pchote commented Jul 29, 2020

Did you consider defining these on ViewportControllerWidget? We are already defining a bunch of ingame cursor types there, so it would be a much better fit than the chrome metrics (that we should be aiming to remove, not expand!).

@Mailaender
Copy link
Member Author

Mailaender commented Jul 29, 2020

Yes, I tried a few things to keep this isolated to mod code only with custom button widgets which breaks as soon as I hit scroll panels which inherit the default button and also all UI configuration have to be forked. Changing the default and hacking view port controller and world interaction widget failed for me as those don't control all the cursors, they return null only for the IOrderGenerator to override them. Finally, I went with this which is minimally invasive and removes some hardcoding which probably is always good. ViewportControllerWidget is probably not available in Game.cs.

mods/common/metrics.yaml Outdated Show resolved Hide resolved
@Mailaender Mailaender force-pushed the unhardcode-cursors branch 2 times, most recently from 5d73694 to 8c69dea Compare October 18, 2020 16:37
OpenRA.Game/Orders/UnitOrderGenerator.cs Outdated Show resolved Hide resolved
OpenRA.Mods.Common/Widgets/ButtonWidget.cs Outdated Show resolved Hide resolved
@pchote
Copy link
Member

pchote commented Oct 18, 2020

Can you please also squash the fixups after addressing that last issue?

@pchote
Copy link
Member

pchote commented Oct 22, 2020

The latest version appears to have reverted the earlier changes to remove WidgetDefaultCursor.

@Mailaender
Copy link
Member Author

You specifically asked for it in #18458 (comment)

@pchote
Copy link
Member

pchote commented Oct 24, 2020

No, that example has WorldDefaultCursor, but specifically asked to remove WidgetDefaultCursor, which I then elaborated on further in #18458 (comment). You did that in the previous round of commits, but appear to have undone those changes possibly by force-pushing changes made on a stale local branch?

@Mailaender
Copy link
Member Author

Ah now I see. Got confused there. Should be fixed now.

abcdefg30
abcdefg30 previously approved these changes Nov 26, 2020
Copy link
Member

@abcdefg30 abcdefg30 left a comment

Choose a reason for hiding this comment

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

Lgtm otherwise.

OpenRA.Game/Widgets/Widget.cs Outdated Show resolved Hide resolved
@pchote pchote merged commit e7cfd27 into OpenRA:bleed Feb 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants