Button Component

Use the button component to enable actions to occur when clicked on by users. Use the button component properties to set actions to your buttons, add labels to your buttons, alter the button positioning on the canvas, add labels using replacement variables to fill in changing text, and create conditional events triggered by comparative values (for more information on conditionals, see ‘Button Settings: Conditionals’ below).

Access the button component properties by clicking on the button component after it has been placed on the canvas. The Button Settings tab will appear in the component panel displaying a stack of horizontal tabs that are labeled and categorized as follows:

  • Label - Contains the property options used to label your button and modify the text of your label.
  • Actions - Contains the property options used to set your button to trigger an action when clicked on by a user.
  • Replacement Values - Contains the property options used to create a text label that changes. For example, a label with a replacement value can be set to display the current user name. When a new user logs into the sim, the label will automatically display the new user name. Other common uses include current simulation time, or the value of a variable.
  • Conditionals - Contains the property options used to enable your button to be displayed based on the value of a variable in the model, a value of an interface variable, or the value of a simulation property.
  • Position, and ToolTip - Contains the property options used to adjust the size and position of the button and provide tooltip information to the user.
Scroll down to view descriptions of all the button component property options. Note that the property descriptions below are divided into the same categories found in the Button Settings tab.



image
Example: Button Component

Button Settings: Label

Click on the 'Label' tab in the component panel to access the properties used to label your button and modify the text of your label.

    Button Label - Enter text in the ‘Button Label’ text entry box to label your button.
image

  • Font Family - Click on the ‘Font Family’ drop-down menu arrow to choose a font style for the button label text.

  • Font Size - Enter a number in the ‘Font Size’ text entry box to change the size of the button label text.

  • Font Color - Click on the ‘Font Color’ box to choose a color for the button label text.


Button Settings: Label Tab image

Button Settings: Actions

Click on the 'Actions' tab in the component panel to access the properties used to set your button to trigger an action when clicked on by a user.

  • Add Action – Add actions to your button by clicking the ‘Add Action’ drop-down menu arrow, and then choosing one of the following actions:

    • None - This option does nothing and cannot be selected.

    • Step - Moves the sim forward by the value entered in ‘Time Units to Advance’ text entry box.

    • Step to End - Moves the sim to the last step (end step).

    • Step to Next - Moves the sim to the next step.

    • Go Back - Moves the sim backwards by the value entered in ‘Time Units to Rewind’ text entry box.

    • Save Run - Marks the current run as saved.

    • Goto Page - Sends the user to the page selected from the ‘Destination Page’ drop-down menu.

    • Reset Simulation - Resets the simulation without retaining the decision values from the previous run.

    • Logout of Simulation - Logs the user out of the sim.

    • Switch Tab - Switches tabs based on the entries in the ‘Tab Navigator to Change’ and ‘Tab to switch to’ drop-down menus.

    • Pause - Pauses action execution based on the time entered in the ‘Pause Time’ text entry box.

    • Set Decision - Sets decision in the model when the button is clicked. To set a decision, click the arrow on the ‘Variable to set’ drop-down menu, click ‘Browse’, choose a variable, and then enter a value in the ‘Value to set’ text entry box.

    • Start Timer - Starts the timer selected in the ‘Timer to start’ drop-down menu.

    • Stop Timer - Stops the timer selected in the ‘Timer to stop’ drop-down menu.

    • Reset Vars - Resets the simulation while retaining the decision values from the previous run.

    • Set Interface Variables – Sets an interface variable and value. Variables and values are entered in the ‘Variable to set’ and ‘Value to set’ text entry boxes.

    • Clone Run - Clones the run identified by the run ID entered in the ‘Run to Clone’ text entry box. Use this option to copy a simulation run you want to change without making changes to the original.

    • Goto Previous Page - Moves the sim to the page the user was previously on.

    • Name and Describe Run - Use this option to have the user input a name description for the current run into a pop-up modal dialog.

    • Name Run - Names the current simulation run with the name entered in the ‘Name To Set’ text entry box.

    • Set Default Run - Sets the run as the default run. This means all subsequent runs will be setup just like the current run. Note that this action can only be performed by facilitators.

    • Clear Default Run - Clears the default run and resets it as the model default. Note that this action can only be performed by facilitators.

    • Clear Run Count - Clears the run count for all users within the current group. This action is only useful in simulations where there is a run limit. Note that this action can only be performed by facilitators.

    • Clears Run Count User - Clears the run count of the user (via email address) typed into the user email input. This is only useful in simulations where there is a run limit. Note that this action can only be performed by facilitators.

  • Remove Action – Click the ‘Remove Action’ button to remove a selected action.


Button Settings: Actions Tab image

Button Settings: Replacement Values

