-
July 2nd, 2019, 16:53 #1
Question about graphics_fonts.xml and color codes
Ok, I noticed in the CoreRPG graphics_fonts.xml file that some font <color value="FFFFFF"/> don't have the # at the beginning of the hex code. CoreRPG fonts without the hash are hotkey, reference-section, and reference-chapter. I checked the 5e fonts and found the same on the reference-header and several more.
Is this a typo or is there a reason for no hash in the hex?
Thanks
-
July 8th, 2019, 23:32 #2
Supreme Deity
- Join Date
- Mar 2007
- Posts
- 20,541
The hash symbol is optional. It's a holdover from the original code that required it.
The color values are specified as either RGB or ARGB, where two hex value letters are used for each value (alpha (transparency), red, blue, green).
Regards,
JPG
-
July 9th, 2019, 01:43 #3
Great, thanks for info. If I could ask a followup question. The bitmap image for the dicetower and dicetower drop (graphics/graphics_frames.xml) is shown as <bitmap>graphics/frames/dicetower.png</bitmap>. I'm guessing that this is a holdover as well. From my testing it looks like <bitmap file="graphics/frames/dicetower.png"/> format will work. I just wanted to confirm that it's ok to use the <bitmap file="" /> version, and not break anything down the line. To be honest, having that one element in a different format really aggravates my OCD. lol
Thanks again.
-
July 9th, 2019, 03:42 #4
Supreme Deity
- Join Date
- Mar 2007
- Posts
- 20,541
Many elements that are defined within tags, can also be defined as a specific attribute of the tag. (i.e. file/value/etc.) They are the same thing.
Regards,
JPG
-
July 9th, 2019, 22:55 #5
Archangel
- Join Date
- Apr 2008
- Location
- Virginia Beach
- Posts
- 3,096
Well not quite. You cannot get to attributes through the api unless there is a specific call, whereas you can see tags using the array notation in the documentation regarding accessing control xml. Away from my computer so can’t give the link.
However, using attributes seems to be more memory efficient because it isn’t in the table FG builds from control xml.
At least this is what I have seen Moon Wizard?
-
July 10th, 2019, 01:24 #6
Supreme Deity
- Join Date
- Mar 2007
- Posts
- 20,541
Yes, Bidmaron is correct. That is the difference between the two during runtime script access. (Text within XML tags is accessible; but attributes are not.) In terms of built-in behavior, they are the same.
Regards,
JPG
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks