PDA

View Full Version : Close button



Xarxus
December 15th, 2023, 16:33
I can't understand the differences between the two buttons. It seems both derive from close, buth they are different, so what am I missing (coordinates aside)?
<template name="close_charselect">
<close>
<anchored>
<top offset="1" />
<right offset="-1" />
</anchored>
</close>
</template>

<template name="close_recordsheet">
<close>
<anchored>
<top offset="0" />
<right offset="0" />
</anchored>
</close>
</template>

<template name="close_utilitybox">
<close>
<anchored>
<top offset="0" />
<right offset="0" />
</anchored>
</close>
</template>

Moon Wizard
December 15th, 2023, 20:03
close_charselect and close_utilitybox are both deprecated with the latest release; so setting those templates will not change anything.

There are two new templates (windowmenubar_utilitybox, windowmenubar_charselect) for laying out the new window menu buttons. The recordsheet top-level window frames have not been migrated yet, but that's in the pipeline.

Regards,
JPG

Xarxus
December 16th, 2023, 14:02
I still do not understand the differences (see the image).

https://www.fantasygrounds.com/forums/attachment.php?attachmentid=59509&stc=1&d=1702735089

<template name="windowmenubar">
<subwindow>
<anchored position="insidetop" />
<class>windowmenubar</class>
<activate />
</subwindow>
</template>

<template name="windowmenubar_charselect">
<windowmenubar>
<anchored offset="-1,1" />
</windowmenubar>
</template>

<template name="windowtitlebar_utilitybox">
<windowtitlebar>
<anchored offset="0,0" />
</windowtitlebar>
</template>59509

Moon Wizard
December 16th, 2023, 22:29
That's the difference between the old templates/graphics with the new templates/graphics.
We are transitioning from the old composited fixed button graphics to a dynamically generated window menu bar that can be more easily themed and added to.

In order to minimize chaos across rulesets/extensions, I am slowly converting top-level window types to the new layout and features in stages. Thus, you are seeing both right now, depending on the window you are looking at.

Regards,
JPG

Xarxus
December 17th, 2023, 10:49
Ok, it's dynamic, but where's the code? How can I decide which type my windows should show?

Moon Wizard
December 18th, 2023, 06:03
The menu bar you should use is tied to the top-level window frame used. Basically, you adjust the menu bar positioning to match the graphic you are using for the frame definition, so that everything appears to line up.

Here's a summary of the suggested top-level window frames; and how they should be used:
https://fantasygroundsunity.atlassian.net/wiki/spaces/FGCP/pages/2172420127/UI+Standards+-+Rulesets+and+Extensions#Top-Level-Windows

Regards,
JPG