Skip to content

Commit

Permalink
Small improvements to NamePlateGui doc comments
Browse files Browse the repository at this point in the history
  • Loading branch information
nebel committed Jul 14, 2024
1 parent 1ea8dd4 commit d383a03
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 3 deletions.
7 changes: 7 additions & 0 deletions Dalamud/Game/Gui/NamePlate/NamePlateQuotedParts.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@ namespace Dalamud.Game.Gui.NamePlate;
/// A part builder for constructing and setting quoted nameplate fields (i.e. free company tag and title).
/// </summary>
/// <param name="field">The field type which should be set.</param>
/// <remarks>
/// This class works as a lazy writer initialized with empty parts, where an empty part signifies no change should be
/// performed. Only after all handler processing is complete does it write out any parts which were set to the
/// associated field. Reading fields from this class is usually not what you want to do, as you'll only be reading the
/// contents of parts which other plugins have written to. Prefer reading from the base handler's properties or using
/// <see cref="NamePlateInfoView"/>.
/// </remarks>
public class NamePlateQuotedParts(NamePlateStringField field, bool isFreeCompany)
{
/// <summary>
Expand Down
7 changes: 7 additions & 0 deletions Dalamud/Game/Gui/NamePlate/NamePlateSimpleParts.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@ namespace Dalamud.Game.Gui.NamePlate;
/// A part builder for constructing and setting a simple (unquoted) nameplate field.
/// </summary>
/// <param name="field">The field type which should be set.</param>
/// <remarks>
/// This class works as a lazy writer initialized with empty parts, where an empty part signifies no change should be
/// performed. Only after all handler processing is complete does it write out any parts which were set to the
/// associated field. Reading fields from this class is usually not what you want to do, as you'll only be reading the
/// contents of parts which other plugins have written to. Prefer reading from the base handler's properties or using
/// <see cref="NamePlateInfoView"/>.
/// </remarks>
public class NamePlateSimpleParts(NamePlateStringField field)
{
/// <summary>
Expand Down
3 changes: 2 additions & 1 deletion Dalamud/Game/Gui/NamePlate/NamePlateUpdateHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -90,12 +90,13 @@ public interface INamePlateUpdateHandler
/// <summary>
/// Gets or sets the icon ID for the nameplate's marker icon, which is the large icon used to indicate quest
/// availability and so on. This value is read from and reset by the game every frame, not just when a nameplate
/// changes.
/// changes. Setting this to 0 disables the icon.
/// </summary>
int MarkerIconId { get; set; }

/// <summary>
/// Gets or sets the icon ID for the nameplate's name icon, which is the small icon shown to the left of the name.
/// Setting this to -1 disables the icon.
/// </summary>
int NameIconId { get; set; }

Expand Down
10 changes: 8 additions & 2 deletions Dalamud/Plugin/Services/INamePlateGui.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,19 @@ public delegate void OnPlateUpdateDelegate(
/// An event which fires when nameplate data is updated and at least one nameplate has important updates. The
/// subscriber is provided with a list of handlers for nameplates with important updates.
/// </summary>
/// <remarks>
/// Fires after <see cref="OnDataUpdate"/>.
/// </remarks>
event OnPlateUpdateDelegate? OnNamePlateUpdate;

/// <summary>
/// An event which fires when nameplate data is updated. The subscriber is provided with a list of handlers for all
/// nameplates. This event is likely to fire every frame even when no nameplates are actually updated, so in most
/// cases <see cref="OnNamePlateUpdate"/> is preferred.
/// nameplates.
/// </summary>
/// <remarks>
/// This event is likely to fire every frame even when no nameplates are actually updated, so in most cases
/// <see cref="OnNamePlateUpdate"/> is preferred. Fires before <see cref="OnNamePlateUpdate"/>.
/// </remarks>
event OnPlateUpdateDelegate? OnDataUpdate;

/// <summary>
Expand Down

0 comments on commit d383a03

Please sign in to comment.