PDA

View Full Version : [Extension] Sticky windows



Ken L
May 4th, 2018, 21:40
This contribution has been removed by the author due to a disagreement with the change to the contributor license enacted by Smiteworks.
https://www.fantasygrounds.com/forums/showthread.php?47443-The-Fantasygrounds-Content-License-change-and-how-it-affects-contributors

viresanimi
May 4th, 2018, 21:48
Looks very cool!

darrenan
May 4th, 2018, 22:30
Love it, will be trying this out this weekend.

Pepor
May 5th, 2018, 07:09
Thanks Ken L

It will save a lot of space in our FG desktop.

celestian
May 5th, 2018, 07:22
OMG, I was just starting work on this exact same thing tonight! Saved me the work.

Thanks for sharing this with the community.

GunnarGreybeard
May 5th, 2018, 08:02
Nice, definitely have to start using this in my games.

Ken L
May 5th, 2018, 19:11
Added info on how to fix the story.lua 'error' for your respective rulesets. In CoreRPG it's simple but I don't own every ruleset so it can vary.

celestian
May 5th, 2018, 19:43
Here is an example extension that will cope with the arrows. This should work for CoreRPG rulesets with a minimal footprint.

https://github.com/CelestianGC/sticky_windows_companion

edit: FYI, you use this and the sticky_windows extension both. Ken feel free to merge it with yours if you want tho I suspect you just want to avoid having to update it ;)

Ken L
May 5th, 2018, 21:39
I'd rather just keep it isolated. I'm more of a 'teach a man to fish' philosophy. I also update infrequently so I don't want to become suddenly "responsible" when FG updates the core files and it breaks. It's as isolated as it can be from any ruleset.

Stormhound
May 6th, 2018, 02:11
This one seems to combine nicely with the window saver extension, just leave one of each of the main types open when you shut down the campaign, then when you reopen them it re-establishes the proper positions and you're set to go.

viresanimi
May 8th, 2018, 11:36
I love this extension, but I would like to add one request that would make it perfect!

I am currently running an epic Star Wars campaign and this extension is great for quickly running through this massive module I've made with charts I need to remember and notes on the galaxy. But I also keep separate story notes, so I need more than one window open to keep an eye on everything I need. And what I've found is that you need to do things is a very specific order, or else it gets confusing.

Now. What I would like is the following (assuming its is possible at all): Lets say I open Window A. Every link in that opens there. Good. If I CTRL-click a link at open Window B, every link opens in Window B. But would it be possible in the case of two open windows that links in Window A, opens in Window A, and links in Window B opens in Window B? Effectively giving me 2 "browsers"?

I hope that the above makes sense. Sadly I will understand Ancient Cuneiform before coding, so don't know how to fix this myself.


Vires Animi

Ken L
May 9th, 2018, 05:03
I'm not sure what you're asking about?

From what I understand you have a bunch of windows of the same window class that have links to launch other windows of the same window class that you want to replace the parent window that launched them?

That's fully possible but you'd need to track it from the parent windows, possibly with a combination of their init calls and a manager that observes the exchange.

It however is a bit specific to the realm of modifying the windows and the scripts themselves which is beyond the scope of this extension. You can easily take this script and run away with it. It's GPL and pretty easy to understand if that helps jump start you.

Regarding the opening metric. It operates on a stack model, were the last window of that windowclass will always be the source of future flips for that windowclass opening. It it's closed, the the most recently opened window will become the source of flips.

Valyar
May 13th, 2018, 09:09
Thank you for this extension. It is fantastic and should be integrated in CoreRPG. It reduced the frustration and annoyance I experience when I am doing data upload for modules I am working on. Windows management is bad in FG, but this keeps me sane to some extent :)

Maybe you can post here when there is update and maintain in the bottom of the first post versioning and the .ext file for people who don't use GIT.

ll00ll00ll00ll
June 3rd, 2018, 15:02
I'm sure this was a lot of work for a seemingly small detail, but this will be a definite addition to all my campaigns. Thanks for this!

Ken L
June 3rd, 2018, 16:00
I'm sure this was a lot of work...

It's actually pretty compact, you can look at how few lines of logic it takes to do this. I had been using a version of this for only story entries for more than a year, it was only recently that I realized that I could stick it on a global handler.

ll00ll00ll00ll
June 3rd, 2018, 16:16
I realized that I could stick it on a global handler.

dude... what's with making everything sticky? :D

Slalom
November 2nd, 2018, 08:55
I used your ext but it has a bug. When i swap between PC sheets, sometimes sheet tab apear blank and i have to resize it for it to show the text in it.
This is the reason that force me not to use your ext.
Still you ve done a great job.

alessandro
November 11th, 2018, 15:31
I used your ext but it has a bug. When i swap between PC sheets, sometimes sheet tab apear blank and i have to resize it for it to show the text in it.
This is the reason that force me not to use your ext.
Still you ve done a great job.

Just edit the singlewindow.lua file: just after row 48 [if sClassName == 'masterindex' then return; end] add this row:

if sClassName == 'charsheet' then return; end

In this way, character sheets won't be affected by the extension. Each character sheet will open indipendently, and you should experience the problem you described.

Ken L
November 11th, 2018, 19:21
Character sheets have some weird behavior that I never really investigated. If you use the resize handles, they fix themselves so I suspect it has to do with their redraw method. I kept it in as it was easily resolved by just by using the resize handles.

Ludd_G
November 19th, 2018, 15:36
Hi,

