---
title: "(WIP) Dear ImGui Clone - s&box library"
description: "An implementation of the Dear ImGui API"
canonical: "https://sbox.watch/zh-cn/libraries/duccsoft/imgui/"
generated_at: "2026-11-27T13:24:25.271Z"
---

# (WIP) Dear ImGui Clone

An implementation of the Dear ImGui API

- 类型: 库
- 标识符: duccsoft.imgui
- 创作者: duccsoft
- 规范地址: https://sbox.watch/zh-cn/libraries/duccsoft/imgui/
- Markdown: https://sbox.watch/zh-cn/libraries/duccsoft/imgui/index.md
- sbox.game: https://sbox.game/duccsoft/imgui/
- 生成时间: 2026-11-27T13:24:25.271Z

## 统计

- 24小时热度: +0
- Terry 评分: 43%
- 收藏: 2
- 好评: 2
- 差评: 0
- 更新时间: 2024年12月29日
- 创建时间: 2024年12月17日
- 大小: 166.9 KB
- 文件: 47
- 标签: dear, imgui, ui

## 描述

Summary

This library is a work-in-progress partial implementation of the features provided by Dear ImGui.

The aim of this project is to provide a faithful recreation of the functionality of Dear ImGui. Thus, any inconsistencies with the behavior of the original library should be regarded as a bug/oversight on my part.

Feel free to submit a bug report or feature request as an issue on the GitHub page for this project.

Source Code: https://github.com/chrisspieler/sbox-imgui
Known Issues
- Windows may not be collapsed, and users may not close or resize windows themselves
- Countless ImGui functions are not yet implemented
- Switching between game and UI input is not yet implemented
- Various slider features such as text input are not yet implemented
- Mouse inputs on multicomponent sliders may fall through to windows behind

Supported Widgets
- Text
- Button
- Checkbox
- SliderFloat, SliderFloat2, SliderFloat3, SliderFloat4
- DragInt
- Image

Example Usage
private void DrawWindow1()
{
 ImGui.SetNextWindowPos( new Vector2( 300, 200 ) \* ImGuiStyle.UIScale );
 ImGui.Begin( "Window 1" );
 if ( ImGui.Button( "Click me!" ) )
 {
 \_clickCounter++;
 }
 ImGui.Text( "Clicked {0} times.", \_clickCounter );
 if ( ImGui.Button( "Focus Floating Window" ) )
 {
 \_shouldFocusFloatingWindow = true;
 }
 ImGui.SliderFloat( "My Float", ref \_myFloatValue, -128f, 256f );
 ImGui.Button( "1" ); ImGui.SameLine();
 ImGui.Button( "2" ); ImGui.SameLine();
 ImGui.Button( "3" ); ImGui.SameLine();
 ImGui.Button( "4" );
 ImGui.Image( ExampleTexture, new Vector2( 128 ) \* ImGuiStyle.UIScale, Color.White, ImGui.GetColorU32( ImGuiCol.Border ) );
 ImGui.End();
}



## More by duccsoft

| Package | 标识符 | 玩家 | 收藏 | 好评 | 评分 | Markdown |
| --- | --- | --- | --- | --- | --- | --- |
| Freecam | duccsoft.libfreecam | 0 | 6 | 5 | 65% | https://sbox.watch/zh-cn/libraries/duccsoft/libfreecam/index.md |
| Video Panel | duccsoft.videopanel | 0 | 6 | 3 | 53% | https://sbox.watch/zh-cn/libraries/duccsoft/videopanel/index.md |
