PDA

View Full Version : minor change sheet wont resize. any ideas?



heavy3p0
March 31st, 2015, 02:34
Hello friends,
I am making an extension for the fate core rule-set. one of the changes I made was a minor change to the NPC sheet changing languages to aspects. All i changed was to replace the word language with the word aspects in the four locations it appears in the record_npc file. The change works but i cannot re-size the npc sheet. I made no changes to the sheet other than above and the <resize_recordsheet /> is still in the file. Does anyone have an idea why it no longer re-sizes? Thanks in advance.

Trenloe
March 31st, 2015, 02:44
<resize_recordsheet /> is not what enables resizing, it is just the graphical element that shows where you can click/drag to resize.

What enables resizing is the <sizelimits> <dynamic> tag towards the top of <windowclass name="npc"> make sure that is still there.

Also, before you open an NPC record open the console by typing /console in the chat window - this might give you some warnings that might indicate where your issue is.

Another thing to try is to hold down the CTRL key and left-click-and-hold within an NPC record and then drag to see if that resizes the window as well (this is the FG old-school way of resizing).

Trenloe
March 31st, 2015, 02:48
I'll also just noticed that the NPC sheet in the Fate Core ruleset only resizes once you release the mouse button - during the resize the window doesn't change.

heavy3p0
March 31st, 2015, 02:55
Thanks Trenloe,
holding CTRL does allow me to re-size the window. i am not having the same issue as you with the fate rule-set though (without my extension enabled of course). it is a little sluggish but i can see the window re-sizing when i drag.

Trenloe
March 31st, 2015, 03:00
i am not having the same issue as you with the fate rule-set though (without my extension enabled of course). it is a little sluggish but i can see the window re-sizing when i drag.
Yeah, you're right. I had the console window open and there are a lot of static height ignored warnings that are coming up when resizing, which was causing a major delay on re-draw of the NPC sheet when resizing.

jreddin1
June 12th, 2015, 19:11
Hey Trenloe. Maybe you can help me. I have a really trivial windowclass that doesn't resize:

<windowclass name="MyWindow">
<frame>campaignlistwithtabs</frame>
<sizelimits>
<dynamic />
</sizelimits>
<sheetdata>
<resize_campaignlistwithtabs />
<close_campaignlist />
</sheetdata>
</windowclass>

Based on everything I've read, that should resize, but it doesn't. In fact, it doesn't change the pointer to the resize pointer when I hover over the control, either. I'm guessing there's some lua script or something I need to include, I just don't know where to begin looking. Ideas?

Trenloe
June 12th, 2015, 21:19
Hey Trenloe. Maybe you can help me. I have a really trivial windowclass that doesn't resize:

<windowclass name="MyWindow">
<frame>campaignlistwithtabs</frame>
<sizelimits>
<dynamic />
</sizelimits>
<sheetdata>
<resize_campaignlistwithtabs />
<close_campaignlist />
</sheetdata>
</windowclass>

Based on everything I've read, that should resize, but it doesn't. In fact, it doesn't change the pointer to the resize pointer when I hover over the control, either. I'm guessing there's some lua script or something I need to include, I just don't know where to begin looking. Ideas?
Try the "old school" method of resizing - see "sizing" here: https://www.fantasygrounds.com/wiki/index.php/The_Basics#Windows This will give an idea if the frame used has some problem with the resize hook (sometimes it is outside of the visible portion of the frame).

jreddin1
June 12th, 2015, 21:28
Try the "old school" method of resizing - see "sizing" here: https://www.fantasygrounds.com/wiki/index.php/The_Basics#Windows This will give an idea if the frame used has some problem with the resize hook (sometimes it is outside of the visible portion of the frame).

The ctrl trick didn't work before, but it does now. I must have had something else wrong and didn't realize it. Anyway, the ctrl method works now, but the drag by the handle still doesn't.

This window is the same as the Notes window, without a few things like the list and the add/edit buttons. I don't understand why it won't size like notelist from campaign_notes.xml will.

Trenloe
June 12th, 2015, 21:36
If you set a minimum within your <sizelimits> does it make any difference?


<sizelimits>
<minimum width="300" height="400" />
<dynamic />
</sizelimits>

Do you see the resize control appear in the bottom right of the window?

Do you have anything actually within this window? It looks like all you have is the resize control in the bottom right and the close control in the top right? Do you see both of these controls?

jreddin1
June 12th, 2015, 21:51
If you set a minimum within your <sizelimits> does it make any difference?


<sizelimits>
<minimum width="300" height="400" />
<dynamic />
</sizelimits>

Do you see the resize control appear in the bottom right of the window?

Do you have anything actually within this window? It looks like all you have is the resize control in the bottom right and the close control in the top right? Do you see both of these controls?


I've added minimums multiple times (and did it again, to make sure I wasn't crazy), that changes the minimums, but doesn't effect resize.
I do see the resize control. That worked as soon as I added <resize_campaignlistwithtabs />.
I don't have anything in this window, though I did add some stringcontrols just to see if that was causing it to not size. Still didn't work.


