Table of Contents

Class GumpBuilder

Namespace
Moongate.Network.Packets.Helpers
Assembly
Moongate.Network.Packets.dll

Fluent builder for UO generic gump layout strings and text lines.

public sealed class GumpBuilder
Inheritance
GumpBuilder
Inherited Members

Methods

BuildLayout()

Builds final layout string.

public string BuildLayout()

Returns

string

BuildTexts()

Builds final string table.

public IReadOnlyList<string> BuildTexts()

Returns

IReadOnlyList<string>

Button(int, int, int, int, int)

Adds a reply button. Pressing it closes the gump and sends 0xB1 with the selected button id.

public GumpBuilder Button(int x, int y, int normalId, int pressedId, int buttonId)

Parameters

x int
y int
normalId int
pressedId int
buttonId int

Returns

GumpBuilder

ButtonPage(int, int, int, int, int)

Adds a page button that switches page client-side without a server round trip.

public GumpBuilder ButtonPage(int x, int y, int normalId, int pressedId, int pageId)

Parameters

x int
y int
normalId int
pressedId int
pageId int

Returns

GumpBuilder

CheckBox(int, int, int, int, int, bool)

Adds a checkbox and binds it to a switch id for response handling.

public GumpBuilder CheckBox(int x, int y, int inactiveId, int activeId, int switchId, bool initialState = false)

Parameters

x int
y int
inactiveId int
activeId int
switchId int
initialState bool

Returns

GumpBuilder

HtmlLocalized(int, int, int, int, string, bool, bool)

Adds a HTML text area and stores the text in the gump string table.

public GumpBuilder HtmlLocalized(int x, int y, int width, int height, string text, bool background = true, bool scrollbar = false)

Parameters

x int
y int
width int
height int
text string
background bool
scrollbar bool

Returns

GumpBuilder

NoClose()

Sets gump as non-closable.

public GumpBuilder NoClose()

Returns

GumpBuilder

NoMove()

Sets gump as non-movable.

public GumpBuilder NoMove()

Returns

GumpBuilder

ResizePic(int, int, int, int, int)

Adds a resizable background tile at the given position.

public GumpBuilder ResizePic(int x, int y, int gumpId, int width, int height)

Parameters

x int
y int
gumpId int
width int
height int

Returns

GumpBuilder

Text(int, int, int, string)

Adds a static text label using a pre-registered text line.

public GumpBuilder Text(int x, int y, int hue, string text)

Parameters

x int
y int
hue int
text string

Returns

GumpBuilder

ToCompressedPacket(uint, uint, uint, uint)

Builds a compressed gump packet (0xDD) from the current builder state.

public CompressedGumpPacket ToCompressedPacket(uint senderSerial, uint gumpId, uint x, uint y)

Parameters

senderSerial uint
gumpId uint
x uint
y uint

Returns

CompressedGumpPacket

ToGenericPacket(uint, uint, uint, uint)

Builds an uncompressed generic gump packet (0xB0) from the current builder state.

public GenericGumpPacket ToGenericPacket(uint senderSerial, uint gumpId, uint x, uint y)

Parameters

senderSerial uint
gumpId uint
x uint
y uint

Returns

GenericGumpPacket