Table of Contents

Class ElementStdBounds

Namespace
Vintagestory.API.Client
Assembly
VintagestoryAPI.dll

Just some default sizings for various ui elements

public static class ElementStdBounds
Inheritance
ElementStdBounds
Inherited Members

Fields

mainMenuUnscaledLogoHorPadding

public static int mainMenuUnscaledLogoHorPadding

Field Value

int

mainMenuUnscaledLogoSize

public static int mainMenuUnscaledLogoSize

Field Value

int

mainMenuUnscaledLogoVerPadding

public static int mainMenuUnscaledLogoVerPadding

Field Value

int

mainMenuUnscaledWoodPlankWidth

public static int mainMenuUnscaledWoodPlankWidth

Field Value

int

Properties

AutosizedMainDialog

Quick Method to create a new ElementBounds instance that is positioned at the screen center and sized accordingly to fit all it's child elements

public static ElementBounds AutosizedMainDialog { get; }

Property Value

ElementBounds

Methods

AutosizedMainDialogAtPos(double)

Quick Method to create a new ElementBounds instance that draws a background for a dialog

public static ElementBounds AutosizedMainDialogAtPos(double fixedY)

Parameters

fixedY double

Returns

ElementBounds

DialogBackground()

Quick Method to create a new ElementBounds instance that draws a background for a dialog

public static ElementBounds DialogBackground()

Returns

ElementBounds

DialogBackground(double, double)

Quick Method to create a new ElementBounds instance that draws a background for a dialog

public static ElementBounds DialogBackground(double horPadding, double verPadding)

Parameters

horPadding double
verPadding double

Returns

ElementBounds

MainScreenRightPart()

Quick Method to create a new ElementBounds instance that draws a background for a dialog

public static ElementBounds MainScreenRightPart()

Returns

ElementBounds

MenuButton(float, EnumDialogArea)

Quick Method to create a new ElementBounds instance to create a menu consiting of one ore more vertically arranged and horizontally centered buttons in a grid. The y position is calculated using rowIndex * 80.

public static ElementBounds MenuButton(float rowIndex, EnumDialogArea alignment = EnumDialogArea.CenterFixed)

Parameters

rowIndex float
alignment EnumDialogArea

Returns

ElementBounds

Rowed(float, double, EnumDialogArea)

Quick Method to create a new ElementBounds instance to create a menu consiting of one ore more vertically arranged and horizontally centered buttons in a grid. The y position is calculated using rowIndex * 80.

public static ElementBounds Rowed(float rowIndex, double padding, EnumDialogArea alignment = EnumDialogArea.None)

Parameters

rowIndex float
padding double
alignment EnumDialogArea

Returns

ElementBounds

Sign(double, double, double, double)

Quick Method to create a new ElementBounds instance that is currently used for Signs (e.g. graphics options)

public static ElementBounds Sign(double fixedX, double fixedY, double fixedWith, double fixedHeight = 80)

Parameters

fixedX double
fixedY double
fixedWith double
fixedHeight double

Returns

ElementBounds

Slider(double, double, double)

public static ElementBounds Slider(double x, double y, double width)

Parameters

x double
y double
width double

Returns

ElementBounds

Slot(double, double)

public static ElementBounds Slot(double x = 0, double y = 0)

Parameters

x double
y double

Returns

ElementBounds

SlotGrid(EnumDialogArea, double, double, int, int)

public static ElementBounds SlotGrid(EnumDialogArea alignment, double x, double y, int cols, int rows)

Parameters

alignment EnumDialogArea
x double
y double
cols int
rows int

Returns

ElementBounds

Statbar(EnumDialogArea, double)

Quick method to create a new ElementBounds instance that uses fixed element sizing. The X/Y Coordinates are left at 0.

public static ElementBounds Statbar(EnumDialogArea alignment, double width)

Parameters

alignment EnumDialogArea
width double

Returns

ElementBounds

TitleBar()

public static ElementBounds TitleBar()

Returns

ElementBounds

ToggleButton(double, double, double, double)

public static ElementBounds ToggleButton(double fixedX, double fixedY, double width, double height)

Parameters

fixedX double
fixedY double
width double
height double

Returns

ElementBounds

VerticalScrollbar(ElementBounds)

Creates a scrollbar right of given element bounds, requires the left element to be using fixed element positioning

public static ElementBounds VerticalScrollbar(ElementBounds leftElement)

Parameters

leftElement ElementBounds

Returns

ElementBounds