FlatUI is a immediate mode C++ GUI library for games and graphical applications.

FlatUI Version 1.1.0 {#flatui_readme}

Welcome to FlatUI!

FlatUI is a immediate mode C++ GUI library for games and graphical applications. Go to our landing page to browse our documentation.

FlatUI aims to be a simple, efficient and easy to use way to add menus, HUDs and any kind of other UI to your game or graphical application, and provide unicode & i18n aware font-rendering. FlatUI can be built for many different systems (Android, Windows, OS X, Linux), see docs/html/index.html.

FlatUI integrates with our other game development libraries, primarily FPLBase.

Discuss FlatUI with other developers and users on the FlatUI Google Group. File issues on the FlatUI Issues Tracker or post your questions to stackoverflow.com with a mention of flatui.

Important: FlatUI uses submodules to reference other components it depends upon so download the source using:

   git clone --recursive https://github.com/google/flatui.git

Changes: Please see the release notes for a list of changes.

For applications on Google Play that integrate this tool, usage is tracked. This tracking is done automatically using the embedded version string (FlatUiVersion), and helps us continue to optimize it. Aside from consuming a few extra bytes in your application binary, it shouldn't affect your application at all. We use this information to let us know if FlatUI is useful and if we should continue to invest in it. Since this is open source, you are free to remove the version string but we would appreciate if you would leave it in.

Comments
  • Compilation problem on Ubuntu

    Compilation problem on Ubuntu

    CMake Error at cmake/freetype/CMakeLists.txt:70 (add_library): Cannot find source file: flatui/dependencies/flatui/src/libpng_to_stbimage/pngshim.cpp

    actually pngshim.cpp is in flatui/src/libpng_to_stbimage/pngshim.cpp so the CMakeLists.txt should be changed from ${dependencies_flatui_dir}/src/libpng_to_stbimage/pngshim.cpp to ${CMAKE_SOURCE_DIR}/src/libpng_to_stbimage/pngshim.cpp

    motive doesn't appear in dependencies, despite having cloned with --recursive and cmake fails because it cannot find it. I have download motive from https://github.com/google/motive and placed in dependencies.

    At this point cmake complete successful.

    I had to remove -Werror flag because both motive don't compile. The first because of the loc 200 and 206 in matrix_processor.cpp That trigger the warning strict-aliasing.

    Compiling sample fails because this command at line 262 of main CMakeLists.txt is wrong: COMMAND ${CMAKE_COMMAND} -E copy ${dependencies_flatui_dir}/sample/serialization/first_menu.json ${flatui_assets_dir}/serialization COMMAND ${CMAKE_COMMAND} -E copy ${dependencies_flatui_dir}/sample/serialization/second_menu.json ${flatui_assets_dir}/serialization)

    Should be COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_SOURCE_DIR}/sample/serialization/first_menu.json ${flatui_assets_dir}/serialization COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_SOURCE_DIR}/sample/serialization/second_menu.json ${flatui_assets_dir}/serialization)

    Once compiled I tryed to run any samples, but nothing is displayed and to kill the application I have to kill it with -9.

    Any Ideas of what I am doing wrong?

  • compilation problem on OSX

    compilation problem on OSX

    following instructions on https://google.github.io/flatui/flatui_guide_osx.html

    • ran git clone --recursive https://github.com/google/flatui.git
    • ran cd flatui
    • ran cmake -G Xcode .

    Result:

    -- FlatUI standalone: building tests and samples
    -- FPLBase library: not building samples
    CMake Error at dependencies/sdl/CMakeLists.txt:2 (message):
      Prevented in-tree built.  Please create a build directory outside of the
      SDL source code and call cmake from there
    
    
    -- Configuring incomplete, errors occurred!
    See also "/Users/xxxxx/dev/flatui/CMakeFiles/CMakeOutput.log".
    

    attempts to follow the instructions re: SDL failure have borne no fruit

  • Any plans for i18n text support?

    Any plans for i18n text support?

    From a quick glance I see that text shaping has the following defaults with HarfBuzz:

    hb_buffer_set_direction(harfbuzz_buf_, HB_DIRECTION_LTR);
    hb_buffer_set_script(harfbuzz_buf_, HB_SCRIPT_LATIN);
    hb_buffer_set_language(harfbuzz_buf_, hb_language_from_string(text, length));
    

    There's a TODO to make these configurable but are there any plans for more robust i18n support such as BiDi, script detection etc?

  • SDL in-tree build error in Windows

    SDL in-tree build error in Windows

    Hello, Sir I met a build issue when use CMake(version 3.6.2) in Windows, (same result for CMake CMakeLists.txt command)

    D:\work\flatui>cmake -G "Visual Studio 14 2015" -- FlatUI standalone: building tests and sample -- FPLBase library: not building samples CMake Error at dependencies/sdl/CMakeLists.txt:2 (message): Prevented in-tree built. Please create a build directory outside of the SDL source code and call cmake from there

    -- Configuring incomplete, errors occurred! See also "D:/work/flatui/CMakeFiles/CMakeOutput.log".

    Seems that it is a bug in SDL CMakeLists.txt that prevents SDL from being built out-of-tree if the calling project is being built in-tree. Here is script in SDL CMakeLists.txt if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR}) message(FATAL_ERROR "Prevented in-tree built. Please create a build directory outside of the SDL source code and call cmake from there") endif()

    Do you guys know how to fix it?

    BR, nonew

  • Android compilation issue - toolchain 4.9?

    Android compilation issue - toolchain 4.9?

    I'm using the toolchain 4.9 and have that compilation issue:

    dmabin-macbookpro:jni dmabin$ ndk-build APP_ABI=all [arm64-v8a] Install : libSDL2_empty.so => libs/arm64-v8a/libSDL2_empty.so install -p /Users/dmabin/Documents/dev/CppIAP/flatui/repo/libs/arm64-v8a/libSDL2_empty.so /Users/dmabin/Documents/dev/CppIAP/flatui/repo/libs/arm64-v8a/libSDL2.so [arm64-v8a] StaticLibrary : libSDL2.a [x86_64] Install : libSDL2_empty.so => libs/x86_64/libSDL2_empty.so install -p /Users/dmabin/Documents/dev/CppIAP/flatui/repo/libs/x86_64/libSDL2_empty.so /Users/dmabin/Documents/dev/CppIAP/flatui/repo/libs/x86_64/libSDL2.so [x86_64] StaticLibrary : libSDL2.a [mips64] Compile : webp <= tree.c /var/folders/fp/ttp_xh810tsbn342c_9_9btr009c3c/T//cc0797CW.s: Assembler messages: /var/folders/fp/ttp_xh810tsbn342c_9_9btr009c3c/T//cc0797CW.s:381: **Error: opcode not supported on this processor: mips64r6 (mips64r6) ulw $31,0($17)'** /var/folders/fp/ttp_xh810tsbn342c_9_9btr009c3c/T//cc0797CW.s:783: Error: opcode not supported on this processor: mips64r6 (mips64r6)ulw $5,0($24)' /var/folders/fp/ttp_xh810tsbn342c_9_9btr009c3c/T//cc0797CW.s:1176: Error: opcode not supported on this processor: mips64r6 (mips64r6)ulw $4,0($25)' /var/folders/fp/ttp_xh810tsbn342c_9_9btr009c3c/T//cc0797CW.s:1469: Error: opcode not supported on this processor: mips64r6 (mips64r6)ulw $6,0($10)' /var/folders/fp/ttp_xh810tsbn342c_9_9btr009c3c/T//cc0797CW.s:2130: Error: opcode not supported on this processor: mips64r6 (mips64r6)ulw $3,0($5)' /var/folders/fp/ttp_xh810tsbn342c_9_9btr009c3c/T//cc0797CW.s:2202: Error: opcode not supported on this processor: mips64r6 (mips64r6)ulw $14,0($10)' /var/folders/fp/ttp_xh810tsbn342c_9_9btr009c3c/T//cc0797CW.s:2272: Error: opcode not supported on this processor: mips64r6 (mips64r6)ulw $31,0($14)' /var/folders/fp/ttp_xh810tsbn342c_9_9btr009c3c/T//cc0797CW.s:2343: Error: opcode not supported on this processor: mips64r6 (mips64r6)ulw $5,0($24)' /var/folders/fp/ttp_xh810tsbn342c_9_9btr009c3c/T//cc0797CW.s:2601: Error: opcode not supported on this processor: mips64r6 (mips64r6)ulw $6,0($3)' /var/folders/fp/ttp_xh810tsbn342c_9_9btr009c3c/T//cc0797CW.s:2673: Error: opcode not supported on this processor: mips64r6 (mips64r6)ulw $24,0($25)' /var/folders/fp/ttp_xh810tsbn342c_9_9btr009c3c/T//cc0797CW.s:2744: Error: opcode not supported on this processor: mips64r6 (mips64r6)ulw $6,0($8)' /var/folders/fp/ttp_xh810tsbn342c_9_9btr009c3c/T//cc0797CW.s:2817: Error: opcode not supported on this processor: mips64r6 (mips64r6)ulw $23,0($5)' /var/folders/fp/ttp_xh810tsbn342c_9_9btr009c3c/T//cc0797CW.s:2920: Error: opcode not supported on this processor: mips64r6 (mips64r6)ulw $31,0($23)' /var/folders/fp/ttp_xh810tsbn342c_9_9btr009c3c/T//cc0797CW.s:3722: Error: opcode not supported on this processor: mips64r6 (mips64r6)ulw $2,0($24)' make: *** [/Users/dmabin/Documents/dev/CppIAP/flatui/repo/obj/local/mips64/objs/webp/src/dec/tree.o] Error 1

  • How is the documentation generated ?

    How is the documentation generated ?

    Hi,

    This is not an issue and maybe off-the-topic. While I am learning FlatUI, the documentation ( here: http://google.github.io/flatui) is nice and clean. I wonder how I could generate the same style documentation for my own projects.

    I checked the docs folder, it's using doxygen and a python module named 'docs'. I couldn't find this package on the internet. Could anybody tell me where I can find it, or is it an internal module which is not open sourced yet ?

    Thanks!

  • build android on windows issue

    build android on windows issue

    D:\study\github\test\flatui>ndk-build Android NDK: WARNING:D:/study/github/test/flatui/jni/libs/freetype/../../../dependencies/flatbuffers/../flatbuffers/android/jni/Android.mk:FlatBufferTest: non-system libraries in linker flags: -latomic Android NDK: This is likely to result in incorrect builds. Try using LOCAL_STATIC_LIBRARIES Android NDK: or LOCAL_SHARED_LIBRARIES instead to list the library dependencies of the Android NDK: current module D:/study/github/test/flatui/dependencies/flatbuffers\android\jni\build_flatc.bat cmake D:/study/github/test/flatui/dependencies/flatbuffers Searching for Visual Studio 20 Searching for Visual Studio 19 Searching for Visual Studio 18 Searching for Visual Studio 17 Searching for Visual Studio 16 Searching for Visual Studio 15 Searching for Visual Studio 14 Generating solution for Visual Studio 14. CMake Warning: No source or binary directory provided. Both will be assumed to be the same as the current working directory, but note that this warning will become a fatal error in future CMake releases.

    CMake Error at CMakeLists.txt:3 (project): Failed to run MSBuild command:

    MSBuild.exe
    

    to get the value of VCTargetsPath:

    系统找不到指定的文件。
    

    -- Configuring incomplete, errors occurred! See also "D:/study/github/test/flatui/dependencies/flatbuffers/CMakeFiles/CMakeOutput.log". make: *** [build_flatc] Error 1

    why build android need VS?

  • VectorPacked has no member named 'data'

    VectorPacked has no member named 'data'

    https://github.com/google/flatui/blob/2e363fa18228664a06d8279ab07e514f3a3f51af/include/flatui/font_buffer.h#L598 `ERROR: /home/user/Documents/lullaby-master/lullaby/systems/text/BUILD:35:1: C++ compilation of rule '//lullaby/systems/text:flatui' failed (Exit 1) gcc failed: error executing command /usr/bin/gcc -U_FORTIFY_SOURCE -fstack-protector -Wall -Wunused-but-set-parameter -Wno-free-nonheap-object -fno-omit-frame-pointer '-std=c++0x' -MD -MF ... (remaining 197 argument(s) skipped)

    Use --sandbox_debug to see verbose messages from the sandbox In file included from external/flatui/include/flatui/font_manager.h:23:0, from ./lullaby/systems/text/flatui/font.h:23, from lullaby/systems/text/flatui/font.cc:17: external/flatui/include/flatui/font_buffer.h: In constructor 'flatui::FontVertex::FontVertex(float, float, float, float, float)': external/flatui/include/flatui/font_buffer.h:598:15: error: 'mathfu::vec3_packed {aka struct mathfu::VectorPacked<float, 3>}' has no member named 'data' position_.data[0] = x; ^~~~ external/flatui/include/flatui/font_buffer.h:599:15: error: 'mathfu::vec3_packed {aka struct mathfu::VectorPacked<float, 3>}' has no member named 'data' position_.data[1] = y; ^~~~ external/flatui/include/flatui/font_buffer.h:600:15: error: 'mathfu::vec3_packed {aka struct mathfu::VectorPacked<float, 3>}' has no member named 'data' position_.data[2] = z; ^~~~ external/flatui/include/flatui/font_buffer.h:601:9: error: 'mathfu::vec2_packed {aka struct mathfu::VectorPacked<float, 2>}' has no member named 'data' uv_.data[0] = u; ^~~~ external/flatui/include/flatui/font_buffer.h:602:9: error: 'mathfu::vec2_packed {aka struct mathfu::VectorPacked<float, 2>}' has no member named 'data' uv_.data[1] = v; ^~~~ `

  • HarfBuzz out of date

    HarfBuzz out of date

    A few files in cmake/harfbuzz/CMakeLists.txt such as ${harfbuzz_dir}/src/hb-ot-shape-complex-use.cc are missing from the commit the submodule is pointing to.

Related tags
The HorusUI library allows you to quickly develop GUIs for your applications by leveraging the ease of use provided by immediate mode GUI concepts.
The HorusUI library allows you to quickly develop GUIs for your applications by leveraging the ease of use provided by immediate mode GUI concepts.

Immediate Mode Graphical User Interface for Tools OVERVIEW The HorusUI library allows you to quickly develop GUIs for your applications by leveraging

Dec 12, 2022
This is a minimal state immediate mode graphical user interface toolkit written in ANSI C and licensed under public domain
This is a minimal state immediate mode graphical user interface toolkit written in ANSI C and licensed under public domain

This is a minimal state immediate mode graphical user interface toolkit written in ANSI C and licensed under public domain. It was designed as a simple embeddable user interface for application and does not have any dependencies, a default render backend or OS window and input handling but instead provides a very modular library approach by using simple input state for input and draw commands describing primitive shapes as output.

Jan 8, 2023
raygui is a simple and easy-to-use immediate-mode-gui library.
raygui is a simple and easy-to-use immediate-mode-gui library.

raygui is a simple and easy-to-use immediate-mode-gui library.

Dec 30, 2022
A single-header ANSI C immediate mode cross-platform GUI library
A single-header ANSI C immediate mode cross-platform GUI library

Nuklear This is a minimal-state, immediate-mode graphical user interface toolkit written in ANSI C and licensed under public domain. It was designed a

Dec 24, 2022
This is a thin c-api wrapper programmatically generated for the excellent C++ immediate mode gui Dear ImGui.

cimgui This is a thin c-api wrapper programmatically generated for the excellent C++ immediate mode gui Dear ImGui. All imgui.h functions are programm

Jul 5, 2021
ImTui: Immediate Mode Text-based User Interface C++ Library
ImTui: Immediate Mode Text-based User Interface C++ Library

ImTui is an immediate mode text-based user interface library. Supports 256 ANSI colors and mouse/keyboard input.

Jan 1, 2023
A tiny, portable, immediate-mode UI library written in ANSI C
A tiny, portable, immediate-mode UI library written in ANSI C

A tiny, portable, immediate-mode UI library written in ANSI C Features Tiny: around 1100 sloc of ANSI C Works within a fixed-sized memory region: no a

Jan 6, 2023
Immediate mode 3D gizmo for scene editing and other controls based on Dear Imgui
Immediate mode 3D gizmo for scene editing and other controls based on Dear Imgui

ImGuizmo Latest stable tagged version is 1.83. Current master version is 1.84 WIP. What started with the gizmo is now a collection of dear imgui widge

Dec 27, 2022
A minimalist andf platform-agnostic application layer for writing graphical applications, with a strong emphasis on simplicity and ease of use.
A minimalist andf platform-agnostic application layer for writing graphical applications, with a strong emphasis on simplicity and ease of use.

SlimApp A minimalist(*) and platform-agnostic application layer for writing graphical applications. Available as either a single header file or a dire

Dec 18, 2022
Simple and portable (but not inflexible) GUI library in C that uses the native GUI technologies of each platform it supports.
Simple and portable (but not inflexible) GUI library in C that uses the native GUI technologies of each platform it supports.

libui: a portable GUI library for C This README is being written. Status It has come to my attention that I have not been particularly clear about how

Jan 2, 2023
Examples, tutorials and applications for the LVGL embedded GUI library
Examples, tutorials and applications for the LVGL embedded GUI library

Examples, tutorials and applications for the LVGL embedded GUI library

Nov 11, 2022
Free open-source modern C++17 / C++20 framework to create console, forms (GUI like WinForms) and unit test applications on Microsoft Windows, Apple macOS and Linux.
Free open-source modern C++17 / C++20 framework to create console, forms (GUI like WinForms) and unit test applications on Microsoft Windows, Apple macOS and Linux.

xtd Modern C++17/20 framework to create console (CLI), forms (GUI like WinForms) and tunit (unit tests like Microsoft Unit Testing Framework) applicat

Jan 4, 2023
wxWidgets is a free and open source cross-platform C++ framework for writing advanced GUI applications using native controls.
wxWidgets is a free and open source cross-platform C++ framework for writing advanced GUI applications using native controls.

About wxWidgets is a free and open source cross-platform C++ framework for writing advanced GUI applications using native controls. wxWidgets allows y

Jan 7, 2023
An efficient graphical Minecraft seed finder and map viewer.

Cubiomes Viewer provides a graphical interface for the efficient and flexible seed-finding utilities provided by cubiomes and a map viewer for the Minecraft biomes and structure generation.

Jan 7, 2023
Dear ImGui: Bloat-free Graphical User interface for C++ with minimal dependencies
Dear ImGui: Bloat-free Graphical User interface for C++ with minimal dependencies

Dear ImGui (This library is available under a free and permissive license, but needs financial support to sustain its continued improvements. In addit

Jan 7, 2023
ROS_Melodic_Qt_GUI_Template is a Graphical User Interface programmed with Qt framework.
ROS_Melodic_Qt_GUI_Template is a Graphical User Interface programmed with Qt framework.

This is a GUI template for ros to control your robot and read data from sensors.

Nov 15, 2022
AnUI is a powerful Graphical User Interface framework made for people that actually care about design!

What's AuUI ** Project is not finished ** AuUI, an abbreviation for "Actual Understandable User Interface" is a graphical user interface framework to

Jun 17, 2022
GTK is a multi-platform toolkit for creating graphical user interfaces.

GTK — The GTK toolkit General information GTK is a multi-platform toolkit for creating graphical user interfaces. Offering a complete set of widgets,

Dec 31, 2022
Minimalistic C++/Python GUI library for OpenGL, GLES2/3, Metal, and WebAssembly/WebGL
Minimalistic C++/Python GUI library for OpenGL, GLES2/3, Metal, and WebAssembly/WebGL

NanoGUI NanoGUI is a minimalistic cross-platform widget library for OpenGL 3+, GLES 2/3, and Metal. It supports automatic layout generation, stateful

Dec 28, 2022