Replacement values are applied to allow text in a label to change based on the replacement value settings. For example, a label with a replacement value can be set to display the current user name. When a new user logs into the sim, the label will automatically display the new user name. Other common uses include current simulation time, or the value of a variable. Click the 'Replacement Values' tab in the component panel to access the properties used to add replacement values. See FAQs below for instructions on applying replacement values.

  • Type – Click the ‘Type’ drop-down menu arrow to choose one of the following options:

    • Variables - Allows all available variables to be chosen from the ‘Variable’ drop-down menu. To view the variables, click on the ‘Variable’ drop-down menu, and then click ‘Browse’.

    • Run – Allows the following run properties to be chosen from the ‘Property’ drop-down menu (to view the run properties in the component panel, click the ‘Property’ drop-down menu, and then click ‘Browse’):

      • Time: Displays the current time of the simulation.

      • TimeFormatted: Displays the current time of the simulation formatted using the M TimeFormat property in the model.

      • Step: Displays the current step of the run.

      • EndStep: Displays the final step of the simulation.

      • EndTime: Displays the final time of the simulation.

      • StartTime: Displays the start time of the simulation.

      • Run Count: Displays the number of the current run. Note that this is only applicable for simulations set up with a limited run capacity. The default run count is set to 0.

      • Run Limit: Displays the total number of runs for the current user. Note that this is only applicable for simulations setup with a limited run capacity. The default run limit is set to 0 (infinite).

      • ID: Displays the ID. The ID is a unique identifier for the current run.

    • User - Allows the following user properties to be chosen from the ‘Property’ drop-down menu (to view the user properties in the component panel, click the ‘Property’ drop-down menu arrow, and then click ‘Browse’) :

      • First Name: Displays the first name of the currently logged in user. Note that if no user is logged in, “Unknown” is displayed.

      • Last Name: Displays the last name of the current logged in user. Note that if no user is logged in, “Unknown” is displayed.

      • Full Name: Concatenates the first and last name of the user. Note that if no user is loged in, “Unknown Unknown” is displayed.

      • Email: Displays the email address of the current user. Note that if no user is logged in, “Unknown” is displayed.

      • Role: Displays the multiplayer role of the current user. This is only useful for multiplayer simulations. The default value is “No Role”.

      • Team: Displays the team name that the current user is on. This is only useful for multiplayer simulations. The default value is “No Team”.

  • Property – This text entry box will appear beneath the ‘Type’ drop-down menu if ‘Run’ or ‘User’ type is selected. Click the ‘Property’ drop-down menu arrow, and then click ‘Browse’ to choose your property from the list.

  • Variables - This text entry box will appear beneath the ‘Type’ drop-down menu if ‘Variables’ is selected. Click the ‘Variable’s drop-down menu arrow, and then click ‘Browse’ to choose your variable.

  • Add - Click the ‘Add’ button to add the type and property to your selected button.

  • Remove - Click the ‘Remove’ button to remove the type and property from your selected button. Note that the replacement value needs to be in the table located above the ‘Remove’ button option.

FAQs

What does a replacement value do?
How do I set a replacement value?

Tutorials

How to set a 'First Name' replacement value.


Button Settings: Replacement Values Tab image

Button Settings: Conditionals

A conditional is used to set the state of your button to be visible, invisible, enabled, or disabled based on the value of a variable in the model, a value of an interface variable, or the value of a simulation property. Click on the 'Conditionals' tab in the component panel to access the properties used to create conditions for your buttons.

  • Make Button - Click on the ‘Make Button’ drop-down menu arrow, and then choose one of the following options for your button:

    • Enabled – Sets your button to be enabled for the user.

    • Disabled – Sets your button to be disabled and unusable to the user.

    • Invisible – Sets your button as invisible to the user.

    • Visible – Sets your button to become visible to the user.

  • When – Click on the ‘When’ drop-down menu arrow, and then click ‘Browse’ to choose a variable, interface variable, or simulation property.

  • Is Equal To – Click the ‘Is Equal To’ drop-down menu arrow o create a condition for the button, and then enter a value in the text entry box to compare to the ‘When’ option. The drop-down options include the following:

    • “is greater than or equal to”

    • “is equal to”

    • “is greater than”

    • “is less than”

    • “is less than or equal to”

    • “is not equal to”

  • Add Conditional – Click the ‘Add Conditional’ button to add the conditional to the conditional list.

  • Remove Conditional - Click the ‘Remove Conditional’ button to remove a conditional selected in your conditional list.

  • Edit Conditional - Click the ‘Edit Conditional’ button to edit a conditional selected in your conditional list.

Note that conditionals are executed in the order they appear in the list and execution stops when the first conditional is met.


FAQs
How do I create a conditional?

Button Settings: Conditionals Tab image

Button Settings: Size, Position, and ToolTip

Click the ‘Size, Position, and ToolTip’ tab in the component panel to access the properties used to adjust the size and position of the button and provide tooltip information to the user.

  • X - Enter a number in the ‘X’ text entry box to adjust the left and right positioning of the button on the canvas. A higher number moves the button to the right, and a lower number moves the button to the left.

  • Y - Enter a number in the ‘Y’ text entry box to adjust the up and down positioning of the button on the canvas. A larger number will lower the position, and a smaller number moves the button higher.

  • Width- Enter a number in the ‘Width’ text entry box to adjust the button width.

  • Height - Enter a number in the ‘Height’ text entry box to adjust the button height.

  • Tab Index - Specifies the tab ordering of objects in a SWF file. The tabIe index property is -1 by default, meaning no tab index is set.

  • Lock - Use the ‘Lock’ checkbox to lock the button ’s position in place on the canvas. A small lock icon will appear near the button. Click on the lock icon or uncheck the lock checkbox to unlock the button.

  • Visible to Facilitator Only - Use the ‘Visible to Facilitator’ checkbox to restrict the button‘s visibility to only be seen by facilitators.

  • Tooltip - Enter in the details of the button in the ‘ToolTip’ text entry box. The details entered will appear on the screen when a user places their mouse cursor on or across the button.


Button Settings: Size, Position, and ToolTip Tab image


Back | Forward | Main Page

Commenting is not available in this weblog entry.