List Box
The List Box object provides a scrollable list of text-based items directly inside your Custom Launcher. It is the perfect interface element for presenting choices to the user, whether they are selecting a game server, picking a save profile, choosing an installed modification, or viewing a changelog.
Because the List Box can dynamically load and save data from local text files, it is incredibly versatile. When paired with events, a simple list of options becomes an interactive hub for your Custom Game Launcher logic.
The List Box object requires the Developer Edition. It is designed to handle dynamic arrays of data and pairs perfectly with text files and variable-driven logic.
List Box Overview
A List Box acts as a container for multiple selectable rows. Users can click to select an item, or double-click to instantly trigger a confirmation event. The visual styling of the list is fully customizable, from the background and border to the font weight and hover colors of individual items.
Typical Uses
- ❖ Presenting a directory of community servers
- ❖ Displaying a list of installed game mods
- ❖ Creating a player profile selection screen
- ❖ Showing recent patch notes or news headlines
- ❖ Building an in-launcher inventory selector
Default Settings
When dropped onto your page, the List Box applies a clean, dark-themed styling configuration by default.
| Property | Default Value |
|---|---|
| Dimensions | Width: 200, Height: 150 |
| Background Color | #222222 |
| Text Color | #E0E0E0 |
| Item Hover Color | #333333 |
| Border Styling | Color: #555555, Width: 1px, Radius: 6px |
| Typography | Font: Poppins, Size: 14 |
Properties
The visual editor allows you to shape the data and the appearance of the List Box.
Content
- List Items: Enter your default items here, with one item per line. You can also populate items dynamically using variables like
{{name}}.
Colors and Borders
- Text and Background Colors: Set the foundational colors to match your launcher.
- Item Hover Color: Define the background color shown when a user moves their mouse over a specific list item.
- Border Color, Width, and Radius: Control the stroke thickness and corner roundness framing your List Box.
Typography
- Font Family and Size: Choose a font that fits your aesthetic, and set the text size in pixels.
- Font Weight and Style: Adjust thickness from thin to black, and toggle Italic or Underline.
- Text Align: Set the horizontal alignment (Left, Center, or Right) for all items.
List Box Events
To make the List Box truly interactive, you can wire logic into its two dedicated events.
onSelectionChange
This event fires the moment a user clicks on an item to select it. This is ideal for updating side-panels with context—for example, updating a Text Label with the description of a selected mod, or showing the ping of a selected server.
onItemDoubleClick
This event fires when a user double-clicks an item. This is widely recognized as a "Confirm" action. You can use this to instantly launch the game, join the selected server, or apply a chosen configuration profile.
All Possible Actions for the List Box
Your launcher logic can actively manipulate the contents of a List Box using several specific actions.
| Action | How it works |
|---|---|
| Add to List | Appends a new text item (or variable content) to the bottom of the list. |
| Remove from List | Deletes an item based on its specific line number. |
| Edit List Item | Replaces the text of an existing item at a specific line number. |
| Load List from File | Reads a local text file and populates the list automatically (one line per item). |
| Save List to File | Writes the current contents of the List Box into a line-by-line text file on the user's system. |
You can also use general object actions like Show Objects, Hide Objects, Move Object, and Resize Object to dynamically alter the list based on user interactions.
Building Logic with the List Box
The true power of the List Box lies in reading and writing data on the fly. Let's look at how you can utilize these functions.
Example 1: Dynamic Mod Manager
Allow users to add and remove names from a custom modification list, saving their preferences automatically.
- Add a List Box to your page. Leave it empty by default.
- On your page's On Launcher Start event, run the Load List from File action and point it to a file like
mods.txt. - Add an Input Box and a "Add Mod" Button. When the button is clicked, push the input text to a variable, then use the Add to List action utilizing that variable.
- Follow it up immediately with a Save List to File action targeting
mods.txt. Now the user's mods persist between launcher sessions.
Example 2: Quick Connect Server List
Let users join a server instantly with a double-click.
- Populate your List Box with the names or IP addresses of your game servers.
- Add the onItemDoubleClick event to the List Box.
- Under that event, use Push to Variable to grab the currently selected text.
- Use Launch Local File to run your game executable, passing the newly saved variable as a command-line argument to connect to the server.
Custom CSS Example
Because the List Box is available in the Developer Edition, you can write Custom CSS to style the scrollbars or fine-tune the internal padding and transitions.
When applying Custom CSS in the Developer Edition, ensure you use !important to successfully override the default properties. You do not need to scope the object manually; the system handles the injection securely.
This live preview demonstrates how Custom CSS can alter the normally hidden browser scrollbar styles to match an electric, futuristic aesthetic. Try clicking the items!
/* Developer Edition Custom CSS Example for List Box */
/* No manual object scoping needed */
/* Add inner padding and a soft glow to the main box */
padding: 8px !important;
box-shadow: inset 0 0 15px rgba(59,130,246,0.15) !important;
/* Style the scrollbar */
&::-webkit-scrollbar {
width: 8px !important;
}
&::-webkit-scrollbar-track {
background: #1f2937 !important;
border-radius: 4px !important;
}
&::-webkit-scrollbar-thumb {
background: #3b82f6 !important;
border-radius: 4px !important;
}
&::-webkit-scrollbar-thumb:hover {
background: #60a5fa !important;
}
Summary
The List Box object is a cornerstone for organizing and displaying data collections inside a Custom Game Launcher. By utilizing its ability to read from files and react to selection events, you can transform static lists into robust loadout managers, profile selectors, or quick-connect server browsers.