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

Customizable name plate/name overhead options #1524

Draft
wants to merge 11 commits into
base: main
Choose a base branch
from

Conversation

Tranq1
Copy link

@Tranq1 Tranq1 commented Apr 10, 2022

This PR is meant to give players the ability to fine tune how they use the name overhead stuff by giving them more detailed options.

THIS PR IS STILL A DRAFT because implementation is not finished and it's not fully tested, but please feel free to give feedback regardless!

Main Features

  • Fine granular options as to which items/mobiles to display name plates for (✅ implemented)
  • Detailed options page to configure those options (✅ implemented)
  • Ability to switch through configurations by assigning each one a hotkey (✅ implemented)

Planned additional features

  • Switch between configs by pressing shift+ctrl+arrow up/down
  • Add button on the overhead handler gump to allow it to stay up (similar to the macro toggle)
  • Add option to enable health bar below name plate
  • Add option to have background fill act as health bar
  • Add option to show health % in the name plate
  • Add option to allow players to customize min/max name plate width

Options

The available options are currently as follows:

image

How will this change affect players (if they don't like it?)

When the PR is accepted, a default config will be created that mirrors the current functionality and options exactly. This way, players who don't like the new options are not forced to adapt and can simply use the name overhead functionality as they always have.

Demo

overhead_options_settings_demo

@andreakarasho andreakarasho marked this pull request as draft April 14, 2022 14:13
}

Options.Clear();
XmlDocument doc = new();
Copy link
Collaborator

Choose a reason for hiding this comment

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

new XmlDocument() would be better to keep in line with the old net472


string path = Path.Combine(ProfileManager.ProfilePath, "nameoverhead.xml");

using XmlTextWriter xml = new(path, Encoding.UTF8)
Copy link
Collaborator

Choose a reason for hiding this comment

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

No new() for net472

public static bool IsTemporarilyShowing { get; private set; }
public static bool IsShowing => IsPermaToggled || IsTemporarilyShowing || Keyboard.Ctrl && Keyboard.Shift;

private static List<NameOverheadOption> Options { get; set; } = new();
Copy link
Collaborator

Choose a reason for hiding this comment

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

No new() for net472

internal class NameOverheadAssignControl : Control
{
private readonly HotkeyBox _hotkeyBox;
private readonly Dictionary<NameOverheadOptions, Checkbox> checkboxDict = new();
Copy link
Collaborator

Choose a reason for hiding this comment

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

No new() for net472

@@ -44,6 +45,9 @@ internal class NameOverHeadHandlerGump : Gump

public override GumpType GumpType => GumpType.NameOverHeadHandler;

private readonly List<RadioButton> _overheadButtons = new();
Copy link
Collaborator

Choose a reason for hiding this comment

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

No new() for net472

@roxya
Copy link
Collaborator

roxya commented Apr 20, 2022

I think there are too many options. Not sure why there should be special settings for gold, stackables, or different types of corpses. I'd say "own corpse" is going too far, if it can even be done without a hack.

I'm not so sure about having a bunch of game scene input related stuff in the name overhead classes. I don't think we've used this pattern of notifying other objects about keypresses to have their own handling. Would feel better to assign slots and have them in the existing macro system.

About the planned features, I would say hold off on them because the arrows thing doesn't fit with the currently hardcoded arrow key movement, and for the health stuff we already have healthbars AND HP lines AND HP% texts (and quite frankly too many implementations of healthbar handling which could use a good refactor).

The one I would think about is "Add button on the overhead handler gump to allow it to stay up (similar to the macro toggle)". I assume you mean if you press ctrl+shift, that you get the option to keep the names showing when you let go? It will look strange if it was enabled from the macro but it sounds like an idea.

This is all just opinion, at the end of the day it's Karasho who makes the decisions.

dust765 added a commit to dust765/ClassicUO_old that referenced this pull request Jul 22, 2022
@andreakarasho andreakarasho changed the base branch from dev to main November 7, 2022 19:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants