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
ImGui BeginImGui ButtonImGui CheckboxImGui ColorImGui EndImGui NumberImGui SeparatorImGui Text

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 Extensionsflowgraphnodesuiimguielemental

ImGui Button

- **Node Name:** `im Button`

Overview

  • Node Name: im Button
  • Category: repeat_instant
  • File: extensions/flowgraph/nodes/ui/imgui/elemental/imButton.lua

Displays a button in an ImGui window. Provides separate output flows for click, hold, and release events.

Pin Schema

Input Pins

PinTypeDescription
textanyText displayed on the button

Output Pins

PinTypeDescription
downflow (impulse)Fires when button is clicked
holdflowWhen button is held down (hidden)
upflowWhen button is released (hidden)

Internals

Key Methods

MethodDescription
work()Draws button at full content width, checks mouse interaction states
_executionStarted()Resets all output pins to false

Mouse State Logic

The node checks three mutually exclusive mouse states when the button is hovered:

StateCondition
downim.IsMouseClicked(0) - first frame of press
holdim.IsMouseDown(0) - sustained press
upim.IsMouseReleased(0) - release frame

Only one state is true at a time. When not hovered, all outputs are false.

How It Works

  1. Draws an ImGui button at full available width using im.GetContentRegionAvail().
  2. Checks if the button is hovered via im.IsItemHovered().
  3. When hovered, determines which mouse state applies and sets the corresponding output.
  4. The down output is an impulse (true for one frame on click).

Usage Example

-- Flowgraph chain:
-- [im Begin] → [im Button (text="Start")] → (down) → [Start Race]
--                                          → (hold) → [Show Countdown]

-- Under the hood:
local avail = im.GetContentRegionAvail()
im.Button("Start##42", im.ImVec2(avail.x, 0))

Key Dependencies

  • ui_imgui - ImGui bindings (Button, IsItemHovered, IsMouseClicked, etc.)

See Also

  • im Begin (Flowgraph Node) - Related reference
  • im Checkbox (Flowgraph Node) - Related reference
  • im Color (Flowgraph Node) - Related reference
  • FlowGraph Guide - Guide

ImGui Begin

- **Node Name:** `im Begin`

ImGui Checkbox

- **Node Name:** `im Checkbox`

On this page

OverviewPin SchemaInput PinsOutput PinsInternalsKey MethodsMouse State LogicHow It WorksUsage ExampleKey DependenciesSee Also