[API] Simplify flags API

This commit is contained in:
SpaiR committed 2020-08-30 21:51:04 +03:00
1 parent 9e81399f1e
commit b065d004f7
7 files changed
+130 -11

No files matched your search

@@ -506,19 +506,40 @@ public final class ImFontAtlas extends ImGuiStructDestroyable {
*/
/**
* Build flags (see ImFontAtlasFlags_)
* Build flags (see {@link imgui.flag.ImFontAtlasFlags})
*/
public native int getFlags(); /*
return IM_FONT_ATLAS->Flags;
*/
/**
* Build flags (see ImFontAtlasFlags_)
* Build flags (see {@link imgui.flag.ImFontAtlasFlags})
*/
public native void setFlags(int imFontAtlasFlags); /*
IM_FONT_ATLAS->Flags = imFontAtlasFlags;
*/
/**
* Build flags (see {@link imgui.flag.ImFontAtlasFlags})
*/
public void addFlags(final int flags) {
setFlags(getFlags() | flags);
}
/**
* Build flags (see {@link imgui.flag.ImFontAtlasFlags})
*/
public void removeFlags(final int flags) {
setFlags(getFlags() & ~(flags));
}
/**
* Build flags (see {@link imgui.flag.ImFontAtlasFlags})
*/
public boolean hasFlags(final int flags) {
return (getFlags() & flags) != 0;
}
/**
* User data to refer to the texture once it has been uploaded to user's graphic systems.
* It is passed back to you during rendering via the ImDrawCmd structure.