---
title: "XGUI-3 - s&box library"
description: "XGUI-3 is a new version of XGUI that cleans up and expands on XGUI-2.\nIt's most notable feature is the addition of an ImGui style immediate mode UI API, which makes debugging UI and development panels quick and easy to implement.\n\nIn order to use it, you must place one of these in the scene\n\nThen after that, you can call the ImXGUI.Begin functions and stuff to draw immediate mode windows in any component anywhere in update or fixedupdate. Here's an example to get you started, The API will aim to match ImGui\n\nprivate bool showWindow = true;\nprivate bool checkboxValue = false;\nprivate float floatValue = 0.5f;\nprivate Color colour = Color.White;\nprotected override void OnUpdate()\n{\n // Create a window\n if ( ImXGUI.Begin( \"ImXGUI Window\", ref showWindow ) )\n {\n ImXGUI.Text( \"Welcome to ImXGUI!\" );\n\n if ( ImXGUI.Button( $\"Click Me! ({clickCount} Clicks)\" ) )\n {\n Log.Info( \"Button clicked!\" );\n }\n\n if ( ImXGUI.Checkbox( \"Toggle Option\", ref checkboxValue ) )\n {\n Log.Info( $\"Checkbox changed to: {checkboxValue}\" );\n }\n\n ImXGUI.SliderFloat( \"Float Slider\", ref floatValue, 0.0f, 1.0f, 0.025f );\n\n ImXGUI.ColorPicker( \"Colour\", ref colour );\n\n ImXGUI.End();\n }\n}Or you can use the razor based GUI by creating a panel that derives from window, and adding it to the XGUIRootPanel like so\nScene.GetSystem<XGUISystem>().Panel.AddChild<MyCoolWindow>();"
canonical: "https://sbox.watch/libraries/xenthio/xgui-3/"
generated_at: "2026-07-22T23:22:23.039Z"
---

# XGUI-3

No summary provided.

- Type: library
- Ident: xenthio.xgui-3
- Creator: Xenthio
- Canonical: https://sbox.watch/libraries/xenthio/xgui-3/
- Markdown: https://sbox.watch/libraries/xenthio/xgui-3.md
- sbox.game: https://sbox.game/xenthio/xgui-3/
- Generated: 2026-07-22T23:22:23.039Z

## Stats

- 24h momentum: +0
- Terry score: 80%
- Favorites: 9
- Upvotes: 11
- Downvotes: 0
- Updated: May 14, 2026
- Created: Apr 2, 2025
- Size: 1.3 MB
- Files: 382
- Tags: 

## Description

XGUI-3 is a new version of XGUI that cleans up and expands on XGUI-2.
It's most notable feature is the addition of an ImGui style immediate mode UI API, which makes debugging UI and development panels quick and easy to implement.

In order to use it, you must place one of these in the scene

Then after that, you can call the ImXGUI.Begin functions and stuff to draw immediate mode windows in any component anywhere in update or fixedupdate. Here's an example to get you started, The API will aim to match ImGui

private bool showWindow = true;
private bool checkboxValue = false;
private float floatValue = 0.5f;
private Color colour = Color.White;
protected override void OnUpdate()
{
 // Create a window
 if ( ImXGUI.Begin( "ImXGUI Window", ref showWindow ) )
 {
 ImXGUI.Text( "Welcome to ImXGUI!" );

 if ( ImXGUI.Button( $"Click Me! ({clickCount} Clicks)" ) )
 {
 Log.Info( "Button clicked!" );
 }

 if ( ImXGUI.Checkbox( "Toggle Option", ref checkboxValue ) )
 {
 Log.Info( $"Checkbox changed to: {checkboxValue}" );
 }

 ImXGUI.SliderFloat( "Float Slider", ref floatValue, 0.0f, 1.0f, 0.025f );

 ImXGUI.ColorPicker( "Colour", ref colour );

 ImXGUI.End();
 }
}Or you can use the razor based GUI by creating a panel that derives from window, and adding it to the XGUIRootPanel like so
Scene.GetSystem<XGUISystem>().Panel.AddChild<MyCoolWindow>();



## More by Xenthio

| Package | Ident | Players | Favorites | Upvotes | Score | Markdown |
| --- | --- | --- | --- | --- | --- | --- |
| XMovement | xenthio.xmovement | 0 | 13 | 13 | 83% | https://sbox.watch/libraries/xenthio/xmovement.md |
| XGUI-2 | xenthio.xgui | 0 | 1 | 2 | 43% | https://sbox.watch/libraries/xenthio/xgui.md |
