Skip to content

Commit

Permalink
[API] Add ability to set inputBuffer in ImGuiTextFilter
Browse files Browse the repository at this point in the history
Useful to have a custom inputText field, but to filter using ImGuiTextFilter

resolves #160
  • Loading branch information
SpaiR committed Mar 2, 2023
1 parent 618f687 commit 4a5c587
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions imgui-binding/src/main/java/imgui/ImGuiTextFilter.java
Original file line number Diff line number Diff line change
Expand Up @@ -60,4 +60,12 @@ public boolean draw(final String label) {
public native boolean isActive(); /*
return IMGUI_TEXT_FILTER->IsActive();
*/

public native String getInputBuffer(); /*
return env->NewStringUTF(IMGUI_TEXT_FILTER->InputBuf);
*/

public native void setInputBuffer(String inputBuffer); /*
strncpy(IMGUI_TEXT_FILTER->InputBuf, inputBuffer, sizeof(IMGUI_TEXT_FILTER->InputBuf));
*/
}

0 comments on commit 4a5c587

Please sign in to comment.