Types
CheckBoxProperty {.size: 4.} = enum CheckPadding = 16 ## CheckBox internal check padding
- CheckBox Source Edit
ColorPickerProperty {.size: 4.} = enum ColorSelectorSize = 16, HuebarWidth, ## ColorPicker right hue bar width HuebarPadding, ## ColorPicker right hue bar separation from panel HuebarSelectorHeight, ## ColorPicker right hue bar selector height HuebarSelectorOverflow ## ColorPicker right hue bar selector overflow
- ColorPicker Source Edit
ComboBoxProperty {.size: 4.} = enum ComboButtonWidth = 16, ## ComboBox right button width ComboButtonSpacing ## ComboBox button separation
- ComboBox Source Edit
ControlProperty {.size: 4.} = enum BorderColorNormal, ## Control border color in STATE_NORMAL BaseColorNormal, ## Control base color in STATE_NORMAL TextColorNormal, ## Control text color in STATE_NORMAL BorderColorFocused, ## Control border color in STATE_FOCUSED BaseColorFocused, ## Control base color in STATE_FOCUSED TextColorFocused, ## Control text color in STATE_FOCUSED BorderColorPressed, ## Control border color in STATE_PRESSED BaseColorPressed, ## Control base color in STATE_PRESSED TextColorPressed, ## Control text color in STATE_PRESSED BorderColorDisabled, ## Control border color in STATE_DISABLED BaseColorDisabled, ## Control base color in STATE_DISABLED TextColorDisabled, ## Control text color in STATE_DISABLED BorderWidth, ## Control border size, 0 for no border TextPadding, ## Control text padding, not considering border TextAlignment ## Control text horizontal alignment inside control text bound (after border and padding)
- Gui base properties for every control Source Edit
DefaultProperty {.size: 4.} = enum TextSize = 16, ## Text size (glyphs max height) TextSpacing, ## Text spacing between glyphs LineColor, ## Line control color BackgroundColor, ## Background color TextLineSpacing, ## Text spacing between lines TextAlignmentVertical, ## Text vertical alignment inside text bounds (after border and padding) TextWrapMode ## Text wrap-mode inside text bounds
- DEFAULT extended properties Source Edit
DropdownBoxProperty {.size: 4.} = enum ArrowPadding = 16, ## DropdownBox arrow separation from border and items DropdownItemsSpacing, ## DropdownBox items separation DropdownArrowHidden, ## DropdownBox arrow hidden DropdownRollUp ## DropdownBox roll up flag (default rolls down)
- DropdownBox Source Edit
GuiControl {.size: 4.} = enum Default, Label, ## Used also for: LABELBUTTON Button, Toggle, ## Used also for: TOGGLEGROUP Slider, ## Used also for: SLIDERBAR, TOGGLESLIDER Progressbar, Checkbox, Combobox, Dropdownbox, Textbox, ## Used also for: TEXTBOXMULTI Valuebox, Control11, Listview, Colorpicker, Scrollbar, Statusbar
- Gui controls Source Edit
GuiIconName {.size: 4.} = enum None, FolderFileOpen, FileSaveClassic, FolderOpen, FolderSave, FileOpen, FileSave, FileExport, FileAdd, FileDelete, FiletypeText, FiletypeAudio, FiletypeImage, FiletypePlay, FiletypeVideo, FiletypeInfo, FileCopy, FileCut, FilePaste, CursorHand, CursorPointer, CursorClassic, Pencil, PencilBig, BrushClassic, BrushPainter, WaterDrop, ColorPicker, Rubber, ColorBucket, TextT, TextA, Scale, Resize, FilterPoint, FilterBilinear, Crop, CropAlpha, SquareToggle, Symmetry, SymmetryHorizontal, SymmetryVertical, Lens, LensBig, EyeOn, EyeOff, FilterTop, Filter, TargetPoint, TargetSmall, TargetBig, TargetMove, CursorMove, CursorScale, CursorScaleRight, CursorScaleLeft, Undo, Redo, Reredo, Mutate, Rotate, Repeat, Shuffle, Emptybox, Target, TargetSmallFill, TargetBigFill, TargetMoveFill, CursorMoveFill, CursorScaleFill, CursorScaleRightFill, CursorScaleLeftFill, UndoFill, RedoFill, ReredoFill, MutateFill, RotateFill, RepeatFill, ShuffleFill, EmptyboxSmall, Box, BoxTop, BoxTopRight, BoxRight, BoxBottomRight, BoxBottom, BoxBottomLeft, BoxLeft, BoxTopLeft, BoxCenter, BoxCircleMask, Pot, AlphaMultiply, AlphaClear, Dithering, Mipmaps, BoxGrid, Grid, BoxCornersSmall, BoxCornersBig, FourBoxes, GridFill, BoxMultisize, ZoomSmall, ZoomMedium, ZoomBig, ZoomAll, ZoomCenter, BoxDotsSmall, BoxDotsBig, BoxConcentric, BoxGridBig, OkTick, Cross, ArrowLeft, ArrowRight, ArrowDown, ArrowUp, ArrowLeftFill, ArrowRightFill, ArrowDownFill, ArrowUpFill, Audio, Fx, Wave, WaveSinus, WaveSquare, WaveTriangular, CrossSmall, PlayerPrevious, PlayerPlayBack, PlayerPlay, PlayerPause, PlayerStop, PlayerNext, PlayerRecord, Magnet, LockClose, LockOpen, Clock, Tools, Gear, GearBig, Bin, HandPointer, Laser, Coin, Explosion, Icon1up, Player, PlayerJump, Key, Demon, TextPopup, GearEx, Crack, CrackPoints, Star, Door, Exit, Mode2d, Mode3d, Cube, CubeFaceTop, CubeFaceLeft, CubeFaceFront, CubeFaceBottom, CubeFaceRight, CubeFaceBack, Camera, Special, LinkNet, LinkBoxes, LinkMulti, Link, LinkBroke, TextNotes, Notebook, Suitcase, SuitcaseZip, Mailbox, Monitor, Printer, PhotoCamera, PhotoCameraFlash, House, Heart, Corner, VerticalBars, VerticalBarsFill, LifeBars, Info, Crossline, Help, FiletypeAlpha, FiletypeHome, LayersVisible, Layers, Window, Hidpi, FiletypeBinary, Hex, Shield, FileNew, FolderAdd, Alarm, Cpu, Rom, StepOver, StepInto, StepOut, Restart, BreakpointOn, BreakpointOff, BurgerMenu, CaseSensitive, RegExp, Folder, File, SandTimer, Warning, HelpBox, InfoBox, Priority, LayersIso, Layers2, Mlayers, Maps, Hot, Label, NameId, Slicing, ManualControl, Collision, Icon234, Icon235, Icon236, Icon237, Icon238, Icon239, Icon240, Icon241, Icon242, Icon243, Icon244, Icon245, Icon246, Icon247, Icon248, Icon249, Icon250, Icon251, Icon252, Icon253, Icon254, Icon255
- Source Edit
GuiStyleProperty = ControlProperty | DefaultProperty | ToggleProperty | SliderProperty | ProgressBarProperty | ScrollBarProperty | CheckBoxProperty | ComboBoxProperty | DropdownBoxProperty | TextBoxProperty | ValueBoxProperty | ListViewProperty | ColorPickerProperty
- Source Edit
GuiStyleValue = GuiState | GuiTextAlignment | GuiTextAlignmentVertical | GuiTextWrapMode | GuiControl | int32 | bool
- Source Edit
GuiTextAlignment {.size: 4.} = enum Left, Center, Right
- Gui control text alignment Source Edit
GuiTextAlignmentVertical {.size: 4.} = enum Top, Middle, Bottom
- Gui control text alignment vertical Source Edit
GuiTextWrapMode {.size: 4.} = enum TextWrapNone, TextWrapChar, TextWrapWord
- Gui control text wrap mode Source Edit
ListViewProperty {.size: 4.} = enum ListItemsHeight = 16, ## ListView items height ListItemsSpacing, ## ListView items separation ScrollbarWidth, ## ListView scrollbar size (usually width) ScrollbarSide, ## ListView scrollbar side (0-SCROLLBAR_LEFT_SIDE, 1-SCROLLBAR_RIGHT_SIDE) ListItemsBorderNormal, ## ListView items border enabled in normal state ListItemsBorderWidth ## ListView items border width
- ListView Source Edit
ProgressBarProperty {.size: 4.} = enum ProgressPadding = 16 ## ProgressBar internal padding
- ProgressBar Source Edit
ScrollBarProperty {.size: 4.} = enum ArrowsSize = 16, ## ScrollBar arrows size ArrowsVisible, ## ScrollBar arrows visible ScrollSliderPadding, ## ScrollBar slider internal padding ScrollSliderSize, ## ScrollBar slider size ScrollPadding, ## ScrollBar scroll padding from arrows ScrollSpeed ## ScrollBar scrolling speed
- ScrollBar Source Edit
SliderProperty {.size: 4.} = enum SliderWidth = 16, ## Slider size of internal bar SliderPadding ## Slider/SliderBar internal bar padding
- Slider/SliderBar Source Edit
StyleProp {.importc: "GuiStyleProp", header: "raygui.h", completeStruct, bycopy.} = object controlId*: uint16 ## Control identifier propertyId*: uint16 ## Property identifier propertyValue*: int32 ## Property value
- NOTE: Used when exporting style as code for convenience Source Edit
TextBoxProperty {.size: 4.} = enum TextReadonly = 16 ## TextBox in read-only mode: 0-text editable, 1-text no-editable
- TextBox/TextBoxMulti/ValueBox/Spinner Source Edit
TextStyle {.importc: "GuiTextStyle", header: "raygui.h", completeStruct, bycopy.} = object size*: uint32 charSpacing*: int32 lineSpacing*: int32 alignmentH*: int32 alignmentV*: int32 padding*: int32
- NOTE: Text style is defined by control Source Edit
ToggleProperty {.size: 4.} = enum GroupPadding = 16 ## ToggleGroup separation between toggles
- Toggle/ToggleGroup Source Edit
ValueBoxProperty {.size: 4.} = enum SpinnerButtonWidth = 16, ## Spinner left/right buttons width SpinnerButtonSpacing ## Spinner buttons separation
- ValueBox/Spinner Source Edit
Consts
RayguiVersion = (4, 5, 0)
- Source Edit
Procs
proc `=destroy`(t: TextArray) {....raises: [], tags: [], forbids: [].}
- Source Edit
proc colorBarAlpha(bounds: Rectangle; text: string; alpha: var float32) {. ...raises: [], tags: [], forbids: [].}
- Color Bar Alpha control Source Edit
proc colorBarHue(bounds: Rectangle; text: string; value: var float32) {. ...raises: [], tags: [], forbids: [].}
- Color Bar Hue control Source Edit
proc colorPanel(bounds: Rectangle; text: string; color: var Color) {....raises: [], tags: [], forbids: [].}
- Color Panel control Source Edit
proc colorPanelHSV(bounds: Rectangle; text: string; colorHsv: var Vector3) {. ...raises: [], tags: [], forbids: [].}
- Color Panel control that updates Hue-Saturation-Value color value, used by GuiColorPickerHSV() Source Edit
proc colorPicker(bounds: Rectangle; text: string; color: var Color) {. ...raises: [], tags: [], forbids: [].}
- Color Picker control (multiple color controls) Source Edit
proc colorPickerHSV(bounds: Rectangle; text: string; colorHsv: var Vector3) {. ...raises: [], tags: [], forbids: [].}
- Color Picker control that avoids conversion to RGB on each call (multiple color controls) Source Edit
proc disableTooltip() {.importc: "GuiDisableTooltip", sideEffect, header: "raygui.h", ...raises: [], tags: [], forbids: [].}
- Disable gui tooltips (global state) Source Edit
proc drawIcon(iconId: GuiIconName; posX: int32; posY: int32; pixelSize: int32; color: Color) {.importc: "GuiDrawIcon", sideEffect, header: "raygui.h", ...raises: [], tags: [], forbids: [].}
- Draw icon using pixel size at specified position Source Edit
proc dropdownBox(bounds: Rectangle; text: string; active: var int32; editMode: bool): bool {....raises: [], tags: [], forbids: [].}
- Dropdown Box control Source Edit
proc enableTooltip() {.importc: "GuiEnableTooltip", sideEffect, header: "raygui.h", ...raises: [], tags: [], forbids: [].}
- Enable gui tooltips (global state) Source Edit
proc guiDisable() {.importc: "GuiDisable", sideEffect, header: "raygui.h", ...raises: [], tags: [], forbids: [].}
- Disable gui controls (global state) Source Edit
proc guiGetFont(): Font {.importc: "GuiGetFont", sideEffect, header: "raygui.h", ...raises: [], tags: [], forbids: [].}
- Get gui custom font (global state) Source Edit
proc guiGetState(): GuiState {.importc: "GuiGetState", sideEffect, header: "raygui.h", ...raises: [], tags: [], forbids: [].}
- Get gui state (global state) Source Edit
proc guiGetStyle[P: GuiStyleProperty](control: GuiControl; property: P): int32
- Get one style property Source Edit
proc guiIsLocked(): bool {.importc: "GuiIsLocked", sideEffect, header: "raygui.h", ...raises: [], tags: [], forbids: [].}
- Check if gui is locked (global state) Source Edit
proc guiLoadStyle(fileName: string) {....raises: [], tags: [], forbids: [].}
- Load style file over global style variable (.rgs) Source Edit
proc guiLoadStyleDefault() {.importc: "GuiLoadStyleDefault", sideEffect, header: "raygui.h", ...raises: [], tags: [], forbids: [].}
- Load style default over global style Source Edit
proc guiSetAlpha(alpha: float32) {.importc: "GuiSetAlpha", sideEffect, header: "raygui.h", ...raises: [], tags: [], forbids: [].}
- Set gui controls alpha (global state), alpha goes from 0.0f to 1.0f Source Edit
proc guiSetFont(font: Font) {.importc: "GuiSetFont", sideEffect, header: "raygui.h", ...raises: [], tags: [], forbids: [].}
- Set gui custom font (global state) Source Edit
proc guiSetState(state: GuiState) {.importc: "GuiSetState", sideEffect, header: "raygui.h", ...raises: [], tags: [], forbids: [].}
- Set gui state (global state) Source Edit
proc guiSetStyle[P: GuiStyleProperty; V: GuiStyleValue](control: GuiControl; property: P; value: V)
- Set one style property Source Edit
proc iconText(iconId: GuiIconName; text: string = ""): string {....raises: [], tags: [], forbids: [].}
- Get text with icon id prepended (if supported) Source Edit
proc labelButton(bounds: Rectangle; text: string): bool {....raises: [], tags: [], forbids: [].}
- Label button control, returns true when clicked Source Edit
proc messageBox(bounds: Rectangle; title: string; message: string; buttons: string): int32 {....raises: [], tags: [], forbids: [].}
- Message Box control, displays a message Source Edit
proc progressBar(bounds: Rectangle; textLeft: string; textRight: string; value: var float32; minValue: float32; maxValue: float32) {. ...raises: [], tags: [], forbids: [].}
- Progress Bar control Source Edit
proc scrollPanel(bounds: Rectangle; text: string; content: Rectangle; scroll: var Vector2; view: out Rectangle) {....raises: [], tags: [], forbids: [].}
- Scroll Panel control Source Edit
proc setIconScale(scale: int32) {.importc: "GuiSetIconScale", sideEffect, header: "raygui.h", ...raises: [], tags: [], forbids: [].}
- Set default icon drawing size Source Edit
proc setTooltip(tooltip: string) {....raises: [], tags: [], forbids: [].}
- Set tooltip string Source Edit
proc textInputBox(bounds: Rectangle; title: string; message: string; buttons: string; text: var string): int32 {....raises: [], tags: [], forbids: [].}
- Text Input Box control, ask for text, without secret. Source Edit
proc textInputBox(bounds: Rectangle; title: string; message: string; buttons: string; text: var string; secretViewActive: var bool): int32 {. ...raises: [], tags: [], forbids: [].}
- Text Input Box control, ask for text, supports secret. Source Edit
proc toggleGroup(bounds: Rectangle; text: string; active: var int32) {. ...raises: [], tags: [], forbids: [].}
- Toggle Group control Source Edit
proc toggleSlider(bounds: Rectangle; text: string; active: var int32): bool {. ...raises: [], tags: [], forbids: [].}
- Toggle Slider control Source Edit
proc toTextArray(texts: openArray[string]): TextArray {....raises: [], tags: [], forbids: [].}
- Source Edit
proc valueBoxFloat(bounds: Rectangle; text: string; textValue: string; value: var float32; editMode: bool): bool {....raises: [], tags: [], forbids: [].}
- Value box control for float values Source Edit