Skip to content

Commit

Permalink
chore: refactor event window (#2365)
Browse files Browse the repository at this point in the history
  • Loading branch information
WeylonSantana authored Aug 2, 2024
1 parent 143d1b3 commit fb934f2
Show file tree
Hide file tree
Showing 5 changed files with 176 additions and 310 deletions.
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

0 comments on commit fb934f2

Please sign in to comment.