diff --git a/imgui-binding/src/main/java/imgui/enums/ImGuiCond.java b/imgui-binding/src/main/java/imgui/enums/ImGuiCond.java index b6fdb51..0202a98 100644 --- a/imgui-binding/src/main/java/imgui/enums/ImGuiCond.java +++ b/imgui-binding/src/main/java/imgui/enums/ImGuiCond.java @@ -9,7 +9,7 @@ public final class ImGuiCond { private ImGuiCond() { } - public static final int Always = 1 << 0; // Set the variable + public static final int Always = 1; // Set the variable public static final int Once = 1 << 1; // Set the variable once per runtime session (only the first call with succeed) public static final int FirstUseEver = 1 << 2; // Set the variable if the object/window has no persistently saved data (no entry in .ini file) public static final int Appearing = 1 << 3; // Set the variable if the object/window is appearing after being hidden/inactive (or the first time) diff --git a/imgui-binding/src/main/java/imgui/enums/ImGuiInputTextFlags.java b/imgui-binding/src/main/java/imgui/enums/ImGuiInputTextFlags.java index 9031d6e..1847ea6 100644 --- a/imgui-binding/src/main/java/imgui/enums/ImGuiInputTextFlags.java +++ b/imgui-binding/src/main/java/imgui/enums/ImGuiInputTextFlags.java @@ -8,23 +8,23 @@ public final class ImGuiInputTextFlags { } public static final int None = 0; - public static final int CharsDecimal = 1; // Allow 0123456789.+-*/ - public static final int CharsHexadecimal = 1 << 1; // Allow 0123456789ABCDEFabcdef - public static final int CharsUppercase = 1 << 2; // Turn a..z into A..Z - public static final int CharsNoBlank = 1 << 3; // Filter out spaces, tabs - public static final int AutoSelectAll = 1 << 4; // Select entire text when first taking mouse focus - public static final int EnterReturnsTrue = 1 << 5; // Return 'true' when Enter is pressed (as opposed to every time the value was modified). Consider looking at the IsItemDeactivatedAfterEdit() function. - public static final int CallbackCompletion = 1 << 6; // Callback on pressing TAB (for completion handling) - public static final int CallbackHistory = 1 << 7; // Callback on pressing Up/Down arrows (for history handling) - public static final int CallbackAlways = 1 << 8; // Callback on each iteration. User code may query cursor position, modify text buffer. - public static final int CallbackCharFilter = 1 << 9; // Callback on character inputs to replace or discard them. Modify 'EventChar' to replace or discard, or return 1 in callback to discard. - public static final int AllowTabInput = 1 << 1; // Pressing TAB input a '\t' character into the text field - public static final int CtrlEnterForNewLine = 1 << 1; // In multi-line mode, unfocus with Enter, add new line with Ctrl+Enter (default is opposite: unfocus with Ctrl+Enter, add line with Enter). - public static final int NoHorizontalScroll = 1 << 1; // Disable following the cursor horizontally - public static final int AlwaysInsertMode = 1 << 1; // Insert mode - public static final int ReadOnly = 1 << 1; // Read-only mode - public static final int Password = 1 << 1; // Password mode, display all characters as '*' - public static final int NoUndoRedo = 1 << 1; // Disable undo/redo. Note that input text owns the text data while active, if you want to provide your own undo/redo stack you need e.g. to call ClearActiveID(). - public static final int CharsScientific = 1 << 1; // Allow 0123456789.+-*/eE (Scientific notation input) - public static final int CallbackResize = 1 << 1; // Callback on buffer capacity changes request (beyond 'buf_size' parameter value), allowing the string to grow. Notify when the string wants to be resized (for string types which hold a cache of their Size). You will be provided a new BufSize in the callback and NEED to honor it. (see misc/cpp/imgui_stdlib.h for an example of using this) + public static final int CharsDecimal = 1; // Allow 0123456789.+-*/ + public static final int CharsHexadecimal = 1 << 1; // Allow 0123456789ABCDEFabcdef + public static final int CharsUppercase = 1 << 2; // Turn a..z into A..Z + public static final int CharsNoBlank = 1 << 3; // Filter out spaces, tabs + public static final int AutoSelectAll = 1 << 4; // Select entire text when first taking mouse focus + public static final int EnterReturnsTrue = 1 << 5; // Return 'true' when Enter is pressed (as opposed to every time the value was modified). Consider looking at the IsItemDeactivatedAfterEdit() function. + public static final int CallbackCompletion = 1 << 6; // Callback on pressing TAB (for completion handling) + public static final int CallbackHistory = 1 << 7; // Callback on pressing Up/Down arrows (for history handling) + public static final int CallbackAlways = 1 << 8; // Callback on each iteration. User code may query cursor position, modify text buffer. + public static final int CallbackCharFilter = 1 << 9; // Callback on character inputs to replace or discard them. Modify 'EventChar' to replace or discard, or return 1 in callback to discard. + public static final int AllowTabInput = 1 << 10; // Pressing TAB input a '\t' character into the text field + public static final int CtrlEnterForNewLine = 1 << 11; // In multi-line mode, unfocus with Enter, add new line with Ctrl+Enter (default is opposite: unfocus with Ctrl+Enter, add line with Enter). + public static final int NoHorizontalScroll = 1 << 12; // Disable following the cursor horizontally + public static final int AlwaysInsertMode = 1 << 13; // Insert mode + public static final int ReadOnly = 1 << 14; // Read-only mode + public static final int Password = 1 << 15; // Password mode, display all characters as '*' + public static final int NoUndoRedo = 1 << 16; // Disable undo/redo. Note that input text owns the text data while active, if you want to provide your own undo/redo stack you need e.g. to call ClearActiveID(). + public static final int CharsScientific = 1 << 17; // Allow 0123456789.+-*/eE (Scientific notation input) + public static final int CallbackResize = 1 << 18; // Callback on buffer capacity changes request (beyond 'buf_size' parameter value), allowing the string to grow. Notify when the string wants to be resized (for string types which hold a cache of their Size). You will be provided a new BufSize in the callback and NEED to honor it. (see misc/cpp/imgui_stdlib.h for an example of using this) } diff --git a/imgui-binding/src/main/java/imgui/enums/ImGuiWindowFlags.java b/imgui-binding/src/main/java/imgui/enums/ImGuiWindowFlags.java index 4e4b27c..43a3e9a 100644 --- a/imgui-binding/src/main/java/imgui/enums/ImGuiWindowFlags.java +++ b/imgui-binding/src/main/java/imgui/enums/ImGuiWindowFlags.java @@ -8,26 +8,26 @@ public final class ImGuiWindowFlags { } public static final int None = 0; - public static final int NoTitleBar = 1; // Disable title-bar - public static final int NoResize = 1 << 1; // Disable user resizing with the lower-right grip - public static final int NoMove = 1 << 2; // Disable user moving the window - public static final int NoScrollbar = 1 << 3; // Disable scrollbars (window can still scroll with mouse or programmatically) - public static final int NoScrollWithMouse = 1 << 4; // Disable user vertically scrolling with mouse wheel. On child window, mouse wheel will be forwarded to the parent unless NoScrollbar is also set. - public static final int NoCollapse = 1 << 5; // Disable user collapsing window by double-clicking on it - public static final int AlwaysAutoResize = 1 << 6; // Resize every window to its content every frame - public static final int NoBackground = 1 << 7; // Disable drawing background color (WindowBg, etc.) and outside border. Similar as using SetNextWindowBgAlpha(0.0f). - public static final int NoSavedSettings = 1 << 8; // Never load/save settings in .ini file - public static final int NoMouseInputs = 1 << 9; // Disable catching mouse, hovering test with pass through. - public static final int MenuBar = 1 << 1; // Has a menu-bar - public static final int HorizontalScrollbar = 1 << 1; // Allow horizontal scrollbar to appear (off by default). You may use SetNextWindowContentSize(ImVec2(width,0.0f)); prior to calling Begin() to specify width. Read code in imgui_demo in the "Horizontal Scrolling" section. - public static final int NoFocusOnAppearing = 1 << 1; // Disable taking focus when transitioning from hidden to visible state - public static final int NoBringToFrontOnFocus = 1 << 1; // Disable bringing window to front when taking focus (e.g. clicking on it or programmatically giving it focus) - public static final int AlwaysVerticalScrollbar = 1 << 1; // Always show vertical scrollbar (even if ContentSize.y < Size.y) - public static final int AlwaysHorizontalScrollbar = 1 << 1; // Always show horizontal scrollbar (even if ContentSize.x < Size.x) - public static final int AlwaysUseWindowPadding = 1 << 1; // Ensure child windows without border uses style.WindowPadding (ignored by default for non-bordered child windows, because more convenient) - public static final int NoNavInputs = 1 << 1; // No gamepad/keyboard navigation within the window - public static final int NoNavFocus = 1 << 1; // No focusing toward this window with gamepad/keyboard navigation (e.g. skipped by CTRL+TAB) - public static final int UnsavedDocument = 1 << 2; // Append '*' to title without affecting the ID, as a convenience to avoid using the ### operator. When used in a tab/docking context, tab is selected on closure and closure is deferred by one frame to allow code to cancel the closure (with a confirmation popup, etc.) without flicker. + public static final int NoTitleBar = 1; // Disable title-bar + public static final int NoResize = 1 << 1; // Disable user resizing with the lower-right grip + public static final int NoMove = 1 << 2; // Disable user moving the window + public static final int NoScrollbar = 1 << 3; // Disable scrollbars (window can still scroll with mouse or programmatically) + public static final int NoScrollWithMouse = 1 << 4; // Disable user vertically scrolling with mouse wheel. On child window, mouse wheel will be forwarded to the parent unless NoScrollbar is also set. + public static final int NoCollapse = 1 << 5; // Disable user collapsing window by double-clicking on it + public static final int AlwaysAutoResize = 1 << 6; // Resize every window to its content every frame + public static final int NoBackground = 1 << 7; // Disable drawing background color (WindowBg, etc.) and outside border. Similar as using SetNextWindowBgAlpha(0.0f). + public static final int NoSavedSettings = 1 << 8; // Never load/save settings in .ini file + public static final int NoMouseInputs = 1 << 9; // Disable catching mouse, hovering test with pass through. + public static final int MenuBar = 1 << 10; // Has a menu-bar + public static final int HorizontalScrollbar = 1 << 11; // Allow horizontal scrollbar to appear (off by default). You may use SetNextWindowContentSize(ImVec2(width,0.0f)); prior to calling Begin() to specify width. Read code in imgui_demo in the "Horizontal Scrolling" section. + public static final int NoFocusOnAppearing = 1 << 12; // Disable taking focus when transitioning from hidden to visible state + public static final int NoBringToFrontOnFocus = 1 << 13; // Disable bringing window to front when taking focus (e.g. clicking on it or programmatically giving it focus) + public static final int AlwaysVerticalScrollbar = 1 << 14; // Always show vertical scrollbar (even if ContentSize.y < Size.y) + public static final int AlwaysHorizontalScrollbar = 1 << 15; // Always show horizontal scrollbar (even if ContentSize.x < Size.x) + public static final int AlwaysUseWindowPadding = 1 << 16; // Ensure child windows without border uses style.WindowPadding (ignored by default for non-bordered child windows, because more convenient) + public static final int NoNavInputs = 1 << 17; // No gamepad/keyboard navigation within the window + public static final int NoNavFocus = 1 << 18; // No focusing toward this window with gamepad/keyboard navigation (e.g. skipped by CTRL+TAB) + public static final int UnsavedDocument = 1 << 20; // Append '*' to title without affecting the ID, as a convenience to avoid using the ### operator. When used in a tab/docking context, tab is selected on closure and closure is deferred by one frame to allow code to cancel the closure (with a confirmation popup, etc.) without flicker. public static final int NoNav = NoNavInputs | NoNavFocus; public static final int NoDecoration = NoTitleBar | NoResize | NoScrollbar | NoCollapse; public static final int NoInputs = NoMouseInputs | NoNavInputs | NoNavFocus; diff --git a/imgui-lwjgl3/src/test/java/ImGuiGlfwExample.java b/imgui-lwjgl3/src/test/java/ImGuiGlfwExample.java index c950890..461ea68 100644 --- a/imgui-lwjgl3/src/test/java/ImGuiGlfwExample.java +++ b/imgui-lwjgl3/src/test/java/ImGuiGlfwExample.java @@ -47,7 +47,7 @@ public final class ImGuiGlfwExample { private final ImGuiImplGl3 imGuiGl3 = new ImGuiImplGl3(); // Local app variables go here - private final ImString imguiDemoLink = new ImString("https://raw.githubusercontent.com/ocornut/imgui/v1.74/imgui_demo.cpp"); + private final ImString imguiDemoLink = new ImString("https://raw.githubusercontent.com/ocornut/imgui/v1.74/imgui_demo.cpp", 100); private float[] backgroundColor = new float[]{0.5f, 0, 0}; private int clickCount = 0; private final byte[] testPayload = "Test Payload".getBytes();