{"id":541,"date":"2022-08-11T09:48:29","date_gmt":"2022-08-11T08:48:29","guid":{"rendered":"https:\/\/byteboxmedia.support\/?p=541"},"modified":"2022-08-12T14:33:54","modified_gmt":"2022-08-12T13:33:54","slug":"the-button-object","status":"publish","type":"post","link":"https:\/\/byteboxmedia.support\/docs\/game-launcher-creator-v2\/the-button-object\/","title":{"rendered":"The Button Object"},"content":{"rendered":"\n
\"\"<\/figure>\n\n\n\n

The button object is probably one of the most used and most important objects you can use inside your Game Launchers. It allows for navigation, launching of games or apps, launching of websites and checking for updates.<\/p>\n\n\n\n

Button Images<\/strong>
Here you have 3 states of the button. UP<\/strong> (default, no mouse hover)<\/em>, HOVER<\/strong> (when the user hovers over the button)<\/em> and CLICK<\/strong> (when the user clicks the button)<\/em>.<\/p>\n\n\n\n

You can click each individual button to load up a new image<\/a>. You can import your own if you want to.<\/p>\n\n\n\n

Button Action<\/strong>
There are numerous button actions available for each button. You can select one action per button. The launcher will then execute the action with the given parameters…<\/p>\n\n\n\n

Execute Game or App<\/strong>
This will execute a game or application. You must use relative paths here. If the launcher is in the same folder as the game executable, then just type in game.exe (or the name of your game executable)<\/em>. If it is in a sub-directory, then type in the relative path (ie: executables\/game.exe)<\/em>.
You can also send commandline arguments\/switches with these buttons.<\/p>\n\n\n\n

Close Launcher upon Action<\/strong>
This will
exit the launcher<\/a> when the button is clicked. If this is left unchecked, it will keep the launcher running in the background<\/a>.<\/p>\n\n\n\n

Go to a Webpage<\/strong>
Select this if you wish to launch a webpage on the users desktop. You must type in the full address, including protocol (ie: https:\/\/yourwebsite.com)<\/em><\/p>\n\n\n\n

End Launcher (Exit)<\/strong>
This will exit the launcher.<\/p>\n\n\n\n

Check for Updates<\/strong>
This will execute the
built-in update system<\/a> or the AOPS (advanced online patching system)<\/em> if you have included them in your game launcher.<\/p>\n\n\n\n

Goto Page<\/strong>
This will instruct the launcher to change the page to the specified page number if clicked. Useful for navigating around a launcher with multiple pages.<\/p>\n\n\n\n

Retrieve from Registry<\/strong>
This action is useful for detecting the installation of a game or app on the users computer via the registry. You specify what registry key to check and if the path\/executable is found, it will launch it.<\/p>\n\n\n\n

Registry Root Key<\/strong>
Please type in (IN CAPS) the ROOT key for the registry<\/p>\n\n\n\n

Registry Current Key<\/strong>
Please type in the CURRENT key for the registry<\/p>\n\n\n\n

Registry String<\/strong>
Please type in the string that will locate the installation path of the game\/app you are looking for<\/p>\n\n\n\n

Additional Filename<\/strong>
Please specify an additional filename here (
executable name<\/a>)<\/em> if the Registry String only defines a path, otherwise leave blank.<\/p>\n\n\n\n

Disable Button if not Found<\/strong>
This will disable the user from clicking on the button if the registry entry is not found.<\/p>\n\n\n\n

Wait for End<\/strong>
This will pause the runtime of the launcher until the executed game or app has finished.<\/p>\n\n\n\n

Command Line<\/strong>
Enter any command line arguments into this box and the executed game or app will be sent with this command line.<\/p>\n\n\n\n

Opacity<\/strong>
This will allow you to change the
transparency<\/a> level of the button in the launcher. Values are from 0 (opaque)<\/em> to 128 (transparent)<\/em>.<\/p>\n\n\n\n


\n\n\n\n

An example of the Retrieve from Registry Action<\/strong><\/p>\n\n\n\n

Let’s say you want to check if the user has GTA V (Grand Theft Auto 5)<\/em> installed on their computer. When you install GTA V to your computer it creates a registry entry locating it. For GTA V, the registry entry setup would be as follows:<\/p>\n\n\n\n

\"\"<\/figure>\n\n\n\n

Root Key:<\/strong> HKEY_LOCAL_MACHINE
Current Key:<\/strong> SOFTWARE\\Wow6432Node\\rockstar games\\Grand Theft Auto V
Registry String:<\/strong> InstallFolder
Additional Filename:<\/strong> gta5.exe<\/p>\n\n\n\n

If this key is found on the users computer, it means they have GTA V installed and it will launch the game when the user clicks the button.<\/p>

Minimize Launcher<\/a>
<\/strong>Allows you to create a minimize button so the user can minimize the launcher window. Can work in conjunction with the system tray property, if enabled.<\/p><\/p>\n\n\n\n


\n\n\n\n

Tutorial Video<\/h2>\n\n\n\n
\n