PDA

View Full Version : Window List Issue



Nightstride
February 20th, 2021, 05:17
I've been using ruleset wizard to convert cyberpunk red into fantasy grounds (unity) for my own use and to have a fun little side project.

Overall things are going pretty well, however I'm experiencing a weird issue with anchored window lists. I've attached an image to demonstrate, but when the character sheet window is untouched, things look good (see left side of attached image). However if the width of the character sheet is extended, the first row of the list gets cut off (see the right side of the attached image) and it's only the first row. This issue does not occur in the opposite direction. If you add an item to the window list (or reload the ruleset), the top item width updates to what it should be.

Does anyone have ideas for how to fix this? I'm not afraid to dig into xml or lua if necessary.

I would share the .rwp file, but given the nature of what it is, I'm not exactly sure if I can...

Moon Wizard
February 20th, 2021, 20:19
I'm not familiar with ruleset wizard; but it looks like an anchoring issue in the weapon name field in the weapon window class.

If you're using some sort of ruleset wizard specific piece, you'll have to ask the community developer that makes the ruleset wizard. (He's on Discord server a fair amount; and there is a channel there.)
Otherwise, you'll need to look at how the right anchor is defined for the weapon name; and that it is dynamically linked to the right edge; either directly or by anchoring off another controls dynamically anchored to right edge. There are several examples in the various built-in rulesets in FG.

Regards,
JPG

Nightstride
February 20th, 2021, 22:55
Deleted my old message due to it referencing on improper fix.

The problem appears to have been exactly what you said. I added the following from CoreRpg under the windowclass tag and things were good. Now I'm going to try figuring out how to do generate it via ruleset wizard



<margins control="0,0,0,2" />


So thanks for the input.

Nightstride
February 21st, 2021, 00:58
Figured it out in ruleset wizard. I had to add a custom property under the general section of the root window. Here were my parameters:

Attributes : <empty>
Property Element: margins
Property Name : control
Property Value : 0,2,0,0

the Property Value appears to require at least one number above 0 (In my case, I have a 2 px margin on top).

Here's the code it generated under the windowclass



<margins>
<control>0,2,0,0</control
</margins>

psicodelix
February 21st, 2021, 16:09
Hi zmtoman,

could you send me the project file so I can fix this problem in the wizard?

Nightstride
February 21st, 2021, 17:47
Hi zmtoman,

could you send me the project file so I can fix this problem in the wizard?

I just sent you a dm with the stuff.

psicodelix
February 21st, 2021, 20:15
I don't understand where the problem could be, nor why it is solved by adding margins to the window. the generated code is pretty straightforward, it should work fine:


<windowclass name="listWeapon">
<placement>
<size height="20" width="309" />
</placement>
<sheetdata>
<stringfield name="weaponName">
<frame>
<name>fieldSimple</name>
<offset>5,0,5,0</offset>
</frame>
<bounds>5,0,-191,20</bounds>
<lineoffset default="on">2</lineoffset>
</stringfield>
...


It seems some weird behaviour of the FG client, maybe some FG guru can give us some light about this.