Small footprint UI library for hardware accelerated games & applications
|ebb7c955||2017-09-18 23:33:28||Starg||Make use of TBUniquePointer|
|4a255d62||2017-09-18 23:23:41||Starg||Fixed typo in TBUniquePointer|
|b1ae9183||2017-09-18 23:21:21||Starg||Added a constructor taking nullptr to TBUniquePointer|
|5a41970f||2017-09-18 23:08:33||Starg||Added TBMove|
|f3666300||2017-09-18 22:25:49||Starg||Added TBUniquePointer|
|785bb0f9||2017-09-18 21:35:23||Starg||Added .editorconfig|
|3a5fedc5||2017-09-18 21:07:08||Starg||Don't change current dir|
|f063ac61||2017-09-18 20:49:25||Starg||Force UTF-8 on MSVC|
|1430affe||2016-12-22 05:29:38||Emil Segerås||TBSkin::Load should be callable multiple times.|
|8a554325||2016-12-22 05:29:38||Emil Segerås||Fix for STB glyph positioning, font sizes, and optimizati...|
I created Turbo Badger because i wanted a small UI toolkit for use in games and hardware accelerated applications across multiple platforms (that target both desktop and mobile).
The goal is a toolkit that can be easily integrated into an existing codebase to make UI with skinning.
It has no dependency on stl, RTTI or exceptions. Compiling without these features makes footprint very small. Utility classes (such as string, lists, hash table, etc.) are quite minimal for the basic needs of Turbo Badger itself.
See integration.txt for details about integrating image loading, renderer, font system etc.
APIs are changed, features improved & added. Be aware that if you use this right now, you'll probably have to adjust your code to API changes sometimes after pulling master. Documentation about API changes take place in the git commit changelog for now ;)
This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software.
Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions:
The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
This notice may not be removed or altered from any source distribution.
If you try to familiarize yourself with the code, you might notice the heavily used
TBID that may seem like a string. It's actually an uint32 that can be set
from a string (using the strings hash value). It's used for hash keys, as
substitute for enums and all kind of things needing custom IDs.
With compilers supporting C++ 11
constexpr, the string to integer conversion is
done compile time.
If you want to add new stuff, here are some hints that will make it easier to get a pull requests accepted:
Do not make it dependant on exceptions, RTTI or stl (or boost or similar)
It should not leak or crash if running out of memory.
Follow the used code style (4 spaces wide tabs, indentation & whitespace style, documentation etc.)
Features that may be optional should be optional and not tied to the core.
Widgets are cheap to create and layout and using many widgets to get what you want is encouraged. A custom widget should typically not implement any layouting and drawing of sub-elements if it can be solved by wrapping a TBLayout and other existing widgets.
Any widget may contain other widgets and may control into which sub-widget other
widgets are inflated from resources (using
Custom widgets can be inflated from UI resources too. See the use of the
TB_WIDGET_FACTORY macro in
tb_widgets_reader.cpp for examples on how to do
The demo use GLFW as a submodule for some platform window & input handling. After the first git clone, you need to run:
git submodule init git submodule update
This will clone GLFW into the right directory.
There is project files for Visual Studio 2012 in Demo/VisualStudio. For other platforms/compilers, you need to first run cmake to generate makefile or projects for your favorite IDE.
There's a Sublime Text project for a small Android test app in DemoAndroid with a custom build & deploy script (Windows .bat file. There's currently no Linux/Mac scripts).
Emil Segerås Web: http://fiffigt.com
Turbo Badger home: https://github.com/fruxo/turbobadger
Some of the windows in the Demo application for desktop, using the default skin.
Welcome to OSDN Wiki system. Here is your chamber Wiki space.
Check Wiki Guide (English) to refer syntax and functions.
(auto generated page)
[Permissions] view:all, edit:admins, delete/config:admins