question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add gui instance hide()/show() methods

See original GitHub issue

The existing open()/close() make the GUI scroll up as if the user clicked the “Close Controls” button. It’d be nice if there was a way to assert that a particular gui is hidden or shown rather than having a global toggle for show all/hide all functionality. The only API for hiding/showing currently is the non-instance-specific dat.GUI.toggleHide(). If you had multiple GUIs, that means you can’t hide one individually. Also, if, depending on how you organized your code, you want to assert that a particular gui instance is shown, you have to keep track of whether or not it is currently shown and decide whether or not to cal dat.GUI.toggleHide().

The sort of thing I’d like to be able to do:

var gui = new dat.GUI();
gui.add({x: 2}, 'x', 1, 3).onChange(function (value) {
    console.log('x changed to: ' + x);
});
gui.hide();
/* And show it in response to some event: */
gui.show();
/* And show it depending on some expression: */
gui.toggleHide(myState == 'showGui');
/* And per-gui simple toggle: */
gui.toggleHide();

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
donmccurdycommented, Mar 8, 2019

@magdesign i think that dat.GUI.toggleHide() might do that

0reactions
donmccurdycommented, Jul 13, 2019

The TS typings are maintained externally, and may need to be updated.

https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/dat.gui

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to show and hide widgets in Tkinter? - Tutorialspoint
In order to display/show the widget, use pack() geometry manager; To hide any widget from the application, use pack_forget() method.
Read more >
c# - Hide an Instance of a Window - Stack Overflow
I Can show the Login Window with : "Application.Current.MainWindow.Show();", but i dont know how to hide the Register-Window. Normally i would ...
Read more >
Hide and Unhide The Window in Tkinter - Python
withdraw() is used to hide the window. Syntax: withdraw(). Approach: Import module; Create a normal window; Add buttons to perform hide and ...
Read more >
Tkinter: How to Show / Hide a Window - Mouse Vs Python
Some examples say that you need to call the update() method before you call the deiconify() one, however if you comment out the...
Read more >
lil-gui 0.17.0
Folders. You can organize controllers in collapsible groups using addFolder() . The method returns a new GUI instance representing the folder. You can...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found