Wade Schuette
Wade Schuette

Reputation: 1473

How can I make a pop-up HUD for widgets to get them off the main interface?

In Netlogo how can I make a second page to the interface, or a pop-up HUD (Heads up Display), to store widgets that I don't use frequently and simply clutter up the main interface?

Rationale: multiple widgets ( sliders, switches, etc.) are helpful for SETUP but then I'd like to hide them to keep the interface clearer, smaller, and less overwhelming to viewers.

Volker Grimm suggested that a set of tabs, each opening a pop-up window to manage different portions of complex models would be helpful.

Since the pop-up might have its own viewing area, you could use it to visually adjust parameters, such as a Normal or Poisson distribution that you want to use for input, without having to use your main interface's viewing area to accomplish this.

In fact, being able to open a second ( or Nth ) graphics window ( "world") into your model could be helpful

Preferably the pop-up would have persistent memory and could be hidden or shown with a single click.

Upvotes: 1

Views: 44

Answers (1)

Wade Schuette
Wade Schuette

Reputation: 1473

Here's my own solution to the pop-up HUD question.

I used the LevelSpace extension ("ls") in the main model to pop up a second model containing the widgets I'm trying to show or hide as desired.

The main model has more details about how this works in the INFO tab.

In this prototype proof-of-concept, the main model simply displays a few turtles wandering around the world and has hide/show buttons to pull up the HUD.

The HUD has 3 sliders that can be used to set the number of turtles, size of turtles, and shape of turtles, and a button to upload those new settings all at once to the main model. The main model will check once every GO step for updates and apply them and mark them applied.

Alternatively, the HUD can be set to be in automatic-update mode, so the sliders are basically live and as you move each one the changes immediately show up in the main main model ( at the next GO step ).

It works! The full models with the interface buttons and INFO tabs are in the Netlogo Modeling Commons as "Popup-HUD part 1 of 2" and "Popup-HUD part 2 of 2" for download. ( just search for "HUD" as there are only two hits. )

They won't run over the web because they use the LevelSpace extension which isn't available there. You need to download the main model to be able to read the INFO tab.

These are free to copy, modify, etc. so long as attribution is made ( CC 4.0 )

Upvotes: 1

Related Questions