@@ -295,6 +295,23 @@ object ImGuiBuilder {
295295 fun onItemClick (button : Int = ImGuiMouseButton .Right , block : ProcedureBlock ) =
296296 if (isItemClicked(button)) block() else Unit
297297
298+ /* *
299+ * Returns whether [button] went down this frame, regardless of what is hovered.
300+ *
301+ * Unlike [onItemClick] this does not imply the last item is hovered, so it can be combined with
302+ * [onItemHover] to observe clicks on items that are blocked by an open popup.
303+ */
304+ @ImGuiDsl
305+ fun isMouseClicked (button : Int = ImGuiMouseButton .Right , repeat : Boolean = false): Boolean =
306+ ImGui .isMouseClicked(button, repeat)
307+
308+ /* *
309+ * Returns whether [button] was released this frame, regardless of what is hovered.
310+ */
311+ @ImGuiDsl
312+ fun isMouseReleased (button : Int = ImGuiMouseButton .Right ): Boolean =
313+ ImGui .isMouseReleased(button)
314+
298315 /* *
299316 * Returns whether:
300317 * - The last item modified its value in this frame
@@ -1586,6 +1603,15 @@ object ImGuiBuilder {
15861603 fun openPopup (strId : String , flags : Int = ImGuiPopupFlags .None ) =
15871604 ImGui .openPopup(strId, flags)
15881605
1606+ /* *
1607+ * Returns whether the popup identified by [strId] is currently open.
1608+ *
1609+ * The id is resolved against the current window, matching [openPopup] and the `popupContext*` helpers.
1610+ */
1611+ @ImGuiDsl
1612+ fun isPopupOpen (strId : String , flags : Int = ImGuiPopupFlags .None ): Boolean =
1613+ ImGui .isPopupOpen(strId, flags)
1614+
15891615 /* *
15901616 * Creates a popup. You must first call [openPopup] with the same [strId]
15911617 *
0 commit comments