PDA

View Full Version : Portrait tooltip and clickable field not sizing as planned



Zarestia
July 27th, 2020, 21:11
Hi,

I am trying to make the portrait in the 3.5E ruleset a bit bigger. For simplicity I have changed the portrait.png and portrait_mask.png images to be larger (141px & 137px).
The following code was changed by me:

record_char.xml

<sheetdata>
<button_charactivate name="speak">
<bounds>-41,30,23,22</bounds>
</button_charactivate>

<token_char name="token">
<bounds>-86,23,40,40</bounds>
</token_char>

<frame_char name="portraitframe">
<bounds>200,200,180,180</bounds>
</frame_char>
<genericcontrol>
<anchored to="portraitframe" position="insidetopleft" width="141" height="141" offset="10,10" />
<icon>charlist_base</icon>
<disabled />
</genericcontrol>
<portrait_charlocal name="localportrait">
<anchored to="portraitframe" position="insidetopleft" width="141" height="141" offset="10,10" />
<invisible />
</portrait_charlocal>
<portrait_char name="portrait">
<anchored to="portraitframe" position="insidetopleft" width="141" height="141" offset="10,10" />
</portrait_char>


The main code in record_char_main.xml was commented out for better visibility.
The blue rectangle is the frame, just for illustration, the white circle is the new portrait.png.

Problems:
- When the frame is in the center of the sheet you can't see the "Portrait" tooltip of the portrait_char template. You can neither click on the circle to pop up the portrait selection.
- When the frame is in the top left of the sheet (like in DND 5E), you can see the tooltip "Portrait" and click just the top half of the circle, like being cut in half horizontally.
- The same happens with a rectangular icon or bounds instead of anchors

In the lua scripts of the template_char.xml I can only see "x" and "y" parameters used and thought they would take the value of the corresponding widht and height.

Anyone got an idea how the tooltip and clickable field of the portrait can be matched to a bigger portrait?

38104

Zarestia
July 29th, 2020, 22:01
After some more testing I found the culprit. The clickable field gets cut
horizontally in half because of the sub-windows blocking the lower part.

If I change the Y bounds from 65 to e.g. 110 it works.


<subwindow name="main">
<bounds>0,110,-1,-20</bounds>
<class>charsheet_main</class>
</subwindow>