I'll try adding some content back in and see if it works now.

jreddin1
June 15th, 2015, 00:51
If you set a minimum within your <sizelimits> does it make any difference?


<sizelimits>
<minimum width="300" height="400" />
<dynamic />
</sizelimits>

Do you see the resize control appear in the bottom right of the window?

Do you have anything actually within this window? It looks like all you have is the resize control in the bottom right and the close control in the top right? Do you see both of these controls?

It's really very strange. <close_campaignlist /> has the callback to do the close when the button is clicked. <resize_campaignlist /> doesn't. I still can't figure out where the damned callback is or how it's handled. It's quite inconsistent and a big PITA.

Moon Wizard
June 15th, 2015, 01:07
The resize in within 10(?) pixels of right/bottom edge of window.

This can be modified if the frame asset used by the window has an insideoffset tag to move the "edge" up and left to account for transparent regions on bottom/right of window frame graphic.

Also, you will need to make sure that no controls are defined in that region of the window or else they will grab the mouse events.

Hope that helps,
JPG

jreddin1
June 15th, 2015, 01:20
The resize in within 10(?) pixels of right/bottom edge of window.

This can be modified if the frame asset used by the window has an insideoffset tag to move the "edge" up and left to account for transparent regions on bottom/right of window frame graphic.

Also, you will need to make sure that no controls are defined in that region of the window or else they will grab the mouse events.

Hope that helps,
JPG

As I showed earlier in this thread, I'm using the campaignlistwithtabs framedef, with a custom windowclass. I'm positive I made no changes to the frame asset. I literally cut and pasted from the notelist window class and just removed the controls, so I don't think I messed anything up.

I'll go through it again and see if there's anyway I messed it up.

Since I don't have any controls yet, I'm fairly certain they aren't grabbing the mouse events. In fact, I tried adding onClick and onDrag events at both the windowclass and windowcontrol level and they never fire at all.

I'm working on a minimal-viable-product tutorial. Resize not working is the only thing stopping chapter one from being done :-)

jreddin1
June 15th, 2015, 01:22
double post for some reason...

jreddin1
June 18th, 2015, 22:05
The resize in within 10(?) pixels of right/bottom edge of window.

This can be modified if the frame asset used by the window has an insideoffset tag to move the "edge" up and left to account for transparent regions on bottom/right of window frame graphic.

Also, you will need to make sure that no controls are defined in that region of the window or else they will grab the mouse events.

Hope that helps,
JPG

Okay. I must be an idiot. This can't be this hard. I've tried everything and the following minimal extension works great, except for resize. Can someone PLEASE tell me what I'm doing wrong? I've learned alot about FantasyGrounds trying to chase this down, but this continues to elude me.

Thanks.

extension.xml


<?xml version="1.0" encoding="iso-8859-1"?>
<root release="3" version="1">
<properties>
<name>Extension Tutorial - Jeffery W. Redding</name>
<version>0.0.1</version>
</properties>
<base>
<icon name="ExtTutorialLogo" file="ExtTutorialLogo.png" />
<icon file="graphics/TutorialTitle.png" name="TutorialTitle" />
<includefile source="xml/TutorialWindow.xml" />
</base>
</root>


TutorialWindow.xml


<?xml version="1.0" encoding="iso-8859-1"?>
<root>
<windowclass name="TutorialWindow">
<frame>campaignlistwithtabs</frame>
<placement>
<size width="300" height="400" />
</placement>
<sizelimits>
<minimum width="300" height="400" />
<dynamic />
</sizelimits>
<sheetdata>
<banner_campaign>
<icon>TutorialTitle</icon>
</banner_campaign>
<stringcontrol name="TutString1">
<anchored>
<position>insidetopleft</position>
<offset>60,40></offset>
<size>
<width>200</width>
</size>
</anchored>
<static>Here is a string for display.</static>
</stringcontrol>
<resize_campaignlistwithtabs />
<close_campaignlist />
</sheetdata>
</windowclass>
</root>

jreddin1
June 18th, 2015, 22:34
Holy crap.

Finally found a post where someone did the same thing as me -- Screwed up the versions in the "root" tag in extension.xml! OMG! I searched FOREVER and didn' find that dang thing.

Move along. Nothing to see here...

damned
June 19th, 2015, 03:45
Hey jreddin! doncha love banging your head on what seems like a brick wall!
Please DO post your error and fix as someone else WILL have this issue again - you can bet on it!

Nylanfs
June 19th, 2015, 16:54
Here this may be of some help.

https://2.bp.blogspot.com/_SjEjjxlJN0U/S-79G6JeLJI/AAAAAAAAA_A/Ecn5Yp2mkH8/s1600/anti-stress+kit.jpg

TASagent
June 19th, 2015, 17:16
Please DO post your error and fix as someone else WILL have this issue again - you can bet on it!

If I had a dollar for every "Never mind, I solved it" forum post I've encountered when trying to debug some code... I'd be able to hire someone to solve my problems for me.