joka.ui
The ui module includes a UI library.
Types 32
The UI font type.
The UI texture type.
The UI icon ID type.
A function used for getting the width and height of the text.
A function used for getting the width and height of an icon.
A UI color.
Static table of UI colors with UiColorType being the key.
A bitmask type for mouse button state, combining one or more UiMouseButtonFlag values.
Individual mouse button flags for use in a UiMouseButtonFlags bitmask.
A bitmask type for keyboard key state, combining one or more UiKeyFlag values.
Individual key flags for use in a UiKeyFlags bitmask.
Controls which axis or axes keyboard navigation responds to.
IVec2 mousePositionIVec2 mousePressedPositionUiMouseButtonFlags mouseButtonDownUiMouseButtonFlags mouseButtonPressedUiMouseButtonFlags mouseButtonReleasedbool mouseActionOnReleaseUiKeyFlags keyDownUiKeyFlags keyPressedUiKeyFlags keyReleasedUiKeyNavigation keyNavigationUiKeyNavigation nextKeyNavigationbool mouseAction(IRect area)bool keyNavigationUpAction()bool keyNavigationDownAction()bool keyNavigationAction()void clear()The result of a UI control function.
The result values of a UI control function.
The option flags of a UI control function.
The option flag values of a UI control function.
bool isFocused(int id)void setCurrentFocusId(int id)void wrapCurrentFocusIdIfNeeded(int startInclusive, int endInclusive)bool submittedByKeyboardbool hoverbool activebool focusuint focusIdbool mouseActionThe UI context.
UiCommands commandsUiFocusState focusStateUiTextSizeFunc textSizeUiIconIdSizeFunc iconSizeUiStyle * styleUiStyle _styleUiInput inputbool manualBordersModechar[] charDataBufferSz charDataLengthint charHeightint charOffsetvoid ready(UiTextSizeFunc textSizeFunc, UiCommand[] commandsBuffer, char[] charDataBuffer, UiFont font, uint fontScale = 1, UiIconIdSizeFunc iconSizeFunc = null)void setBuffers(UiCommand[] newCommandsBuffer, char[] newCharDataBuffer)void applyDefaultStyle()void restoreDefaultStyle() @trustedScopedUiFocus captureFocus(UiKeyNavigation keyNavigation = UiKeyNavigation.none, bool canIgnore = false)IStrz makeStrzCopy(IStr text) @trustedvoid drawRect(IRect area, UiColorType colorType, bool hover, bool active, bool focus, bool off, uint border) @trustedvoid drawBorder(IRect area, bool off, uint border)void drawBox(IRect area, UiColorType colorType, bool hover, bool active, bool focus, bool off, uint border)void drawIcon(UiIconId iconId, UiColorType colorType, IRect area, UiFlags optionFlags)void drawText(IStr text, UiColorType colorType, IRect area, UiFlags optionFlags) @trustedvoid drawLabelContent(IRect area, IStr text, UiIconId iconId = 0, UiFlags optionFlags = defaultUiFlags)void begin()void end()UiControlInteraction registerControlInteraction(IRect area, UiFlags optionFlags)UiResultFlags handleButtonInteraction(UiControlInteraction interaction, IRect area, UiFlags optionFlags)UiColorType handleButtonColorType(UiControlInteraction interaction, UiFlags optionFlags)UiResultFlags label(IRect area, IStr text, UiIconId iconId = 0, UiFlags optionFlags = defaultUiFlags)UiResultFlags icon(IRect area, UiIconId iconId, UiFlags optionFlags = defaultUiFlags)UiResultFlags buttonWithIcon(IRect area, IStr text, UiIconId iconId, UiFlags optionFlags = defaultUiFlags)UiResultFlags button(IRect area, IStr text, UiFlags optionFlags = defaultUiFlags)UiResultFlags stepper(T)(IRect area, ref T number, T startInclusive, T stopInclusive, T step, IStr info = "", bool canLoop = true, IStr fmtStr = defaultAsciiFmtArgStr, UiFlags optionFlags = defaultUiFlags)UiResultFlags stepper(IRect area, ref int number, IStr info = "", bool canLoop = true, IStr fmtStr = "{}%", UiFlags optionFlags = defaultUiFlags)UiResultFlags cycler(T)(IRect area, ref T enumNumber, IStr info = "", bool canLoop = true, bool canKeepFirstChar = false, UiFlags optionFlags = defaultUiFlags)this(UiTextSizeFunc textSizeFunc, UiCommand[] commandsBuffer, char[] charDataBuffer, UiFont font, uint fontScale = 1, UiIconIdSizeFunc iconSizeFunc = null)Functions 1
Variables 1
defaultUiFlags = UiFlag.alignCenterThe default control flags.