Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NetworkView: add "pin" button #70

Open
bengardner opened this issue Aug 23, 2023 · 1 comment
Open

NetworkView: add "pin" button #70

bengardner opened this issue Aug 23, 2023 · 1 comment

Comments

@bengardner
Copy link
Collaborator

Now that we can transfer items directly to/from the network chest, it would be nice to be able to "pin" the NetworkView GUI.

The "flib" mod has a good example of how to do that.
I rigged something up based on the flib 'test' example and found it to be handy.
I can put the Network View frame next to the Character inventory frame and move stuff back and forth.

A dialog is "pinned" by setting player.opened=nil and "unpinned" by setting player.opened back to the original value.
There is also some trickery with the callbacks, as you get an on_gui_closed event when clearing player.opened.
The 'close' buttton handler also has to be modified to be able to close the dialog when pinned.

@year6b7a
Copy link
Owner

year6b7a commented Sep 8, 2023

This makes sense to me. If you have a branch that can be easily merged I'd be happy to get that in. Otherwise I can take a look at implementing this when I get a chance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants