Buttons in guiDesigner can be placed on any page or subpage.
To implement a button in guiDesigner:
You can also drag a button theme directly from the Theme Manager or Theme Library onto an empty spot on an open page, and the button will be automatically created at the drop point and assigned the theme you dragged.
To access the button properties, right click on the button and choose Button Properties
.
Enter a join number to assign to the button. The digital join controls the state of the button. When the join is low (0) the button will render it's inactive state. When the join is high (1) it will render it's active state.
By default the button will be assigned a digital join of zero, which basically means it cannot change state other than via momentary simulation.
For more information on joins, see the Joins wiki entry.
When a button is set to simulation mode, it will change state when pressed. If simulation is not enabled on the button, the button will only change state when it's assigned digital join changes state. If the button is assigned a digital join, the join state will also change when the button state changes, resulting in other GUI objects using the same digital join to be affected also.
When Simulate Feedback is enabled, these two options will be available. Momentary means the button will remain in active state as long as the button is being pressed, then return to inactive state when released. Toggle means the button will change to active state when pressed the first time, then back to inactive state when pressed a second time (and so on), toggling between active and inactive state each time the button is pressed.
Toggle mode is only available when the button is assigned a digital join above zero.
Select the button theme you would like to use. This choice is derived from the button themes you have defined in your project within the Theme Manager.
This option allows for manual entry of the position and size of the button.
Choose whichever option you want to preview and edit. Inactive will allow you to preview and edit the button in its non-pressed state. Active will allow you to preview and edit the button in its pressed state.
When the Sync States
box is checked, any edits made in Inactive or Active, will also effect the other.
E.g. If you are editing the inactive button, and Sync States
is checked, then any changes made will also apply to the active state.
If you want to edit the states separately, then ensure this is unchecked.
Enter the text here that you want to display on the button.
This serial join allows you to dynamically change the text value shown on each button state. By assigning a serial join above zero, when that serial join text value changes, any button assigned the same serial join will be updated to show the new text value.
Opens the overlay browser window which allows you to select an image from a library to overlay on the button.
The contents of the overlay library are taken from the guiDesigner installation location, within an overlays
folder. You can add your own overlay images to the library by placing them within this folder.
Select the overlay set to choose from.
Select the image to overlay on the button.
This option allows you to change the background color on the overlay list to allow you to see what that image looks like on a certain color.
Removes the overlay image from the button.
Choose a custom image file to use as an overlay image.
This option allows for manual entry of the position and size of the overlay image.
A preview of what the button will look like.
For information on these settings, see the Button Properties Design Tab info above.
Select a page to navigate to in your GUI when the button is pressed. Page flips will only work if your device is licensed to run the GUI.
Set the URL property of a button to launch a web browser on the device to a specific website. On iOS devices, you can also launch other apps by using their URL Schema as the URL.
You can also force iViewer to load another GUI by entering the URL of the GUI file to load, replacing http://
with cf://
.
When clicked, this will bring up documentation on how to use GUI File linking.
There are two ways to assign commands and macros to buttons:
With basic actions, you can assign any Command and/or Macro to a button. This covers most needs for users. There is also a repeat delay option which controls how often the command and/or macro is sent whilst the button is held down.
With advanced actions, you get a lot more control over when actions are fired. They are more complicated to setup, but quite simple once you understand how they work. See the Advanced Button Actions topic for more details.
Choose a command that you have previously defined in the System Manager to assign to the button.
Choose a macro that you have previously defined in the System Manager to assign to the button.
Enter a line of JavaScript code to execute when the button is pressed. The repeat delay will also cause this code to be executed repeatedly whilst held.
JavaScript as a language allows you to enter even long functions as a single line of text.
For mor information on JavaScript support in iViewer, see the JavaScript API Documentation.
Enter the time in milliseconds that you want iViewer to wait until repeating the command if the button is held down. Enter 0 to disable repeating. For example, 1000 means “repeat every second”.