diff --git a/Dalamud/Game/Internal/Gui/Toast/QuestToastOptions.cs b/Dalamud/Game/Internal/Gui/Toast/QuestToastOptions.cs new file mode 100755 index 000000000..7e7f46484 --- /dev/null +++ b/Dalamud/Game/Internal/Gui/Toast/QuestToastOptions.cs @@ -0,0 +1,36 @@ +namespace Dalamud.Game.Internal.Gui.Toast +{ + public sealed class QuestToastOptions + { + /// + /// Gets or sets the position of the toast on the screen. + /// + public QuestToastPosition Position { get; set; } = QuestToastPosition.Centre; + + /// + /// Gets or sets the ID of the icon that will appear in the toast. + /// + /// This may be 0 for no icon. + /// + public uint IconId { get; set; } = 0; + + /// + /// Gets or sets a value indicating whether the toast will show a checkmark after appearing. + /// + public bool DisplayCheckmark { get; set; } = false; + + /// + /// Gets or sets a value indicating whether the toast will play a completion sound. + /// + /// This only works if is non-zero or is true. + /// + public bool PlaySound { get; set; } = false; + + internal (uint, uint) DetermineParameterOrder() + { + return this.DisplayCheckmark + ? (ToastGui.QuestToastCheckmarkMagic, this.IconId) + : (this.IconId, 0); + } + } +} diff --git a/Dalamud/Game/Internal/Gui/Toast/QuestToastPosition.cs b/Dalamud/Game/Internal/Gui/Toast/QuestToastPosition.cs new file mode 100755 index 000000000..071a719b3 --- /dev/null +++ b/Dalamud/Game/Internal/Gui/Toast/QuestToastPosition.cs @@ -0,0 +1,9 @@ +namespace Dalamud.Game.Internal.Gui.Toast +{ + public enum QuestToastPosition + { + Centre = 0, + Right = 1, + Left = 2, + } +} diff --git a/Dalamud/Game/Internal/Gui/Toast/ToastOptions.cs b/Dalamud/Game/Internal/Gui/Toast/ToastOptions.cs new file mode 100755 index 000000000..d8ad8bbcf --- /dev/null +++ b/Dalamud/Game/Internal/Gui/Toast/ToastOptions.cs @@ -0,0 +1,15 @@ +namespace Dalamud.Game.Internal.Gui.Toast +{ + public sealed class ToastOptions + { + /// + /// Gets or sets the position of the toast on the screen. + /// + public ToastPosition Position { get; set; } = ToastPosition.Bottom; + + /// + /// Gets or sets the speed of the toast. + /// + public ToastSpeed Speed { get; set; } = ToastSpeed.Slow; + } +} diff --git a/Dalamud/Game/Internal/Gui/Toast/ToastPosition.cs b/Dalamud/Game/Internal/Gui/Toast/ToastPosition.cs new file mode 100755 index 000000000..1a0aecda5 --- /dev/null +++ b/Dalamud/Game/Internal/Gui/Toast/ToastPosition.cs @@ -0,0 +1,8 @@ +namespace Dalamud.Game.Internal.Gui.Toast +{ + public enum ToastPosition : byte + { + Bottom = 0, + Top = 1, + } +} diff --git a/Dalamud/Game/Internal/Gui/Toast/ToastSpeed.cs b/Dalamud/Game/Internal/Gui/Toast/ToastSpeed.cs new file mode 100755 index 000000000..0c3a4c104 --- /dev/null +++ b/Dalamud/Game/Internal/Gui/Toast/ToastSpeed.cs @@ -0,0 +1,15 @@ +namespace Dalamud.Game.Internal.Gui.Toast +{ + public enum ToastSpeed : byte + { + /// + /// The toast will take longer to disappear (around four seconds). + /// + Slow = 0, + + /// + /// The toast will disappear more quickly (around two seconds). + /// + Fast = 1, + } +} diff --git a/Dalamud/Game/Internal/Gui/ToastGui.cs b/Dalamud/Game/Internal/Gui/ToastGui.cs index 9ed50d7e1..8b5df8b2c 100755 --- a/Dalamud/Game/Internal/Gui/ToastGui.cs +++ b/Dalamud/Game/Internal/Gui/ToastGui.cs @@ -2,6 +2,8 @@ using System.Collections.Generic; using System.Runtime.InteropServices; using System.Text; + +using Dalamud.Game.Internal.Gui.Toast; using Dalamud.Game.Text.SeStringHandling; using Dalamud.Hooking; @@ -394,77 +396,4 @@ namespace Dalamud.Game.Internal.Gui } } } - - public sealed class ToastOptions - { - /// - /// Gets or sets the position of the toast on the screen. - /// - public ToastPosition Position { get; set; } = ToastPosition.Bottom; - - /// - /// Gets or sets the speed of the toast. - /// - public ToastSpeed Speed { get; set; } = ToastSpeed.Slow; - } - - public enum ToastPosition : byte - { - Bottom = 0, - Top = 1, - } - - public enum ToastSpeed : byte - { - /// - /// The toast will take longer to disappear (around four seconds). - /// - Slow = 0, - - /// - /// The toast will disappear more quickly (around two seconds). - /// - Fast = 1, - } - - public sealed class QuestToastOptions - { - /// - /// Gets or sets the position of the toast on the screen. - /// - public QuestToastPosition Position { get; set; } = QuestToastPosition.Centre; - - /// - /// Gets or sets the ID of the icon that will appear in the toast. - /// - /// This may be 0 for no icon. - /// - public uint IconId { get; set; } = 0; - - /// - /// Gets or sets a value indicating whether the toast will show a checkmark after appearing. - /// - public bool DisplayCheckmark { get; set; } = false; - - /// - /// Gets or sets a value indicating whether the toast will play a completion sound. - /// - /// This only works if is non-zero or is true. - /// - public bool PlaySound { get; set; } = false; - - internal (uint, uint) DetermineParameterOrder() - { - return this.DisplayCheckmark - ? (ToastGui.QuestToastCheckmarkMagic, this.IconId) - : (this.IconId, 0); - } - } - - public enum QuestToastPosition - { - Centre = 0, - Right = 1, - Left = 2, - } }