I really like this extension, and hate to be that 'please, sir, can I have some more?' person, but is it possible to adjust the code to just exclude images (I would say just maps but I suspect they don't have their own 'class' beyond just being another image)? I use FG at the table, with a 'player' instance open for displaying battlemaps, handouts, NPC art etc. on a tv screen, and image display on the player's side can becomes quite confusing, even though it's great for me on the GM's side. I hope this make sense and is something easily doable?

Cheers, Simon

viviolay
November 21st, 2018, 05:40
As someone working with very small real estate (surface pro) this will be a huge time saver . Thank you

Ken L
November 21st, 2018, 12:05
but is it possible to adjust the code to just exclude images (I would say just maps but I suspect they don't have their own 'class' beyond just being another image)

Technically they're all Imagewindows. 3.3.7 on the test server seems to have finally added the tools needed for background maps. In this case you'd just have the map as the background and you can share image windows normally.

alessandro
November 23rd, 2018, 06:48
Hi,

I really like this extension, and hate to be that 'please, sir, can I have some more?' person, but is it possible to adjust the code to just exclude images (I would say just maps but I suspect they don't have their own 'class' beyond just being another image)?

Cheers, Simon

Hi Simon,
to exclude Images, simply edit the "singlewindow.lua" file you find inside the extension file. Just after row 48 [if sClassName == 'masterindex' then return; end] add this row:

if sClassName == 'imagewindow' then return; end

Ludd_G
November 23rd, 2018, 17:52
Hi Alessandro,

that seems to work great, thanks for your help.

Cheers,

Simon

Rino
December 4th, 2018, 18:11
I added this acording to previous post in this thread:

if sClassName == 'charsheet' then return; end
if sClassName == 'imagewindow' then return; end

And added the 'sticky_windows_companion' extension (also in this thread).

And i got to say..... your 'sticky_windows' extension ROCKS !!! After using it now, I wonder how this can't be default in FG.

Until it gets default, my suggestion is that you include above as a default ready .ext file on the front end. This extension would probably catch on more that way.

Tigon
January 2nd, 2019, 12:43
where did this go!?!

Valyar
January 2nd, 2019, 12:58
The author has decided to pull his code off.

celestian
January 2nd, 2019, 15:23
For what it's worth, here is the original script.

HuseyinCinar
February 13th, 2019, 23:44
Even though I have the provided original version in my correct Extensions folder, it doesn't show up on the Extension selection in the game launcher. Anyone any ideas?

Trenloe
February 13th, 2019, 23:49
Even though I have the provided original version in my correct Extensions folder, it doesn't show up on the Extension selection in the game launcher. Anyone any ideas?
Just tested and it works fine for me. Restart Fantasy Grounds after copying the .ext file to your <FG App Data>\extensions directory. Look for an extension called "Sticky Windows" on your load campaign screen.

HuseyinCinar
February 14th, 2019, 06:51
As per someone wrote a couple posts above I wanted to change a minor behavior. It was suggested in this thread in two different posts to add code to 48th line. I don't want this extension to work on Char Sheets and I don't want it to work on images. Thus the codes suggested are:


if sClassName == 'charsheet' then return; end
if sClassName == 'imagewindow' then return; end

I added these in. Maybe that's why it didn't show up on my launcher? Am I doing it correctly?

Also in the first page, there is a Companion extension that's supposed to work with this one where you enable both on the launcher. Should I ignore that?

Trenloe
February 14th, 2019, 15:30
As per someone wrote a couple posts above I wanted to change a minor behavior. It was suggested in this thread in two different posts to add code to 48th line. I don't want this extension to work on Char Sheets and I don't want it to work on images. Thus the codes suggested are:


if sClassName == 'charsheet' then return; end
if sClassName == 'imagewindow' then return; end

I added these in. Maybe that's why it didn't show up on my launcher? Am I doing it correctly?
Ah, so you've been "playing"? That's why you can't see the extension anymore! ;)


Am I doing it correctly?
I'm guessing not, but as you haven't told us how you made the change I can only guess...

How have you made the change to the extension? Have you unpacked it as a directory or have you re-zipped the extension and renamed back to .ext? If the latter, make sure you re-ZIP using ZIP compression (not RAR or other compression formats); make sure you ZIP from within the extension directory (select all the files and ZIP), not from outside the directory by just ZIPping the folder.

HuseyinCinar
February 14th, 2019, 16:02
Oh I did it! Okay I guess the default compression thing on Mac is faulty or at least different somehow. I did it from a Windows laptop and like you suggested I made sure I ZIP'ed from within the directory, not from the single folder outside.

Now to test the Companion extension which makes the arrow buttons functional again.

celestian
March 26th, 2019, 17:33
Oh I did it! Okay I guess the default compression thing on Mac is faulty or at least different somehow. I did it from a Windows laptop and like you suggested I made sure I ZIP'ed from within the directory, not from the single folder outside.

Now to test the Companion extension which makes the arrow buttons functional again.

The companion is no longer necessary, I do not think, with 3.3.7.

I should just put up the version of this I have of my own. It includes a option to easily add "excluded" types and isn't posted in several places.

HuseyinCinar
March 26th, 2019, 19:20
I would appreciate a straight single ext with easy modifications.

Trenloe
March 26th, 2019, 19:33
I would appreciate a straight single ext with easy modifications.
https://www.fantasygrounds.com/forums/showthread.php?48656-CoreRPG-SingleWindow