mirror of
https://github.com/Drezil/imgui.git
synced 2024-11-29 14:56:36 +00:00
Added ImGuiConfigFlags_IsSRGB, ImGuiConfigFlags_IsTouchScreen (strictly for user storage)
This commit is contained in:
parent
2c9f45bbe7
commit
b3594a6407
@ -126,6 +126,8 @@ Other Changes:
|
|||||||
- Misc: Added misc/natvis/imgui.natvis for visual studio debugger users to easily visualizer imgui internal types. Added to examples projects.
|
- Misc: Added misc/natvis/imgui.natvis for visual studio debugger users to easily visualizer imgui internal types. Added to examples projects.
|
||||||
- Misc: Added IMGUI_USER_CONFIG to define a custom configuration filename. (#255, #1573, #1144, #41)
|
- Misc: Added IMGUI_USER_CONFIG to define a custom configuration filename. (#255, #1573, #1144, #41)
|
||||||
- Misc: Updated stb_rect_pack from 0.10 to 0.11 (minor changes).
|
- Misc: Updated stb_rect_pack from 0.10 to 0.11 (minor changes).
|
||||||
|
- Misc: Added ImGuiConfigFlags_IsSRGB and ImGuiConfigFlags_IsTouchScreen user flags (for io.ConfigFlags).
|
||||||
|
(Those flags are not used by ImGui itself, they only exists to make it easy for the engine/back-end to pass information to the application in a standard manner.)
|
||||||
- Fonts: Updated stb_truetype from 1.14 to stb_truetype 1.19. (w/ include fix from some platforms #1622)
|
- Fonts: Updated stb_truetype from 1.14 to stb_truetype 1.19. (w/ include fix from some platforms #1622)
|
||||||
- Fonts: Added optional FreeType rasterizer in misc/freetype. Moved from imgui_club repo. (#618) [@Vuhdo, @mikesart, @ocornut]
|
- Fonts: Added optional FreeType rasterizer in misc/freetype. Moved from imgui_club repo. (#618) [@Vuhdo, @mikesart, @ocornut]
|
||||||
- Fonts: Moved extra_fonts/ to misc/fonts/.
|
- Fonts: Moved extra_fonts/ to misc/fonts/.
|
||||||
|
12
imgui.h
12
imgui.h
@ -90,12 +90,12 @@ typedef int ImDrawListFlags; // flags: for ImDrawList
|
|||||||
typedef int ImFontAtlasFlags; // flags: for ImFontAtlas // enum ImFontAtlasFlags_
|
typedef int ImFontAtlasFlags; // flags: for ImFontAtlas // enum ImFontAtlasFlags_
|
||||||
typedef int ImGuiColorEditFlags; // flags: for ColorEdit*(), ColorPicker*() // enum ImGuiColorEditFlags_
|
typedef int ImGuiColorEditFlags; // flags: for ColorEdit*(), ColorPicker*() // enum ImGuiColorEditFlags_
|
||||||
typedef int ImGuiColumnsFlags; // flags: for *Columns*() // enum ImGuiColumnsFlags_
|
typedef int ImGuiColumnsFlags; // flags: for *Columns*() // enum ImGuiColumnsFlags_
|
||||||
|
typedef int ImGuiConfigFlags; // flags: for io.ConfigFlags // enum ImGuiConfigFlags_
|
||||||
typedef int ImGuiDragDropFlags; // flags: for *DragDrop*() // enum ImGuiDragDropFlags_
|
typedef int ImGuiDragDropFlags; // flags: for *DragDrop*() // enum ImGuiDragDropFlags_
|
||||||
typedef int ImGuiComboFlags; // flags: for BeginCombo() // enum ImGuiComboFlags_
|
typedef int ImGuiComboFlags; // flags: for BeginCombo() // enum ImGuiComboFlags_
|
||||||
typedef int ImGuiFocusedFlags; // flags: for IsWindowFocused() // enum ImGuiFocusedFlags_
|
typedef int ImGuiFocusedFlags; // flags: for IsWindowFocused() // enum ImGuiFocusedFlags_
|
||||||
typedef int ImGuiHoveredFlags; // flags: for IsItemHovered() etc. // enum ImGuiHoveredFlags_
|
typedef int ImGuiHoveredFlags; // flags: for IsItemHovered() etc. // enum ImGuiHoveredFlags_
|
||||||
typedef int ImGuiInputTextFlags; // flags: for InputText*() // enum ImGuiInputTextFlags_
|
typedef int ImGuiInputTextFlags; // flags: for InputText*() // enum ImGuiInputTextFlags_
|
||||||
typedef int ImGuiConfigFlags; // flags: for io.ConfigFlags // enum ImGuiConfigFlags_
|
|
||||||
typedef int ImGuiSelectableFlags; // flags: for Selectable() // enum ImGuiSelectableFlags_
|
typedef int ImGuiSelectableFlags; // flags: for Selectable() // enum ImGuiSelectableFlags_
|
||||||
typedef int ImGuiTreeNodeFlags; // flags: for TreeNode*(),CollapsingHeader()// enum ImGuiTreeNodeFlags_
|
typedef int ImGuiTreeNodeFlags; // flags: for TreeNode*(),CollapsingHeader()// enum ImGuiTreeNodeFlags_
|
||||||
typedef int ImGuiWindowFlags; // flags: for Begin*() // enum ImGuiWindowFlags_
|
typedef int ImGuiWindowFlags; // flags: for Begin*() // enum ImGuiWindowFlags_
|
||||||
@ -710,8 +710,8 @@ enum ImGuiKey_
|
|||||||
};
|
};
|
||||||
|
|
||||||
// [BETA] Gamepad/Keyboard directional navigation
|
// [BETA] Gamepad/Keyboard directional navigation
|
||||||
// Keyboard: Set io.ConfigFlags |= ImGuiConfigFlags_EnableKeyboard to enable. NewFrame() will automatically fill io.NavInputs[] based on your io.KeyDown[] + io.KeyMap[] arrays.
|
// Keyboard: Set io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard to enable. NewFrame() will automatically fill io.NavInputs[] based on your io.KeyDown[] + io.KeyMap[] arrays.
|
||||||
// Gamepad: Set io.ConfigFlags |= ImGuiConfigFlags_EnableGamepad to enable. Fill the io.NavInputs[] fields before calling NewFrame(). Note that io.NavInputs[] is cleared by EndFrame().
|
// Gamepad: Set io.ConfigFlags |= ImGuiConfigFlags_NavEnableGamepad to enable. Fill the io.NavInputs[] fields before calling NewFrame(). Note that io.NavInputs[] is cleared by EndFrame().
|
||||||
// Read instructions in imgui.cpp for more details.
|
// Read instructions in imgui.cpp for more details.
|
||||||
enum ImGuiNavInput_
|
enum ImGuiNavInput_
|
||||||
{
|
{
|
||||||
@ -750,7 +750,11 @@ enum ImGuiConfigFlags_
|
|||||||
ImGuiConfigFlags_NavEnableKeyboard = 1 << 0, // Master keyboard navigation enable flag. NewFrame() will automatically fill io.NavInputs[] based on io.KeyDown[].
|
ImGuiConfigFlags_NavEnableKeyboard = 1 << 0, // Master keyboard navigation enable flag. NewFrame() will automatically fill io.NavInputs[] based on io.KeyDown[].
|
||||||
ImGuiConfigFlags_NavEnableGamepad = 1 << 1, // Master gamepad navigation enable flag. This is mostly to instruct your imgui back-end to fill io.NavInputs[].
|
ImGuiConfigFlags_NavEnableGamepad = 1 << 1, // Master gamepad navigation enable flag. This is mostly to instruct your imgui back-end to fill io.NavInputs[].
|
||||||
ImGuiConfigFlags_NavMoveMouse = 1 << 2, // Request navigation to allow moving the mouse cursor. May be useful on TV/console systems where moving a virtual mouse is awkward. Will update io.MousePos and set io.WantMoveMouse=true. If enabled you MUST honor io.WantMoveMouse requests in your binding, otherwise ImGui will react as if the mouse is jumping around back and forth.
|
ImGuiConfigFlags_NavMoveMouse = 1 << 2, // Request navigation to allow moving the mouse cursor. May be useful on TV/console systems where moving a virtual mouse is awkward. Will update io.MousePos and set io.WantMoveMouse=true. If enabled you MUST honor io.WantMoveMouse requests in your binding, otherwise ImGui will react as if the mouse is jumping around back and forth.
|
||||||
ImGuiConfigFlags_NavNoCaptureKeyboard = 1 << 3 // Do not set the io.WantCaptureKeyboard flag with io.NavActive is set.
|
ImGuiConfigFlags_NavNoCaptureKeyboard = 1 << 3, // Do not set the io.WantCaptureKeyboard flag with io.NavActive is set.
|
||||||
|
|
||||||
|
// User storage (to allow your back-end/engine to communicate to code that may be shared between multiple projects. Those flags are not used by core ImGui)
|
||||||
|
ImGuiConfigFlags_IsSRGB = 1 << 20, // Back-end is SRGB-aware.
|
||||||
|
ImGuiConfigFlags_IsTouchScreen = 1 << 21 // Back-end is using a touch screen instead of a mouse.
|
||||||
};
|
};
|
||||||
|
|
||||||
// Enumeration for PushStyleColor() / PopStyleColor()
|
// Enumeration for PushStyleColor() / PopStyleColor()
|
||||||
|
@ -2211,10 +2211,8 @@ void ImGui::ShowStyleEditor(ImGuiStyle* ref)
|
|||||||
ImGui::Text("Fallback character: '%c' (%d)", font->FallbackChar, font->FallbackChar);
|
ImGui::Text("Fallback character: '%c' (%d)", font->FallbackChar, font->FallbackChar);
|
||||||
ImGui::Text("Texture surface: %d pixels (approx) ~ %dx%d", font->MetricsTotalSurface, (int)sqrtf((float)font->MetricsTotalSurface), (int)sqrtf((float)font->MetricsTotalSurface));
|
ImGui::Text("Texture surface: %d pixels (approx) ~ %dx%d", font->MetricsTotalSurface, (int)sqrtf((float)font->MetricsTotalSurface), (int)sqrtf((float)font->MetricsTotalSurface));
|
||||||
for (int config_i = 0; config_i < font->ConfigDataCount; config_i++)
|
for (int config_i = 0; config_i < font->ConfigDataCount; config_i++)
|
||||||
{
|
if (ImFontConfig* cfg = &font->ConfigData[config_i])
|
||||||
ImFontConfig* cfg = &font->ConfigData[config_i];
|
ImGui::BulletText("Input %d: \'%s\', Oversample: (%d,%d), PixelSnapH: %d", config_i, cfg->Name, cfg->OversampleH, cfg->OversampleV, cfg->PixelSnapH);
|
||||||
ImGui::BulletText("Input %d: \'%s\', Oversample: (%d,%d), PixelSnapH: %d", config_i, cfg->Name, cfg->OversampleH, cfg->OversampleV, cfg->PixelSnapH);
|
|
||||||
}
|
|
||||||
if (ImGui::TreeNode("Glyphs", "Glyphs (%d)", font->Glyphs.Size))
|
if (ImGui::TreeNode("Glyphs", "Glyphs (%d)", font->Glyphs.Size))
|
||||||
{
|
{
|
||||||
// Display all glyphs of the fonts in separate pages of 256 characters
|
// Display all glyphs of the fonts in separate pages of 256 characters
|
||||||
|
Loading…
Reference in New Issue
Block a user