# kiui **Repository Path**: xigalto/kiui ## Basic Information - **Project Name**: kiui - **Description**: 一个基于opengl的ui库 - **Primary Language**: C++ - **License**: Zlib - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 4 - **Forks**: 0 - **Created**: 2016-01-12 - **Last Updated**: 2023-04-04 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README kiUi [![Build Status](https://travis-ci.org/hugoam/kiui.svg?branch=master)](https://travis-ci.org/hugoam/kiui) ==== kiUi is a lightweight auto-layout Ui library, abstracted out from any rendering or input code. kiui supports Emscripten : try the live demo [here](http://hugoam.github.io/kiui/livedemo/kiui.html). It is designed according to the following design goals : - Separation of Ui appearance and logic - Automatic layout as the norm, not the exception (as in HTML) - Easy styling, separated from logic (as in CSS) - Brevity and simplicity above everything else, especially in C++ code - Good for both an editor Ui and a game Ui ![screenshot of the example window with a raw skin](media/kiui.png?raw=true) Auto-Layout =========== Every single element in kiUi auto-layouts ! You have nothing to do. No position to set, no size to determine. - Code the logic : Just add your widgets and define the logic as you please. - Code the appearance : Just set your fonts, font-size, images, and kiUi will do the rest. The style can be defined and tweaked separately by an artist. Style are defined in C++ as of now, but Style Sheets are planned to come soon. Skins ===== kiUi was conceived so that each element can be styled in a way very similar to CSS, through Style Sheets You can switch between Styles Sheets on the fly ![switching between styles at runtime](media/themes.gif?raw=true) Usage ==== ```C++ RootSheet& root = uiwindow.rootSheet(); Window& window = root.emplace("Example window"); Expandbox& expandbox = window.emplace("Collapsable box"); Label& label = expandbox.emplace