Add docs about new functional
This commit is contained in:
1 parent
fbf1c0d1c2
commit
fc74bef009
3 files changed
+14
-10
No files matched your search
@@ -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).
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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() {
|
||||
|
||||
Reference in new issue
Block a user