PDA

View Full Version : Adjusting the chat area of the chatbox.



Wintermute
August 6th, 2019, 23:58
I'm wanting to adjust the margins of the chat area in the chatbox. I'm wanting to make sure that all the text falls inside the white box. Can someone point me in a direction or give me a search term. Thanks

28313

Moon Wizard
August 7th, 2019, 00:17
That's a small area. You will end up getting a lot of text/dice wrapping.

In order to change, you would need an extension that overrode the "basicchatwindow" template to make it the new size.

Regards,
JPG

Wintermute
August 7th, 2019, 02:35
Thanks for the help. I was looking in the wrong place and the math wasn't adding up. Once I found the original offset of 20,25, everything worked. lol The image was just an exaggerated example.

Could you answer a question about XML inheritance in FG? When overriding an element, does FG delete the old and then add the new or does it just merge the two overwriting existing? I'm not sure that's the clearest way to ask that. So lets try it this way... (please note I would never write code this way)

Does this:

<framedef name="windowtitle">
<bitmap file="graphics/frames/windowtitle.png"/>
</framedef>

AND

<framedef name="windowtitle">
<offset>25,0,30,0</offset>
</framedef>



equal this?

<framedef name="windowtitle">
<bitmap file="graphics/frames/windowtitle.png"/>
<offset>25,0,30,0</offset>
</framedef>

or does it just take the last one encountered in the file? Thanks.

damned
August 7th, 2019, 05:02
you should be using merge="join"

Moon Wizard
August 7th, 2019, 05:11
The merge attribute is only supported in specific cases. See these Developer Guide topics:
https://www.fantasygrounds.com/wiki/index.php/Developer_Guide_-_Rulesets_-_Layering
https://www.fantasygrounds.com/wiki/index.php/Developer_Guide_-_Rulesets_-_Templates

Regards,
JPG

Bidmaron
August 8th, 2019, 04:53
So for the poster’s framedef example, what is the result?

Wintermute
August 8th, 2019, 17:07
I did some testing this morning and the second element would be the active one with incomplete data.

I used the following code.

<framedef name = "chatbox" >
<!-- No offset so chatbox image isn't visible. -->
<bitmap file="graphics/frames/chatbox10.png"/>
</framedef>

<!-- I tried with and without merge -->
<framedef name = "chatbox" merge="join">
<offset>10,100,10,10</offset>
</framedef>


I was unable to get the image to display by having it split across two incomplete framedef entries. Framedef does not appear to be one of the merge-able ones.

Moon Wizard
August 8th, 2019, 17:43
Framedef does not support the merge attribute. However, file references will fall through to the previous layer, so you don't need to include the graphic again if you're re-using the one from the base ruleset.

Regards,
JPG