Skip to content

Commit fc74bef

Browse files
committed
Add docs about new functional
1 parent fbf1c0d commit fc74bef

File tree

3 files changed

+14
-10
lines changed

3 files changed

+14
-10
lines changed

README.md

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,22 @@ A handcrafted 1-1 Java binding for [Dear-ImGui](https://github.com/ocornut/imgui
33

44
*Some of the very specific features are still in a wip state.*
55

6-
### How to use
6+
## How to use
77
TBA
88

9-
##### Specifics of usage
10-
* 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.
9+
##### Binding notice:
10+
* 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)
11+
to get more info about how to do things.
1112
* In places where in C++ you need to pass `ImVec2` or `ImVec4`, you'll need to pass two or four float parameters respectively.
1213
* When you need to get an output from the Dear-ImGui use wrappers for primitives: `ImBool`, `ImInt` etc.
14+
* Due to the Java and JNI restrictions we can't provide a fully fledged callbacks to the ImGui::InputText*() methods.
15+
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.
1316

14-
### How to build
17+
## How to build
1518
TBA
1619

17-
### Credits
20+
## Credits
1821
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).
1922

20-
### License
23+
## License
2124
See the LICENSE file for license rights and limitations (Apache-2.0).

imgui-binding/src/main/java/imgui/ImGuiInputTextData.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,15 @@
55
*/
66
public final class ImGuiInputTextData {
77
/**
8-
* If not empty, then other chars which are different from provided will be filtered during the {@link ImGui#InputText(String, ImString)}
8+
* If not empty, then other chars which are different from provided will be filtered during the {@link ImGui#InputText}
99
* and {@link ImGui#InputTextMultiline} methods.
1010
*/
1111
public String allowedChars = "";
1212

1313
/**
14-
* If true, then string will be resized during the the {@link ImGui#InputText(String, ImString)} and {@link ImGui#InputTextMultiline} methods.
14+
* If true, then string will be resized during the the {@link ImGui#InputText} and {@link ImGui#InputTextMultiline} methods.
1515
* Alternatively you can provide {@link imgui.enums.ImGuiInputTextFlags#CallbackResize} flag to the input text widgets to enable string resizing.
16+
* Resize factor of the string could be modified by changing {@link ImString#resizeFactor} field.
1617
*/
1718
public boolean isResizable;
1819

imgui-binding/src/main/java/imgui/ImString.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import java.util.Objects;
44

55
/**
6-
* Wrapper for {@link String} to use inside of ImGui input widgets.
6+
* Wrapper for {@link String} to use inside of th Dear ImGui input widgets.
77
*/
88
public final class ImString {
99
private static final short DEFAULT_LENGTH = 100;
@@ -66,7 +66,7 @@ public int getLength() {
6666
}
6767

6868
/**
69-
* 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.
69+
* 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.
7070
* @return size of the data buffer
7171
*/
7272
public int getBufferSize() {

0 commit comments

Comments
 (0)