simvx.editor.dialog_message

The message strip the project dialogs report success and failure in.

A dialog’s message is whatever the engine had to say: a validation error naming the setting and its suggestion, an exporter refusing a bundle and explaining what to do about it. Those run to several hundred characters, and a plain

class:

Label draws one long line straight out of its box and off the screen, so the actionable end of the sentence is exactly the part that never arrives. Wrapping to the strip’s own width and eliding the middle keeps both the opening words and the instruction at the end on screen.

Module Contents

Functions

message_lines

Wrap text into lines that each measure at most width pixels.

set_message

Show text in label, wrapped to the strip and clipped to its height.

Data

API

simvx.editor.dialog_message.__all__

[‘ERROR_COLOUR’, ‘OK_COLOUR’, ‘WARNING_COLOUR’, ‘message_lines’, ‘set_message’]

simvx.editor.dialog_message.OK_COLOUR

(0.45, 0.85, 0.45, 1.0)

simvx.editor.dialog_message.ERROR_COLOUR

(0.9, 0.4, 0.4, 1.0)

simvx.editor.dialog_message.WARNING_COLOUR

(0.95, 0.75, 0.3, 1.0)

simvx.editor.dialog_message.message_lines(text: str, width: float, font_size: float) list[str][source]

Wrap text into lines that each measure at most width pixels.

simvx.editor.dialog_message.set_message(label: simvx.core.Label, text: str, colour: tuple[float, float, float, float]) None[source]

Show text in label, wrapped to the strip and clipped to its height.