diff --git a/README.md b/README.md index c1e3596..221d492 100644 --- a/README.md +++ b/README.md @@ -3,19 +3,22 @@ A handcrafted 1-1 Java binding for [Dear-ImGui](https://github.com/ocornut/imgui *Some of the very specific features are still in a wip state.* -### How to use +## How to use TBA -##### Specifics of usage -* Since it's a 1-1 binding please consider to see official [documentation](https://github.com/ocornut/imgui#usage) and [wiki](https://github.com/ocornut/imgui/wiki) to get more info about how to do things. +##### Binding notice: +* Since it's a 1-1 binding please consider to see official [documentation](https://github.com/ocornut/imgui#usage) and [wiki](https://github.com/ocornut/imgui/wiki) + to get more info about how to do things. * In places where in C++ you need to pass `ImVec2` or `ImVec4`, you'll need to pass two or four float parameters respectively. * When you need to get an output from the Dear-ImGui use wrappers for primitives: `ImBool`, `ImInt` etc. +* Due to the Java and JNI restrictions we can't provide a fully fledged callbacks to the ImGui::InputText*() methods. + Partly you could replace some of the features (like providing of the allowed chars to input) by using the ImGuiInputTextData class. Read javadoc to get more info. -### How to build +## How to build TBA -### Credits +## Credits This binding is based on the work of [xpenatan](https://github.com/xpenatan) and his version of the binding [jDear-imgui](https://github.com/xpenatan/jDear-imgui). -### License +## License See the LICENSE file for license rights and limitations (Apache-2.0). diff --git a/imgui-binding/src/main/java/imgui/ImGuiInputTextData.java b/imgui-binding/src/main/java/imgui/ImGuiInputTextData.java index 86bbf61..98fb6b1 100644 --- a/imgui-binding/src/main/java/imgui/ImGuiInputTextData.java +++ b/imgui-binding/src/main/java/imgui/ImGuiInputTextData.java @@ -5,14 +5,15 @@ package imgui; */ public final class ImGuiInputTextData { /** - * If not empty, then other chars which are different from provided will be filtered during the {@link ImGui#InputText(String, ImString)} + * If not empty, then other chars which are different from provided will be filtered during the {@link ImGui#InputText} * and {@link ImGui#InputTextMultiline} methods. */ public String allowedChars = ""; /** - * If true, then string will be resized during the the {@link ImGui#InputText(String, ImString)} and {@link ImGui#InputTextMultiline} methods. + * If true, then string will be resized during the the {@link ImGui#InputText} and {@link ImGui#InputTextMultiline} methods. * Alternatively you can provide {@link imgui.enums.ImGuiInputTextFlags#CallbackResize} flag to the input text widgets to enable string resizing. + * Resize factor of the string could be modified by changing {@link ImString#resizeFactor} field. */ public boolean isResizable; diff --git a/imgui-binding/src/main/java/imgui/ImString.java b/imgui-binding/src/main/java/imgui/ImString.java index 86490ae..3228811 100644 --- a/imgui-binding/src/main/java/imgui/ImString.java +++ b/imgui-binding/src/main/java/imgui/ImString.java @@ -3,7 +3,7 @@ package imgui; import java.util.Objects; /** - * Wrapper for {@link String} to use inside of ImGui input widgets. + * Wrapper for {@link String} to use inside of th Dear ImGui input widgets. */ public final class ImString { private static final short DEFAULT_LENGTH = 100; @@ -66,7 +66,7 @@ public final class ImString { } /** - * Get the size of the data buffer. Buffer size will always have '+1' to its size, since it's used by the Dear ImGui to draw a caret. + * Get the size of the data buffer. Buffer size will always have '+1' to its size, since it's used by the Dear ImGui to draw a caret char. * @return size of the data buffer */ public int getBufferSize() {