Skip to content

Commit 88e9813

Browse files
committed
rework on alignment, bounds positioning, etc to improve performance and make things actually work, InputBox rework
1 parent acad711 commit 88e9813

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+1711
-1000
lines changed

Intersect (Core)/Network/Packets/Client/EventInputVariablePacket.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public EventInputVariablePacket(Guid eventId, bool booleanValue, int value, stri
2626
public bool BooleanValue { get; set; }
2727

2828
[Key(2)]
29-
public string StringValue { get; set; }
29+
public string? StringValue { get; set; }
3030

3131
[Key(3)]
3232
public int Value { get; set; }

Intersect.Client.Core/Core/Input.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,10 @@ public static void OnKeyPressed(Keys modifier, Keys key)
8282
return;
8383

8484
case Keys.Enter:
85-
for (int i = Interface.Interface.InputBlockingComponents.Count - 1; i >= 0; i--)
85+
var components = Interface.Interface.InputBlockingComponents.ToArray();
86+
for (int i = components.Length - 1; i >= 0; i--)
8687
{
87-
var inputBlockingComponent = Interface.Interface.InputBlockingComponents[i];
88+
var inputBlockingComponent = components[i];
8889
try
8990
{
9091
if (inputBlockingComponent is InputBox { IsHidden: false } inputBox)

Intersect.Client.Core/Entities/Events/Dialog.cs

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,11 @@ public partial class Dialog
44
{
55
public Guid EventId;
66

7-
public string Face = string.Empty;
7+
public string? Face;
88

9-
public string Opt1 = string.Empty;
9+
public string[] Options = [];
1010

11-
public string Opt2 = string.Empty;
11+
public string? Prompt;
1212

13-
public string Opt3 = string.Empty;
14-
15-
public string Opt4 = string.Empty;
16-
17-
public string Prompt = string.Empty;
18-
19-
public int ResponseSent;
20-
21-
public int Type;
13+
public bool ResponseSent;
2214
}

0 commit comments

Comments
 (0)