Skip to content

Commit 61be49c

Browse files
committed
Add helper overload
1 parent b843a5f commit 61be49c

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/main/kotlin/imgui/imgui/parameters stacks.kt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,12 @@ interface imgui_parametersStacks {
219219
return (col and COL32_A_MASK.inv()) or (a shl COL32_A_SHIFT)
220220
}
221221

222+
fun getColorU32(r: Int, g: Int, b: Int, a: Int): Int {
223+
val c = Vec4(r.f / 255.0, g.f / 255.0, b.f/255.0, a.f / 255.0)
224+
c.w *= style.alpha
225+
return c.u32
226+
}
227+
222228
// Parameters stacks (current window)
223229

224230
/** width of items for the common item+label case, pixels. 0.0f = default to ~2/3 of windows width, >0.0f: width in

0 commit comments

Comments
 (0)