Skip to main content

Scaleform Messages & Warnings

ScaleformUI allows you to call native Grand Theft Auto V full-screen and mid-screen messages (like "MISSION PASSED", "WASTED", or Error Warnings) seamlessly.

These are accessible via ScaleformUI.Main in C#, and ScaleformUI.Scaleforms in Lua.

Big Messages (Shards)

Big Messages appear centrally on the screen with distinct backgrounds and animations. By default, the library handles the duration for you. If you set manualDispose to true, the message will stay on screen until you call .Dispose().

using ScaleformUI;

// Mission Passed
ScaleformUI.Main.BigMessageInstance.ShowMissionPassedMessage("Mission Passed");

// Coloured Shard
ScaleformUI.Main.BigMessageInstance.ShowColoredShard("TITLE", "SUBTITLE", HudColor.HUD_COLOUR_WHITE, HudColor.HUD_COLOUR_FREEMODE);

// Simple Shard
ScaleformUI.Main.BigMessageInstance.ShowSimpleShard("Simple Shard", "Showing the simple shard");

// Wasted Message
ScaleformUI.Main.BigMessageInstance.ShowMpWastedMessage("WASTED", "You died.");

// Rank Up Message
ScaleformUI.Main.BigMessageInstance.ShowRankupMessage("Rank Up", "You unlocked new items", 10);

// Dispose manually (if you passed manualDispose: true)
ScaleformUI.Main.BigMessageInstance.Dispose();

Transitions

You can specify the out-transition type before showing or disposing a message. Available transitions are: "TRANSITION_OUT", "TRANSITION_UP", "TRANSITION_DOWN".

ScaleformUI.Main.BigMessageInstance.Transition = "TRANSITION_UP";

Mid-Size Messages

Mid-size messages operate exactly like Big Messages, but take up less screen space and use different Scaleform backgrounds.

ScaleformUI.Main.MedMessageInstance.ShowColoredShard("TITLE", "SUBTITLE", HudColor.HUD_COLOUR_FREEMODE);

Warning Screens

Warning screens simulate the error or alert screens commonly seen when transitioning to GTA Online. They halt the user's attention and can either timeout automatically or wait for button input.

Simple Warning

// Show a warning
ScaleformUI.Main.Warning.ShowWarning(
"ALERT",
"Connection lost",
"Please wait while we reconnect...",
"Error Code: 0x12345"
);

// You can update the warning while it's active
ScaleformUI.Main.Warning.UpdateWarning("ALERT", "Connection lost", "Reconnecting in 5...", "Error Code: 0x12345");

// Dispose when done
ScaleformUI.Main.Warning.Dispose();

Warning with Interactive Buttons

You can show a warning screen that waits for the user to press a specific key/pad button.

List<InstructionalButton> buttons = new List<InstructionalButton>()
{
new InstructionalButton(Control.FrontendDown, "Accept only with Keyboard", PadCheck.Keyboard),
new InstructionalButton(Control.FrontendY, "Cancel only with GamePad", PadCheck.Controller),
new InstructionalButton(Control.FrontendX, Control.Detonate, "Changes button depending on input type")
};

ScaleformUI.Main.Warning.ShowWarningWithButtons(
"ALERT",
"Do you want to proceed?",
"Press a button",
buttons,
"System Warning"
);

// Listen to the button press
ScaleformUI.Main.Warning.OnButtonPressed += (button) =>
{
Debug.WriteLine($"You pressed a Button => {button.Text}");
ScaleformUI.Main.Warning.Dispose();
};

Instructional Buttons (Outside Menus)

ScaleformUI allows you to draw instructional buttons (the controls usually found in the bottom right corner) globally, even when a menu is not open!

// Add a button globally
ScaleformUI.Main.InstructionalButtons.AddInstructionalButton(new InstructionalButton(Control.Talk, "Voice Chat"));

// You can also add a saving/loading spinner
ScaleformUI.Main.InstructionalButtons.AddSavingText(LoadingSpinnerType.Clockwise1, "Saving data...", 3000);