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

chore: refactor event window #2365

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions Intersect (Core)/Enums/EventResponseType.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
namespace Intersect.Enums;

public enum EventResponseType
{
OneOption = 1,

TwoOption,

ThreeOption,

FourOption,
}
3 changes: 2 additions & 1 deletion Intersect.Client/Core/Input.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
using Intersect.Client.Maps;
using Intersect.Client.Networking;
using Intersect.Configuration;
using Intersect.Enums;
using Intersect.Utilities;

namespace Intersect.Client.Core;
Expand Down Expand Up @@ -97,7 +98,7 @@ public static void OnKeyPressed(Keys modifier, Keys key)
var eventWindow = (EventWindow)Interface.Interface.InputBlockingElements[i];
if (eventWindow != null && !eventWindow.IsHidden && Globals.EventDialogs.Count > 0)
{
eventWindow.EventResponse1_Clicked(null, null);
eventWindow.CloseEventResponse(EventResponseType.OneOption);
canFocusChat = false;

break;
Expand Down
12 changes: 6 additions & 6 deletions Intersect.Client/Entities/Events/Dialog.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,17 @@ public partial class Dialog
{
public Guid EventId;

public string Face = "";
public string Face = string.Empty;

public string Opt1 = "";
public string Opt1 = string.Empty;

public string Opt2 = "";
public string Opt2 = string.Empty;

public string Opt3 = "";
public string Opt3 = string.Empty;

public string Opt4 = "";
public string Opt4 = string.Empty;

public string Prompt = "";
public string Prompt = string.Empty;

public int ResponseSent;

Expand Down
Loading
Loading