RLS Studios
ProjectsPatreonCommunityDocsAbout
Join Patreon
BeamNG Modding Docs

Guides

Reference

Server CommandsGE UtilitiesGame Engine MainNavigation GraphScreenshot CaptureServerServer ConnectionSpawnpoint ManagerSimulation TimeVehicle SpawningSuspension Frequency Tester
Flowgraph Base ModuleFlowgraph Base NodeFlowgraph Base State NodeFlowgraph Node BuilderFlowgraph GraphFlowgraph Group HelperFlowgraph LinkFlowgraph ManagerNew Node TemplateFlowgraph PinFlowgraph States ManagerFlowgraph UtilsFlowgraph Variable Storage
Medal / Auto Medal (Flowgraph Node)Clear Messages (Flowgraph Node)Context Translation (Flowgraph Node)ConvertUnit (Flowgraph Node)Set UI Timer / Corner Timer (Flowgraph Node)Custom Button TEST (Flowgraph Node)Custom UI Layout (Flowgraph Node)End Screen (Flowgraph Node)End Stats (Flowgraph Node)Fade From Black (Flowgraph Node)Fade Sequence (Flowgraph Node)Fade To Black (Flowgraph Node)Flash Message (Flowgraph Node)Generic Mission Text (Flowgraph Node)Get Gamestate (Flowgraph Node)Show Editor (Flowgraph Node)Hide Game UI (Flowgraph Node)Message (Flowgraph Node)Mission End Screen (Flowgraph Node)Popup (Flowgraph Node)Monologue (Flowgraph Node)Multi Description (Flowgraph Node)On Bigmap Poi (Flowgraph Node)On Bigmap State Change (Flowgraph Node)Set UI Race Checkpoints (Flowgraph Node)Set UI Race Laps (Flowgraph Node)Set UI Race Recovery (Flowgraph Node)RT Message (Flowgraph Node)Select Buttons (Flowgraph Node)Set UI Layout (Flowgraph Node)Show Apps (Flowgraph Node)Show Monitor (Flowgraph Node)Start Screen (Flowgraph Node)Clear Goals (Flowgraph Node)Tasklist Message (Flowgraph Node)Tasklist Task (Flowgraph Node)Three Element Select (Flowgraph Node)Vehicle Selector (Flowgraph Node)
ImGui DialogueImGui Simple Text BoxImGui Vehicle Selector

UI

Resources

BeamNG Game Engine Lua Cheat SheetGE Developer RecipesMCP Server Setup

// RLS.STUDIOS=true

Premium Mods for BeamNG.drive. Career systems, custom vehicles, and immersive gameplay experiences.

Index

HomeProjectsPatreon

Socials

DiscordPatreon (RLS)Patreon (Vehicles)

© 2026 RLS Studios. All rights reserved.

Modding since 2024

API ReferenceGE Extensionsflowgraphnodesuiimgui

ImGui Dialogue

- **Node Name:** `im Dialogue`

Overview

  • Node Name: im Dialogue
  • Category: repeat_instant
  • File: extensions/flowgraph/nodes/ui/imgui/imDialogue.lua

Opens an ImGui window with a title, description text, and customizable buttons. Each button triggers a separate output flow. Only one instance should be active at a time (singleActive behaviour).

Pin Schema

Input Pins

PinTypeDescription
titlestringWindow title
descriptionstringDescription text displayed in the window

Dynamic Pins (per button)

For each button option (default: "accept", "decline"):

  • Input: string - custom label for the button (if nil, uses the option name)
  • Output: flow - fires when that button is clicked

Internals

Data Properties

PropertyDefaultDescription
data.wrapSize500Text wrap width in pixels

Key Methods

MethodDescription
workOnce()Sets self.open = true to show the dialogue
work()Draws the ImGui window with text and buttons when open
drawCustomProperties()Editor UI for adding/removing/renaming buttons
updateButtons()Rebuilds dynamic in/out pins and re-links connections
_executionStopped()Closes the dialogue
onNodeReset()Closes the dialogue
_onSerialize(res)Saves button options
_onDeserialized(data)Restores button options and rebuilds pins

Button Management

Buttons are managed as a list of string names in self.options. The editor allows:

  • Renaming buttons via text input
  • Adding buttons with the "add" button
  • Removing the last button with "rem"
  • Clearing a button by setting its name to empty

How It Works

  1. workOnce() opens the dialogue by setting self.open = true.
  2. Each frame while open, work() draws an ImGui window with:
    • Title bar using the title input
    • Wrapped description text (wrap width from data.wrapSize)
    • One button per option, labeled from the corresponding string input pin
  3. When a button is clicked, the dialogue closes and the matching output flow pin fires.
  4. The closed() method is called on button press (inherited behaviour).

Usage Example

-- Default setup with accept/decline:
-- [im Dialogue (title="Confirm?", description="Are you sure?")]
--   → (accept) → [Do Action]
--   → (decline) → [Cancel]

-- Under the hood:
im.Begin("Confirm?##42", im.BoolPtr(true))
im.PushTextWrapPos(im.GetCursorPosX() + 500)
im.TextWrapped("Are you sure?")
im.PopTextWrapPos()
if im.Button("Yes##42-1") then
  -- close and fire accept
end
if im.Button("No##42-2") then
  -- close and fire decline
end
im.End()

Key Dependencies

  • ui_imgui - ImGui bindings
  • ffi - for reading ImGui text input buffers

See Also

  • im Simple Text Box (Flowgraph Node) - Related reference
  • im Vehicle Selector (Flowgraph Node) - Related reference
  • FlowGraph Guide - Guide

Simple Multiple Buttons (Flowgraph Node)

- **Node Name:** `Simple Multiple Buttons`

ImGui Simple Text Box

- **Node Name:** `im Simple Text Box`

On this page

OverviewPin SchemaInput PinsDynamic Pins (per button)InternalsData PropertiesKey MethodsButton ManagementHow It WorksUsage ExampleKey DependenciesSee Also