Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix calcTextSize to be used in a static context #143

Merged
merged 1 commit into from
Nov 16, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions imgui-binding/src/main/java/imgui/ImGui.java
Original file line number Diff line number Diff line change
Expand Up @@ -5543,19 +5543,19 @@ public static ImGuiStorage getStateStorage() {

// Text Utilities

public final ImVec2 calcTextSize(final String text) {
public static ImVec2 calcTextSize(final String text) {
final ImVec2 value = new ImVec2();
calcTextSize(value, text);
return value;
}

public final ImVec2 calcTextSize(final String text, final boolean hideTextAfterDoubleHash) {
public static ImVec2 calcTextSize(final String text, final boolean hideTextAfterDoubleHash) {
final ImVec2 value = new ImVec2();
calcTextSize(value, text, hideTextAfterDoubleHash);
return value;
}

public final ImVec2 calcTextSize(final String text, final boolean hideTextAfterDoubleHash, final float wrapWidth) {
public static ImVec2 calcTextSize(final String text, final boolean hideTextAfterDoubleHash, final float wrapWidth) {
final ImVec2 value = new ImVec2();
calcTextSize(value, text, hideTextAfterDoubleHash, wrapWidth);
return value;
Expand Down