feat: Adds [Spawn command & Gump Grids (#917)

Adds `[spawn` command
<img width="1018" alt="Screen Shot 2022-06-30 at 10 13 15 PM" src="https://user-images.githubusercontent.com/3953314/176828843-eda4da40-b7f5-494b-a0bc-667aba3293bb.png">
This commit is contained in:
nullptr-w8 2022-07-01 10:22:51 +05:00 • committed by GitHub
parent 6601101e2e
commit 31fb29cf0b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 1248 additions and 3 deletions

View file

@ -1,3 +1,6 @@
using System.Runtime.CompilerServices;
using Server.Utilities;
namespace Server.Gumps
{
public abstract class BaseGridGump : Gump
@ -37,9 +40,10 @@ namespace Server.Gumps
public virtual int TextHue => 0;
public virtual int TextOffsetX => 2;
public string Center(string text) => $"<CENTER>{text}</CENTER>";
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public string Center(string text) => text.Center();
public string Color(string text, int color) => $"<BASEFONT COLOR=#{color:X6}>{text}</BASEFONT>";
public string Color(string text, int color) => text.Color(color);
public int GetButtonID(int typeCount, int type, int index) => 1 + index * typeCount + type;