PDA

View Full Version : corerpg interface graphics questions



tahl_liadon
December 16th, 2023, 19:06
.
hi. not sure if this is the correct forum; plz move to appropriate one if necessary.

i have gone under the hood and replaced a good amount of graphics to create a themed interface (https://www.fantasygrounds.com/forums/showthread.php?52730-pathfinder-ruins-of-azlant-fg-interface-and-mod&p=700460&viewfull=1#post700460).

i am running into a few things that are puzzling and i can't figure them out. in the attached pic (below):

- the graphics in the magenta areas -- they are displaying as dark and not see-able; the original graphics are white. what is going on here?
- the icons in the yellow area -- where are these (overlaying icons?) files, as i am not able to locate them in the 'graphics' directory?

thx for any insight.



https://www.fantasygrounds.com/forums/attachment.php?attachmentid=59512

mattekure
December 16th, 2023, 19:57
The two buttons in yellow are:
windowmenubar_close.png
windowmenubar_help.png

located in the graphics\icons\ directory

mattekure
December 16th, 2023, 20:02
I believe the icons colors are set using the ColorManager functions like:

ColorManager.resetUIColors();

ColorManager.setSidebarCategoryIconColor("A3A29D");
ColorManager.setSidebarCategoryTextColor("A3A29D");
ColorManager.setSidebarRecordIconColor("272727");
ColorManager.setSidebarRecordTextColor("272727");
ColorManager.setButtonContentColor("FFFFFF");
ColorManager.setWindowMenuIconColor("31352E");

Moon Wizard
December 16th, 2023, 23:13
In addition to what @mattekurre provided, you'll need to define:

framedef name="windowmenubar_button"
framedef name="windowmenubar_button_down"

Regards,
JPG

tahl_liadon
December 17th, 2023, 23:30
.
i appreciate the info... but it's kinda outside of my experience to know where /how to apply codes.

i was hoping it was a matter of swapping out graphics. thx anyway.

mattekure
December 17th, 2023, 23:48
.
i appreciate the info... but it's kinda outside of my experience to know where /how to apply codes.

i was hoping it was a matter of swapping out graphics. thx anyway.

A good example would be to unzip up one of the provided themes and see how its done. for exmaple, the FG leather theme can be unzipped and take a look at the extension.xml file. it contains a perfect example of how to use the functions I listed. you can also look inside the graphics_frames.xml file for an example of the framedef definitions. they are not terribly complex.



<root version="3.0">
<announcement text="SmiteWorks Leather Theme for Fantasy Grounds\rCopyright 2019 Smiteworks USA, LLC." font="emotefont" icon="rulesetlogo_CoreRPG" />

<properties>
<name>Theme: FG Leather</name>
<author>SmiteWorks</author>
<loadorder>50</loadorder>
<ruleset>Any</ruleset>
</properties>

<base>
<script name="DesktopThemeLeather">
function onInit()
ColorManager.resetUIColors();

ColorManager.setSidebarCategoryIconColor("A3A29D");
ColorManager.setSidebarCategoryTextColor("A3A29D");
ColorManager.setSidebarRecordIconColor("332A25");
ColorManager.setSidebarRecordTextColor("332A25");
ColorManager.setButtonContentColor("FFFFFF");
ColorManager.setWindowMenuIconColor("332A25");
end
</script>

tahl_liadon
December 18th, 2023, 21:29
.
thx much @mattekure for pointing me in the right direction.

with a little trial-and-error, i managed to apply desired colors / graphics (texts / icons green is currently a bit intense, but i know where to adjust now).

cheers!



https://www.fantasygrounds.com/forums/attachment.php?attachmentid=59535

Moon Wizard
December 18th, 2023, 23:11
As a suggestion, I might simplify the buttonup/buttondown frames in your theme too. They are a bit noisy and make the font harder to read on the button.

Regards,
JPG

tahl_liadon
August 5th, 2024, 15:11
A good example would be to unzip up one of the provided themes and see how its done. for exmaple, the FG leather theme can be unzipped and take a look at the extension.xml file. it contains a perfect example of how to use the functions I listed. you can also look inside the graphics_frames.xml file for an example of the framedef definitions. they are not terribly complex.



<root version="3.0">
<announcement text="SmiteWorks Leather Theme for Fantasy Grounds\rCopyright 2019 Smiteworks USA, LLC." font="emotefont" icon="rulesetlogo_CoreRPG" />

<properties>
<name>Theme: FG Leather</name>
<author>SmiteWorks</author>
<loadorder>50</loadorder>
<ruleset>Any</ruleset>
</properties>

<base>
<script name="DesktopThemeLeather">
function onInit()
ColorManager.resetUIColors();

ColorManager.setSidebarCategoryIconColor("A3A29D");
ColorManager.setSidebarCategoryTextColor("A3A29D");
ColorManager.setSidebarRecordIconColor("332A25");
ColorManager.setSidebarRecordTextColor("332A25");
ColorManager.setButtonContentColor("FFFFFF");
ColorManager.setWindowMenuIconColor("332A25");
end
</script>


can this bit be put somewhere in, or as, a file within the graphics directory of corerpg.pak, as opposed to creating a theme?

Trenloe
August 5th, 2024, 15:58
can this bit be put somewhere in, or as, a file within the graphics directory of corerpg.pak, as opposed to creating a theme?
The ColorManager functions are in CoreRPG to allow devs to change the default values in their own code. The code you show doesn't need to be in CoreRPG - if a dev wants to change the defaults, they use these functions in their own code.

Refer to scripts\manager_color.lua in the CoreRPG ruleset for the defaults and the functions to change those defaults.

Moon Wizard
August 5th, 2024, 16:10
If you are replacing the sidebar frames, then you should specify the sidebar colors.
If you are replacing the buttonup/buttondown frame, then you should specify the button content color.
If you are replacing the window menu button frame (i.e. top of each window), then you should specify the window menu icon color.

If you are not replacing any of those frames, then you do not need that code.

Regards,
JPG

tahl_liadon
August 7th, 2024, 14:00
Refer to scripts\manager_color.lua in the CoreRPG ruleset for the defaults and the functions to change those defaults.

perfect. thx!