mirror of
https://github.com/Drezil/imgui.git
synced 2025-07-13 08:19:55 +02:00
Compare commits
28 Commits
Author | SHA1 | Date | |
---|---|---|---|
b0ea57e518 | |||
4260195159 | |||
26fdf1655c | |||
c1251d2994 | |||
1c657564ac | |||
98a38e24ab | |||
0505995193 | |||
4905ec46f1 | |||
3fe669f547 | |||
22c1d7eded | |||
39373b563b | |||
97d34271f8 | |||
a5f4108781 | |||
3674d30e90 | |||
2268b098e0 | |||
4bccc06933 | |||
ee49c2288d | |||
34664dc28c | |||
e4f96147de | |||
12225abfe2 | |||
505bd1a66d | |||
c9002620c6 | |||
f8c58fe328 | |||
74ab555558 | |||
da5227fa28 | |||
3b028c7ebf | |||
2d111ccb55 | |||
691ca46978 |
26
README.md
26
README.md
@ -8,7 +8,6 @@ ImGui is designed to enable fast iteration and allow programmers to create "cont
|
||||
|
||||
ImGui is particularly suited to integration in 3D applications, fullscreen applications, embedded applications, games, or any applications on consoles platforms where operating system features are non-standard.
|
||||
|
||||
|
||||
ImGui is self-contained within 4 files that you can easily copy and compile into your application/engine:
|
||||
|
||||
- imgui.cpp
|
||||
@ -54,7 +53,7 @@ The bulk of example user code is contained within the ImGui::ShowTestWindow() fu
|
||||
|
||||
<b>How do you use ImGui on a platform that may not have a mouse or keyboard?</b>
|
||||
|
||||
I recommend using [Synergy](http://synergy-project.org). With the uSynergy.c micro client running you can seamlessly use your PC input devices from a video game console or a tablet. ImGui was also designed to function with touch inputs if you increase the padding of widgets to compensate for the lack of precision of touch devices, but it is recommended you use a mouse to allow optimising for screen real-estate.
|
||||
I recommend using [Synergy](http://synergy-project.org). With the uSynergy.c micro client running on your platform and connecting to your PC, you can seamlessly use your PC input devices from a video game console or a tablet. ImGui allows to increase the hit box of widgets (via the _TouchPadding_ setting) to accomodate a little for the lack of precision of touch inputs, but it is recommended you use a mouse to allow optimising for screen real-estate.
|
||||
|
||||
<b>I integrated ImGui in my engine and the text or lines are blurry..</b>
|
||||
|
||||
@ -88,13 +87,6 @@ ImGui takes advantage of a few C++ features for convenience but nothing in the r
|
||||
|
||||
Shall someone wants to use ImGui from another language, it should be possible to wrap ImGui to be used from a raw C API in the future.
|
||||
|
||||
Support
|
||||
-------
|
||||
|
||||
<b>Can you develop features xxxx for ImGui?</b>
|
||||
|
||||
Please use GitHub 'Issues' facilities to suggest and discuss improvements. Your questions are often helpul to the community of users.
|
||||
|
||||
Donate
|
||||
------
|
||||
|
||||
@ -105,13 +97,23 @@ Yes please! I have setup an [**ImGui Patreon page**](http://www.patreon.com/imgu
|
||||
Credits
|
||||
-------
|
||||
|
||||
Developed by [Omar Cornut](http://www.miracleworld.net). The library was developed with the support of [Media Molecule](http://www.mediamolecule.com) and first used internally on the game [Tearaway](http://tearaway.mediamolecule.com).
|
||||
Developed by [Omar Cornut](http://www.miracleworld.net) and every direct or indirect contributors to the GitHub. The early version of this library was developed with the support of [Media Molecule](http://www.mediamolecule.com) and first used internally on the game [Tearaway](http://tearaway.mediamolecule.com).
|
||||
|
||||
Embeds [proggy_clean](http://upperbounds.net) font by Tristan Grimmer (MIT license).
|
||||
Embeds [M+ fonts](http://mplus-fonts.sourceforge.jp/mplus-outline-fonts/index-en.html) font by Coji Morishita (free software license).
|
||||
Embeds [stb_textedit.h](https://github.com/nothings/stb/) by Sean Barrett.
|
||||
Embeds [stb_textedit.h](https://github.com/nothings/stb/) by Sean Barrett (public domain).
|
||||
|
||||
Inspiration, feedback, and testing: Casey Muratori, Atman Binstock, Mikko Mononen, Emmanuel Briney, Stefan Kamoda, Anton Mikhailov, Matt Willis. Thanks!
|
||||
Inspiration, feedback, and testing for early versions: Casey Muratori, Atman Binstock, Mikko Mononen, Emmanuel Briney, Stefan Kamoda, Anton Mikhailov, Matt Willis. And everybody posting feedback, questions and patches on the GitHub.
|
||||
|
||||
ImGui is financially supported on [**Patreon**](http://www.patreon.com/imgui).
|
||||
|
||||
Special supporters
|
||||
- Jetha Chan
|
||||
|
||||
Supporters
|
||||
- Michel Courtine
|
||||
|
||||
And other supporters; thanks!
|
||||
|
||||
License
|
||||
-------
|
||||
|
@ -1,6 +1,7 @@
|
||||
// ImGui - standalone example application for DirectX 11
|
||||
|
||||
#include <windows.h>
|
||||
#define STB_IMAGE_STATIC
|
||||
#define STB_IMAGE_IMPLEMENTATION
|
||||
#include "../shared/stb_image.h" // for .png loading
|
||||
#include "../../imgui.h"
|
||||
|
@ -1,10 +1,14 @@
|
||||
// ImGui - standalone example application for OpenGL 3, using programmable pipeline
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning (disable: 4996) // 'This function or variable may be unsafe': strcpy, strdup, sprintf, vsnprintf, sscanf, fopen
|
||||
#pragma warning (disable: 4996) // 'This function or variable may be unsafe': strcpy, strdup, sprintf, vsnprintf, sscanf, fopen
|
||||
#endif
|
||||
#ifdef __clang__
|
||||
#pragma clang diagnostic ignored "-Wunused-function" // warning: unused function
|
||||
#endif
|
||||
|
||||
#include "../../imgui.h"
|
||||
#define STB_IMAGE_STATIC
|
||||
#define STB_IMAGE_IMPLEMENTATION
|
||||
#include "../shared/stb_image.h" // stb_image.h for PNG loading
|
||||
|
||||
|
@ -1,10 +1,14 @@
|
||||
// ImGui - standalone example application for OpenGL 2, using fixed pipeline
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning (disable: 4996) // 'This function or variable may be unsafe': strcpy, strdup, sprintf, vsnprintf, sscanf, fopen
|
||||
#pragma warning (disable: 4996) // 'This function or variable may be unsafe': strcpy, strdup, sprintf, vsnprintf, sscanf, fopen
|
||||
#endif
|
||||
#ifdef __clang__
|
||||
#pragma clang diagnostic ignored "-Wunused-function" // warning: unused function
|
||||
#endif
|
||||
|
||||
#include "../../imgui.h"
|
||||
#define STB_IMAGE_STATIC
|
||||
#define STB_IMAGE_IMPLEMENTATION
|
||||
#include "../shared/stb_image.h" // stb_image.h for PNG loading
|
||||
|
||||
|
8
imgui.h
8
imgui.h
@ -1,4 +1,4 @@
|
||||
// ImGui library v1.19 wip
|
||||
// ImGui library v1.20
|
||||
// See .cpp file for commentary.
|
||||
// See ImGui::ShowTestWindow() for sample code.
|
||||
// Read 'Programmer guide' in .cpp for notes on how to setup ImGui in your codebase.
|
||||
@ -19,6 +19,7 @@ struct ImGuiWindow;
|
||||
#include <stdarg.h> // va_list
|
||||
#include <stddef.h> // ptrdiff_t
|
||||
#include <stdlib.h> // NULL, malloc
|
||||
#include <string.h> // memset, memmove
|
||||
|
||||
#ifndef IM_ASSERT
|
||||
#include <assert.h>
|
||||
@ -386,6 +387,7 @@ enum ImGuiCol_
|
||||
ImGuiCol_ComboBg,
|
||||
ImGuiCol_CheckHovered,
|
||||
ImGuiCol_CheckActive,
|
||||
ImGuiCol_CheckMark,
|
||||
ImGuiCol_SliderGrab,
|
||||
ImGuiCol_SliderGrabActive,
|
||||
ImGuiCol_Button,
|
||||
@ -685,7 +687,7 @@ struct ImDrawVert
|
||||
ImU32 col;
|
||||
};
|
||||
#else
|
||||
// You can change the vertex format layout by defining IMGUI_OVERRIDE_DRAWVERT_STRUCT_LAYOUT.
|
||||
// You can change the vertex format layout by defining IMGUI_OVERRIDE_DRAWVERT_STRUCT_LAYOUT in imconfig.h
|
||||
// The code expect ImVec2 pos (8 bytes), ImVec2 uv (8 bytes), ImU32 col (4 bytes), but you can re-order them or add other fields as needed to simplify integration in your engine.
|
||||
// The type has to be described by the #define (you can either declare the struct or use a typedef)
|
||||
IMGUI_OVERRIDE_DRAWVERT_STRUCT_LAYOUT;
|
||||
@ -743,7 +745,7 @@ struct ImFont
|
||||
|
||||
// Settings
|
||||
float Scale; // = 1.0f // Base font scale, multiplied by the per-window font scale which you can adjust with SetFontScale()
|
||||
ImVec2 DisplayOffset; // = (0.0f,0.0f // Offset font rendering by xx pixels
|
||||
ImVec2 DisplayOffset; // = (0.0f,0.0f) // Offset font rendering by xx pixels
|
||||
ImVec2 TexUvForWhite; // = (0.0f,0.0f) // Font texture must have a white pixel at this UV coordinate. Adjust if you are using custom texture.
|
||||
ImWchar FallbackChar; // = '?' // Replacement glyph is one isn't found.
|
||||
|
||||
|
Reference in New Issue
Block a user