mirror of https://github.com/inolen/redream.git
updated to latest imgui
This commit is contained in:
parent
0ab57e8f82
commit
ec5f15abaa
|
@ -25,6 +25,7 @@ It's mostly a bunch of personal notes, probably incomplete. Feel free to query i
|
|||
- window: double-clicking on title bar to minimize isn't consistent, perhaps move to single-click on left-most collapse icon?
|
||||
- window: expose contents size. (#1045)
|
||||
- window: GetWindowSize() returns (0,0) when not calculated? (#1045)
|
||||
- window: freeze window flag: if not focused/hovered, return false, render with previous ImDrawList. and/or reduce refresh rate.
|
||||
!- scrolling: allow immediately effective change of scroll after Begin() if we haven't appended items yet.
|
||||
- scrolling/clipping: separator on the initial position of a window is not visible (cursorpos.y <= clippos.y). (2017-08-20: can't repro)
|
||||
|
||||
|
@ -55,6 +56,7 @@ It's mostly a bunch of personal notes, probably incomplete. Feel free to query i
|
|||
- input text: flag to disable live update of the user buffer (also applies to float/int text input) (#701)
|
||||
- input text: way to dynamically grow the buffer without forcing the user to initially allocate for worse case, e.g. more natural std::string (follow up on #200)
|
||||
- input text: hover tooltip could show unclamped text
|
||||
- input text: option to Tab after an Enter validation.
|
||||
- input text: add ImGuiInputTextFlags_EnterToApply? (off #218)
|
||||
- input text: easier ways to update buffer (from source char*) while owned. preserve some sort of cursor position for multi-line text.
|
||||
- input text: add discard flag (e.g. ImGuiInputTextFlags_DiscardActiveBuffer) or make it easier to clear active focus for text replacement during edition (#725)
|
||||
|
@ -80,7 +82,9 @@ It's mostly a bunch of personal notes, probably incomplete. Feel free to query i
|
|||
|
||||
- columns: sizing policy (e.g. for each column: fixed size, %, fill, distribute default size among fills) (#513, #125)
|
||||
- columns: add a conditional parameter to SetColumnOffset() (#513, #125)
|
||||
- columns: headers. with sort op/button. reorderable. (#513, #125)
|
||||
- columns: headers. reorderable. (#513, #125)
|
||||
- columns: optional sorting modifiers (up/down), sort list so sorting can be done multi-critera. notify user when sort order changed.
|
||||
- columns: option to alternate background colors on odd/even scanlines.
|
||||
- columns: allow columns to recurse.
|
||||
- columns: separator function or parameter that works within the column (currently Separator() bypass all columns) (#125)
|
||||
- columns: flag to add horizontal separator above/below?
|
||||
|
@ -134,7 +138,7 @@ It's mostly a bunch of personal notes, probably incomplete. Feel free to query i
|
|||
- combo: option for ComboEx to not return true when unchanged (#1182)
|
||||
- combo/listbox: keyboard control. need InputText-like non-active focus + key handling. considering keyboard for custom listbox (pr #203)
|
||||
- listbox: multiple selection.
|
||||
- listbox: unselect (#1208)
|
||||
- listbox: unselect option (#1208)
|
||||
- listbox: make it easier/more natural to implement range-select (need some sort of info/ref about the last clicked/focused item that user can translate to an index?)
|
||||
- listbox: user may want to initial scroll to focus on the one selected value?
|
||||
- listbox: expose hovered item for a basic ListBox
|
||||
|
@ -142,7 +146,6 @@ It's mostly a bunch of personal notes, probably incomplete. Feel free to query i
|
|||
- listbox: scrolling should track modified selection.
|
||||
|
||||
!- popups/menus: clarify usage of popups id, how MenuItem/Selectable closing parent popups affects the ID, etc. this is quite fishy needs improvement! (#331, #402)
|
||||
- popups/nav: esc/enter default behavior for popups.
|
||||
- popups: reopening context menu at new position should be the behavior by default? (equivalent to internal OpenPopupEx() with reopen_existing=true)
|
||||
- popups: if the popup functions took explicit ImGuiID it would allow the user to manage the scope of those ID. (#331)
|
||||
- popups: clicking outside (to close popup) and holding shouldn't drag window below.
|
||||
|
@ -217,15 +220,19 @@ It's mostly a bunch of personal notes, probably incomplete. Feel free to query i
|
|||
- font: fix AddRemapChar() to work before font has been built.
|
||||
- font: (api breaking) removed "TTF" from symbol names. also because it now supports OTF.
|
||||
|
||||
!- keyboard: tooltip & combo boxes are messing up / not honoring keyboard tabbing.
|
||||
- keyboard: full keyboard navigation and focus. (#323)
|
||||
!- nav/keyboard: tooltip & combo boxes are messing up / not honoring keyboard tabbing.
|
||||
- nav: integrate navigation branch into master. (#787)
|
||||
- nav: integrate/design keyboard controls.
|
||||
- nav: once tab should go through most/all widgets (in submission order?)
|
||||
- nav: esc/enter default behavior for popups, e.g. be able to mark an "ok" or "cancel" button that would get triggered by those keys.
|
||||
- focus: preserve ActiveId/focus stack state, e.g. when opening a menu and close it, previously selected InputText() focus gets restored (#622)
|
||||
- focus: SetKeyboardFocusHere() on with >= 0 offset could be done on same frame (else latch and modulate on beginning of next frame)
|
||||
- focus: unable to use SetKeyboardFocusHere() on clipped widgets. (#343)
|
||||
- focus: unable to use SetKeyboardFocusHere() on clipped widgets. (#787)
|
||||
- inputs: rework IO system to be able to pass actual ordered/timestamped events. use an event queue? (~#335, #71)
|
||||
- inputs: allow to decide and pass explicit double-clicks (e.g. for windows by the CS_DBLCLKS style).
|
||||
- inputs: allow to pass explicit double-clicks if that's the only thing the user's backend can get them. (e.g. for windows by the CS_DBLCLKS style).
|
||||
- inputs: support track pad style scrolling & slider edit.
|
||||
|
||||
- misc: make the ImGuiCond values linear (non-power-of-two). internal storage for ImGuiWindow can use integers to combine into flags.
|
||||
- misc: provide a way to compile out the entire implementation while providing a dummy API (e.g. #define IMGUI_DUMMY_IMPL)
|
||||
- misc: provide HoveredTime and ActivatedTime to ease the creation of animations.
|
||||
- misc: fix for compilation settings where stdcall isn't the default (e.g. vectorcall) (#1230)
|
||||
|
|
|
@ -31,7 +31,7 @@ int main(int, char**)
|
|||
//io.Fonts->AddFontDefault();
|
||||
//io.Fonts->AddFontFromFileTTF("../../extra_fonts/Cousine-Regular.ttf", 15.0f);
|
||||
//io.Fonts->AddFontFromFileTTF("../../extra_fonts/DroidSans.ttf", 16.0f);
|
||||
//io.Fonts->AddFontFromFileTTF("../../extra_fonts/ProggyClean.ttf", 13.0f);
|
||||
//io.Fonts->AddFontFromFileTTF("../../extra_fonts/Roboto-Medium.ttf", 16.0f);
|
||||
//io.Fonts->AddFontFromFileTTF("../../extra_fonts/ProggyTiny.ttf", 10.0f);
|
||||
//io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf", 18.0f, NULL, io.Fonts->GetGlyphRangesJapanese());
|
||||
|
||||
|
|
|
@ -131,7 +131,7 @@ int main(int, char**)
|
|||
//io.Fonts->AddFontDefault();
|
||||
//io.Fonts->AddFontFromFileTTF("../../extra_fonts/Cousine-Regular.ttf", 15.0f);
|
||||
//io.Fonts->AddFontFromFileTTF("../../extra_fonts/DroidSans.ttf", 16.0f);
|
||||
//io.Fonts->AddFontFromFileTTF("../../extra_fonts/ProggyClean.ttf", 13.0f);
|
||||
//io.Fonts->AddFontFromFileTTF("../../extra_fonts/Roboto-Medium.ttf", 16.0f);
|
||||
//io.Fonts->AddFontFromFileTTF("../../extra_fonts/ProggyTiny.ttf", 10.0f);
|
||||
//io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf", 18.0f, NULL, io.Fonts->GetGlyphRangesJapanese());
|
||||
|
||||
|
|
|
@ -134,7 +134,7 @@ int main(int, char**)
|
|||
//io.Fonts->AddFontDefault();
|
||||
//io.Fonts->AddFontFromFileTTF("../../extra_fonts/Cousine-Regular.ttf", 15.0f);
|
||||
//io.Fonts->AddFontFromFileTTF("../../extra_fonts/DroidSans.ttf", 16.0f);
|
||||
//io.Fonts->AddFontFromFileTTF("../../extra_fonts/ProggyClean.ttf", 13.0f);
|
||||
//io.Fonts->AddFontFromFileTTF("../../extra_fonts/Roboto-Medium.ttf", 16.0f);
|
||||
//io.Fonts->AddFontFromFileTTF("../../extra_fonts/ProggyTiny.ttf", 10.0f);
|
||||
//io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf", 18.0f, NULL, io.Fonts->GetGlyphRangesJapanese());
|
||||
|
||||
|
|
|
@ -83,7 +83,7 @@ int main(int, char**)
|
|||
//io.Fonts->AddFontDefault();
|
||||
//io.Fonts->AddFontFromFileTTF("../../extra_fonts/Cousine-Regular.ttf", 15.0f);
|
||||
//io.Fonts->AddFontFromFileTTF("../../extra_fonts/DroidSans.ttf", 16.0f);
|
||||
//io.Fonts->AddFontFromFileTTF("../../extra_fonts/ProggyClean.ttf", 13.0f);
|
||||
//io.Fonts->AddFontFromFileTTF("../../extra_fonts/Roboto-Medium.ttf", 16.0f);
|
||||
//io.Fonts->AddFontFromFileTTF("../../extra_fonts/ProggyTiny.ttf", 10.0f);
|
||||
//io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf", 18.0f, NULL, io.Fonts->GetGlyphRangesJapanese());
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@ int main(int, char**)
|
|||
//io.Fonts->AddFontDefault();
|
||||
//io.Fonts->AddFontFromFileTTF("../../extra_fonts/Cousine-Regular.ttf", 15.0f);
|
||||
//io.Fonts->AddFontFromFileTTF("../../extra_fonts/DroidSans.ttf", 16.0f);
|
||||
//io.Fonts->AddFontFromFileTTF("../../extra_fonts/ProggyClean.ttf", 13.0f);
|
||||
//io.Fonts->AddFontFromFileTTF("../../extra_fonts/Roboto-Medium.ttf", 16.0f);
|
||||
//io.Fonts->AddFontFromFileTTF("../../extra_fonts/ProggyTiny.ttf", 10.0f);
|
||||
//io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf", 18.0f, NULL, io.Fonts->GetGlyphRangesJapanese());
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@ int main(int, char**)
|
|||
//io.Fonts->AddFontDefault();
|
||||
//io.Fonts->AddFontFromFileTTF("../../extra_fonts/Cousine-Regular.ttf", 15.0f);
|
||||
//io.Fonts->AddFontFromFileTTF("../../extra_fonts/DroidSans.ttf", 16.0f);
|
||||
//io.Fonts->AddFontFromFileTTF("../../extra_fonts/ProggyClean.ttf", 13.0f);
|
||||
//io.Fonts->AddFontFromFileTTF("../../extra_fonts/Roboto-Medium.ttf", 16.0f);
|
||||
//io.Fonts->AddFontFromFileTTF("../../extra_fonts/ProggyTiny.ttf", 10.0f);
|
||||
//io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf", 18.0f, NULL, io.Fonts->GetGlyphRangesJapanese());
|
||||
|
||||
|
|
|
@ -38,7 +38,7 @@ int main(int, char**)
|
|||
//io.Fonts->AddFontDefault();
|
||||
//io.Fonts->AddFontFromFileTTF("../../extra_fonts/Cousine-Regular.ttf", 15.0f);
|
||||
//io.Fonts->AddFontFromFileTTF("../../extra_fonts/DroidSans.ttf", 16.0f);
|
||||
//io.Fonts->AddFontFromFileTTF("../../extra_fonts/ProggyClean.ttf", 13.0f);
|
||||
//io.Fonts->AddFontFromFileTTF("../../extra_fonts/Roboto-Medium.ttf", 16.0f);
|
||||
//io.Fonts->AddFontFromFileTTF("../../extra_fonts/ProggyTiny.ttf", 10.0f);
|
||||
//io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf", 18.0f, NULL, io.Fonts->GetGlyphRangesJapanese());
|
||||
|
||||
|
|
|
@ -36,7 +36,7 @@ int main(int, char**)
|
|||
//io.Fonts->AddFontDefault();
|
||||
//io.Fonts->AddFontFromFileTTF("../../extra_fonts/Cousine-Regular.ttf", 15.0f);
|
||||
//io.Fonts->AddFontFromFileTTF("../../extra_fonts/DroidSans.ttf", 16.0f);
|
||||
//io.Fonts->AddFontFromFileTTF("../../extra_fonts/ProggyClean.ttf", 13.0f);
|
||||
//io.Fonts->AddFontFromFileTTF("../../extra_fonts/Roboto-Medium.ttf", 16.0f);
|
||||
//io.Fonts->AddFontFromFileTTF("../../extra_fonts/ProggyTiny.ttf", 10.0f);
|
||||
//io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf", 18.0f, NULL, io.Fonts->GetGlyphRangesJapanese());
|
||||
|
||||
|
|
|
@ -39,7 +39,7 @@ int main(int, char**)
|
|||
//io.Fonts->AddFontDefault();
|
||||
//io.Fonts->AddFontFromFileTTF("../../extra_fonts/Cousine-Regular.ttf", 15.0f);
|
||||
//io.Fonts->AddFontFromFileTTF("../../extra_fonts/DroidSans.ttf", 16.0f);
|
||||
//io.Fonts->AddFontFromFileTTF("../../extra_fonts/ProggyClean.ttf", 13.0f);
|
||||
//io.Fonts->AddFontFromFileTTF("../../extra_fonts/Roboto-Medium.ttf", 16.0f);
|
||||
//io.Fonts->AddFontFromFileTTF("../../extra_fonts/ProggyTiny.ttf", 10.0f);
|
||||
//io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf", 18.0f, NULL, io.Fonts->GetGlyphRangesJapanese());
|
||||
|
||||
|
|
|
@ -631,7 +631,7 @@ int main(int, char**)
|
|||
//io.Fonts->AddFontDefault();
|
||||
//io.Fonts->AddFontFromFileTTF("../../extra_fonts/Cousine-Regular.ttf", 15.0f);
|
||||
//io.Fonts->AddFontFromFileTTF("../../extra_fonts/DroidSans.ttf", 16.0f);
|
||||
//io.Fonts->AddFontFromFileTTF("../../extra_fonts/ProggyClean.ttf", 13.0f);
|
||||
//io.Fonts->AddFontFromFileTTF("../../extra_fonts/Roboto-Medium.ttf", 16.0f);
|
||||
//io.Fonts->AddFontFromFileTTF("../../extra_fonts/ProggyTiny.ttf", 10.0f);
|
||||
//io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf", 18.0f, NULL, io.Fonts->GetGlyphRangesJapanese());
|
||||
|
||||
|
|
|
@ -53,8 +53,7 @@ int main(int argc, char** argv)
|
|||
}
|
||||
}
|
||||
|
||||
binary_to_compressed_c(argv[argn], argv[argn+1], use_base85_encoding, use_compression);
|
||||
return 1;
|
||||
return binary_to_compressed_c(argv[argn], argv[argn+1], use_base85_encoding, use_compression) ? 0 : 1;
|
||||
}
|
||||
|
||||
char Encode85Byte(unsigned int x)
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -69,18 +69,18 @@ typedef unsigned int ImU32; // 32-bit unsigned integer (typically used t
|
|||
typedef unsigned int ImGuiID; // unique ID used by widgets (typically hashed from a stack of string)
|
||||
typedef unsigned short ImWchar; // character for keyboard input/display
|
||||
typedef void* ImTextureID; // user data to identify a texture (this is whatever to you want it to be! read the FAQ about ImTextureID in imgui.cpp)
|
||||
typedef int ImGuiCol; // a color identifier for styling // enum ImGuiCol_
|
||||
typedef int ImGuiStyleVar; // a variable identifier for styling // enum ImGuiStyleVar_
|
||||
typedef int ImGuiKey; // a key identifier (ImGui-side enum) // enum ImGuiKey_
|
||||
typedef int ImGuiNavInput; // an input identifier for gamepad nav // enum ImGuiNavInput_
|
||||
typedef int ImGuiColorEditFlags; // color edit flags for Color*() // enum ImGuiColorEditFlags_
|
||||
typedef int ImGuiMouseCursor; // a mouse cursor identifier // enum ImGuiMouseCursor_
|
||||
typedef int ImGuiWindowFlags; // window flags for Begin*() // enum ImGuiWindowFlags_
|
||||
typedef int ImGuiCond; // condition flags for Set*() // enum ImGuiCond_
|
||||
typedef int ImGuiColumnsFlags; // flags for *Columns*() // enum ImGuiColumnsFlags_
|
||||
typedef int ImGuiInputTextFlags; // flags for InputText*() // enum ImGuiInputTextFlags_
|
||||
typedef int ImGuiSelectableFlags; // flags for Selectable() // enum ImGuiSelectableFlags_
|
||||
typedef int ImGuiTreeNodeFlags; // flags for TreeNode*(), Collapsing*() // enum ImGuiTreeNodeFlags_
|
||||
typedef int ImGuiCol; // enum: a color identifier for styling // enum ImGuiCol_
|
||||
typedef int ImGuiStyleVar; // enum: a variable identifier for styling // enum ImGuiStyleVar_
|
||||
typedef int ImGuiKey; // enum: a key identifier (ImGui-side enum) // enum ImGuiKey_
|
||||
typedef int ImGuiNavInput; // enum: an input identifier for navigation // enum ImGuiNavInput_
|
||||
typedef int ImGuiMouseCursor; // enum: a mouse cursor identifier // enum ImGuiMouseCursor_
|
||||
typedef int ImGuiCond; // enum: a condition for Set*() // enum ImGuiCond_
|
||||
typedef int ImGuiColorEditFlags; // flags: color edit flags for Color*() // enum ImGuiColorEditFlags_
|
||||
typedef int ImGuiWindowFlags; // flags: window flags for Begin*() // enum ImGuiWindowFlags_
|
||||
typedef int ImGuiColumnsFlags; // flags: for *Columns*() // enum ImGuiColumnsFlags_
|
||||
typedef int ImGuiInputTextFlags; // flags: for InputText*() // enum ImGuiInputTextFlags_
|
||||
typedef int ImGuiSelectableFlags; // flags: for Selectable() // enum ImGuiSelectableFlags_
|
||||
typedef int ImGuiTreeNodeFlags; // flags: for TreeNode*(), Collapsing*() // enum ImGuiTreeNodeFlags_
|
||||
typedef int (*ImGuiTextEditCallback)(ImGuiTextEditCallbackData *data);
|
||||
typedef void (*ImGuiSizeConstraintCallback)(ImGuiSizeConstraintCallbackData* data);
|
||||
#ifdef _MSC_VER
|
||||
|
@ -177,7 +177,6 @@ namespace ImGui
|
|||
IMGUI_API void SetScrollY(float scroll_y); // set scrolling amount [0..GetScrollMaxY()]
|
||||
IMGUI_API void SetScrollHere(float center_y_ratio = 0.5f); // adjust scrolling amount to make current cursor position visible. center_y_ratio=0.0: top, 0.5: center, 1.0: bottom.
|
||||
IMGUI_API void SetScrollFromPosY(float pos_y, float center_y_ratio = 0.5f); // adjust scrolling amount to make given position valid. use GetCursorPos() or GetCursorStartPos()+offset to get valid positions.
|
||||
IMGUI_API void SetKeyboardFocusHere(int offset = 0); // FIXME-NAVIGATION // focus keyboard on the next widget. Use positive 'offset' to access sub components of a multiple component widget. Use negative 'offset' to access previous widgets.
|
||||
IMGUI_API void SetStateStorage(ImGuiStorage* tree); // replace tree state storage with our own (if you want to manipulate it yourself, typically clear subsection of it)
|
||||
IMGUI_API ImGuiStorage* GetStateStorage();
|
||||
|
||||
|
@ -416,6 +415,12 @@ namespace ImGui
|
|||
// Styles
|
||||
IMGUI_API void StyleColorsClassic(ImGuiStyle* dst = NULL);
|
||||
|
||||
// Focus, Activation
|
||||
IMGUI_API void ActivateItem(ImGuiID id); // remotely activate a button, checkbox, tree node etc. given its unique ID. activation is queued and processed on the next frame when the item is encountered again.
|
||||
IMGUI_API ImGuiID GetItemID(); // get id of previous item, generally ~GetID(label)
|
||||
IMGUI_API void SetKeyboardFocusHere(int offset = 0); // FIXME-NAVIGATION // focus keyboard on the next widget. Use positive 'offset' to access sub components of a multiple component widget. Use -1 to access previous widget.
|
||||
IMGUI_API void SetItemDefaultFocus(); // FIXME-NAVIGATION // make last item the default focused item of a window
|
||||
|
||||
// Utilities
|
||||
IMGUI_API bool IsItemHovered(); // is the last item hovered by mouse (and usable)? or we are currently using Nav and the item is focused.
|
||||
IMGUI_API bool IsItemRectHovered(); // is the last item hovered by mouse? even if another item is active or window is blocked by popup while we are hovering this
|
||||
|
@ -430,7 +435,6 @@ namespace ImGui
|
|||
IMGUI_API ImVec2 GetItemRectMax(); // "
|
||||
IMGUI_API ImVec2 GetItemRectSize(); // "
|
||||
IMGUI_API void SetItemAllowOverlap(); // allow last item to be overlapped by a subsequent item. sometimes useful with invisible buttons, selectables, etc. to catch unused area.
|
||||
IMGUI_API void SetItemDefaultFocus(); // make last item the default focused item of a window
|
||||
IMGUI_API bool IsWindowFocused(); // is current window focused
|
||||
IMGUI_API bool IsWindowHovered(); // is current window hovered and hoverable (not blocked by a popup) (differentiate child windows from each others)
|
||||
IMGUI_API bool IsWindowRectHovered(); // is current window rectangle hovered, disregarding of any consideration of being blocked by a popup. (unlike IsWindowHovered() this will return true even if the window is blocked because of a popup)
|
||||
|
@ -763,14 +767,14 @@ enum ImGuiMouseCursor_
|
|||
ImGuiMouseCursor_Count_
|
||||
};
|
||||
|
||||
// Condition flags for ImGui::SetWindow***(), SetNextWindow***(), SetNextTreeNode***() functions
|
||||
// All those functions treat 0 as a shortcut to ImGuiCond_Always
|
||||
// Condition for ImGui::SetWindow***(), SetNextWindow***(), SetNextTreeNode***() functions
|
||||
// All those functions treat 0 as a shortcut to ImGuiCond_Always. From the point of view of the user use this as an enum (don't combine multiple values into flags).
|
||||
enum ImGuiCond_
|
||||
{
|
||||
ImGuiCond_Always = 1 << 0, // Set the variable
|
||||
ImGuiCond_Once = 1 << 1, // Set the variable once per runtime session (only the first call with succeed)
|
||||
ImGuiCond_FirstUseEver = 1 << 2, // Set the variable if the window has no saved data (if doesn't exist in the .ini file)
|
||||
ImGuiCond_Appearing = 1 << 3 // Set the variable if the window is appearing after being hidden/inactive (or the first time)
|
||||
ImGuiCond_Always = 1 << 0, // Set the variable
|
||||
ImGuiCond_Once = 1 << 1, // Set the variable once per runtime session (only the first call with succeed)
|
||||
ImGuiCond_FirstUseEver = 1 << 2, // Set the variable if the window has no saved data (if doesn't exist in the .ini file)
|
||||
ImGuiCond_Appearing = 1 << 3 // Set the variable if the window is appearing after being hidden/inactive (or the first time)
|
||||
|
||||
// Obsolete names (will be removed)
|
||||
#ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS
|
||||
|
@ -806,6 +810,7 @@ struct ImGuiStyle
|
|||
ImVec4 Colors[ImGuiCol_COUNT];
|
||||
|
||||
IMGUI_API ImGuiStyle();
|
||||
IMGUI_API void ScaleAllSizes(float scale_factor);
|
||||
};
|
||||
|
||||
// This is where your app communicate with ImGui. Access via ImGui::GetIO().
|
||||
|
|
|
@ -1753,14 +1753,41 @@ void ImGui::ShowTestWindow(bool* p_open)
|
|||
ImGui::InputText("3 (tab skip)", buf, IM_ARRAYSIZE(buf));
|
||||
if (ImGui::IsItemActive()) has_focus = 3;
|
||||
ImGui::PopAllowKeyboardFocus();
|
||||
|
||||
if (has_focus)
|
||||
ImGui::Text("Item with focus: %d", has_focus);
|
||||
else
|
||||
ImGui::Text("Item with focus: <none>");
|
||||
ImGui::TextWrapped("Cursor & selection are preserved when refocusing last used item in code.");
|
||||
|
||||
// Use >= 0 parameter to SetKeyboardFocusHere() to focus an upcoming item
|
||||
static float f3[3] = { 0.0f, 0.0f, 0.0f };
|
||||
int focus_ahead = -1;
|
||||
if (ImGui::Button("Focus on X")) focus_ahead = 0; ImGui::SameLine();
|
||||
if (ImGui::Button("Focus on Y")) focus_ahead = 1; ImGui::SameLine();
|
||||
if (ImGui::Button("Focus on Z")) focus_ahead = 2;
|
||||
if (focus_ahead != -1) ImGui::SetKeyboardFocusHere(focus_ahead);
|
||||
ImGui::SliderFloat3("Float3", &f3[0], 0.0f, 1.0f);
|
||||
|
||||
ImGui::TextWrapped("NB: Cursor & selection are preserved when refocusing last used item in code.");
|
||||
ImGui::TreePop();
|
||||
}
|
||||
|
||||
#if 0
|
||||
if (ImGui::TreeNode("Remote Activation"))
|
||||
{
|
||||
static char label[256];
|
||||
ImGui::InputText("Label", label, IM_ARRAYSIZE(label));
|
||||
ImGui::PopID(); // We don't yet have an easy way compute ID at other levels of the ID stack so we pop it manually for now (e.g. we'd like something like GetID("../label"))
|
||||
ImGuiID id = ImGui::GetID(label);
|
||||
ImGui::PushID("Remote Activation");
|
||||
if (ImGui::SmallButton("Activate"))
|
||||
ImGui::ActivateItem(id);
|
||||
ImGui::SameLine();
|
||||
ImGui::Text("ID = 0x%08X", id);
|
||||
ImGui::TreePop();
|
||||
}
|
||||
#endif
|
||||
|
||||
if (ImGui::TreeNode("Dragging"))
|
||||
{
|
||||
ImGui::TextWrapped("You can use ImGui::GetMouseDragDelta(0) to query for the dragged amount on any widget.");
|
||||
|
|
|
@ -51,6 +51,7 @@ typedef int ImGuiTreeNodeFlags; // enum ImGuiTreeNodeFlags_
|
|||
typedef int ImGuiSliderFlags; // enum ImGuiSliderFlags_
|
||||
typedef int ImGuiSeparatorFlags; // enum ImGuiSeparatorFlags_
|
||||
typedef int ImGuiItemFlags; // enum ImGuiItemFlags_
|
||||
typedef int ImGuiNavHighlightFlags;
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
// STB libraries
|
||||
|
@ -201,8 +202,8 @@ enum ImGuiColumnsFlags_
|
|||
enum ImGuiSelectableFlagsPrivate_
|
||||
{
|
||||
// NB: need to be in sync with last value of ImGuiSelectableFlags_
|
||||
ImGuiSelectableFlags_Menu = 1 << 3,
|
||||
ImGuiSelectableFlags_MenuItem = 1 << 4,
|
||||
ImGuiSelectableFlags_Menu = 1 << 3, // -> PressedOnClick
|
||||
ImGuiSelectableFlags_MenuItem = 1 << 4, // -> PressedOnRelease
|
||||
ImGuiSelectableFlags_Disabled = 1 << 5,
|
||||
ImGuiSelectableFlags_DrawFillAvailWidth = 1 << 6
|
||||
};
|
||||
|
@ -250,6 +251,13 @@ enum ImGuiDir
|
|||
ImGuiDir_Down = 3
|
||||
};
|
||||
|
||||
enum ImGuiNavHighlightFlags_
|
||||
{
|
||||
ImGuiNavHighlightFlags_TypeDefault = 1 << 0,
|
||||
ImGuiNavHighlightFlags_TypeThin = 1 << 1,
|
||||
ImGuiNavHighlightFlags_AlwaysRender = 1 << 2
|
||||
};
|
||||
|
||||
enum ImGuiCorner
|
||||
{
|
||||
ImGuiCorner_TopLeft = 1 << 0, // 1
|
||||
|
@ -457,8 +465,11 @@ struct ImGuiContext
|
|||
// Navigation data (for gamepad/keyboard)
|
||||
ImGuiWindow* NavWindow; // Nav/focused window for navigation
|
||||
ImGuiID NavId; // Nav/focused item for navigation
|
||||
ImGuiID NavActivateId, NavInputId; // ~~ IsKeyPressedMap(ImGuiKey_NavActive) ? NavId : 0, etc. (to make widget code terser)
|
||||
ImGuiID NavTabbedId; //
|
||||
ImGuiID NavActivateId, NavActivateDownId; // ~~ IsNavInputPressed(ImGuiNavInput_PadActivate) ? NavId : 0, etc.
|
||||
ImGuiID NavInputId; // ~~ IsNavInputPressed(ImGuiNavInput_PadInput) ? NavId : 0, etc.
|
||||
ImGuiID NavJustTabbedId; // Just tabbed to this id.
|
||||
ImGuiID NavJustNavigatedId; // Just navigated to this id (result of a successfully MoveRequest)
|
||||
ImGuiID NavNextActivateId; // Set by ActivateItem(), queued until next frame
|
||||
ImRect NavScoringRectScreen; // Rectangle used for scoring, in screen space. Based of window->DC.NavRefRectRel[], modified for directional navigation scoring.
|
||||
ImGuiWindow* NavWindowingTarget;
|
||||
float NavWindowingDisplayAlpha;
|
||||
|
@ -469,16 +480,18 @@ struct ImGuiContext
|
|||
bool NavMousePosDirty;
|
||||
bool NavDisableHighlight; // When user starts using mouse, we hide gamepad/keyboard highlight (nb: but they are still available, which is why NavDisableHighlight isn't always != NavDisableMouseHover)
|
||||
bool NavDisableMouseHover; // When user starts using gamepad/keyboard, we hide mouse hovering highlight until mouse is touched again.
|
||||
bool NavInitDefaultRequest; // Init request for appearing window to select first item
|
||||
ImGuiID NavInitDefaultResultId;
|
||||
ImRect NavInitDefaultResultRectRel;
|
||||
bool NavInitDefaultResultExplicit; // Whether the result was explicitly requested with SetItemDefaultFocus()
|
||||
bool NavAnyRequest; // ~~ NavMoveRequest || NavInitRequest
|
||||
bool NavInitRequest; // Init request for appearing window to select first item
|
||||
ImGuiID NavInitResultId;
|
||||
ImRect NavInitResultRectRel;
|
||||
bool NavInitResultExplicit; // Whether the result was explicitly requested with SetItemDefaultFocus()
|
||||
bool NavMoveFromClampedRefRect; // Set by manual scrolling, if we scroll to a point where NavId isn't visible we reset navigation from visible items
|
||||
bool NavMoveRequest; // Move request for this frame
|
||||
int NavMoveRequestForwardStep; // 0: no forward, 1: forward request, 2: forward result
|
||||
ImGuiDir NavMoveDir; // West/East/North/South
|
||||
ImGuiDir NavMoveDirLast; //
|
||||
int NavMoveRequestForwardStep; // 0: no forward, 1: forward request, 2: forward result (this is used to navigate sibling parent menus from a child menu)
|
||||
ImGuiDir NavMoveDir; // Direction of the move request (left/right/up/down)
|
||||
ImGuiDir NavMoveDirLast; // Direction of the previous move request
|
||||
ImGuiID NavMoveResultId; // Best move request candidate
|
||||
ImGuiID NavMoveResultParentId; //
|
||||
float NavMoveResultDistBox; // Best move request candidate box distance to current NavId
|
||||
float NavMoveResultDistCenter; // Best move request candidate center distance to current NavId
|
||||
float NavMoveResultDistAxial;
|
||||
|
@ -563,6 +576,7 @@ struct ImGuiContext
|
|||
ActiveIdIsAlive = false;
|
||||
ActiveIdIsJustActivated = false;
|
||||
ActiveIdAllowOverlap = false;
|
||||
ActiveIdAllowNavDirFlags = 0;
|
||||
ActiveIdClickOffset = ImVec2(-1,-1);
|
||||
ActiveIdWindow = NULL;
|
||||
ActiveIdSource = ImGuiInputSource_None;
|
||||
|
@ -571,24 +585,28 @@ struct ImGuiContext
|
|||
SettingsDirtyTimer = 0.0f;
|
||||
|
||||
NavWindow = NULL;
|
||||
NavId = NavActivateId = NavInputId = NavTabbedId = 0;
|
||||
NavId = NavActivateId = NavActivateDownId = NavInputId = 0;
|
||||
NavJustTabbedId = NavJustNavigatedId = NavNextActivateId = 0;
|
||||
NavScoringRectScreen = ImRect();
|
||||
NavWindowingTarget = NULL;
|
||||
NavWindowingDisplayAlpha = 0.0f;
|
||||
NavWindowingToggleLayer = false;
|
||||
NavLayer = 0;
|
||||
NavIdTabCounter = INT_MAX;
|
||||
NavIdIsAlive = false;
|
||||
NavMousePosDirty = false;
|
||||
NavDisableHighlight = true;
|
||||
NavDisableMouseHover = false;
|
||||
NavInitDefaultRequest = false;
|
||||
NavInitDefaultResultId = 0;
|
||||
NavInitDefaultResultExplicit = false;
|
||||
NavAnyRequest = false;
|
||||
NavInitRequest = false;
|
||||
NavInitResultId = 0;
|
||||
NavInitResultExplicit = false;
|
||||
NavMoveFromClampedRefRect = false;
|
||||
NavMoveRequest = false;
|
||||
NavMoveRequestForwardStep = 0;
|
||||
NavMoveDir = NavMoveDirLast = ImGuiDir_None;
|
||||
NavMoveResultId = 0;
|
||||
NavMoveResultParentId = 0;
|
||||
NavMoveResultDistBox = NavMoveResultDistCenter = NavMoveResultDistAxial = 0.0f;
|
||||
|
||||
SetNextWindowPosVal = ImVec2(0.0f, 0.0f);
|
||||
|
@ -667,6 +685,7 @@ struct IMGUI_API ImGuiDrawContext
|
|||
bool LastItemRectHoveredRect;
|
||||
bool NavHasScroll; // Set when scrolling can be used (ScrollMax > 0.0f)
|
||||
int NavLayerCurrent; // Current layer, 0..31 (we currently only use 0..1)
|
||||
int NavLayerCurrentMask; // = (1 << NavLayerCurrent) used by ItemAdd prior to clipping.
|
||||
int NavLayerActiveMask; // Which layer have been written to (result from previous frame)
|
||||
int NavLayerActiveMaskNext; // Which layer have been written to (buffer for current frame)
|
||||
bool MenuBarAppending; // FIXME: Remove this
|
||||
|
@ -714,6 +733,7 @@ struct IMGUI_API ImGuiDrawContext
|
|||
NavHasScroll = false;
|
||||
NavLayerActiveMask = NavLayerActiveMaskNext = 0x00;
|
||||
NavLayerCurrent = 0;
|
||||
NavLayerCurrentMask = 1 << 0;
|
||||
MenuBarAppending = false;
|
||||
MenuBarOffsetX = 0.0f;
|
||||
StateStorage = NULL;
|
||||
|
@ -852,9 +872,9 @@ namespace ImGui
|
|||
|
||||
IMGUI_API void ItemSize(const ImVec2& size, float text_offset_y = 0.0f);
|
||||
IMGUI_API void ItemSize(const ImRect& bb, float text_offset_y = 0.0f);
|
||||
IMGUI_API bool ItemAdd(const ImRect& bb, const ImGuiID* id, const ImRect* nav_bb = NULL);
|
||||
IMGUI_API bool IsClippedEx(const ImRect& bb, const ImGuiID* id, bool clip_even_when_logged);
|
||||
IMGUI_API bool ItemAdd(const ImRect& bb, ImGuiID id, const ImRect* nav_bb = NULL);
|
||||
IMGUI_API bool ItemHoverable(const ImRect& bb, ImGuiID id);
|
||||
IMGUI_API bool IsClippedEx(const ImRect& bb, ImGuiID id, bool clip_even_when_logged);
|
||||
IMGUI_API bool FocusableItemRegister(ImGuiWindow* window, ImGuiID id, bool tab_stop = true); // Return true if focus is requested
|
||||
IMGUI_API void FocusableItemUnregister(ImGuiWindow* window);
|
||||
IMGUI_API ImVec2 CalcItemSize(ImVec2 size, float default_x, float default_y);
|
||||
|
@ -892,7 +912,7 @@ namespace ImGui
|
|||
IMGUI_API void RenderCollapseTriangle(ImVec2 pos, bool is_open, float scale = 1.0f);
|
||||
IMGUI_API void RenderBullet(ImVec2 pos);
|
||||
IMGUI_API void RenderCheckMark(ImVec2 pos, ImU32 col);
|
||||
IMGUI_API void RenderNavHighlight(const ImRect& bb, ImGuiID id); // Navigation highlight
|
||||
IMGUI_API void RenderNavHighlight(const ImRect& bb, ImGuiID id, ImGuiNavHighlightFlags flags = ImGuiNavHighlightFlags_TypeDefault); // Navigation highlight
|
||||
IMGUI_API void RenderRectFilledRangeH(ImDrawList* draw_list, const ImRect& rect, ImU32 col, float x_start_norm, float x_end_norm, float rounding);
|
||||
IMGUI_API const char* FindRenderedTextEnd(const char* text, const char* text_end = NULL); // Find the optional ## from which we stop displaying text.
|
||||
|
||||
|
|
Loading…
Reference in New Issue