manups4e / ScaleformUI

ScaleformUI is a GTA menu styled API made with custom Scaleforms to be lighter, faster and visually better
Other
147 stars 49 forks source link

[UIMenuItem] Enable font to be changed on Right Label #76

Closed Local9 closed 1 year ago

Local9 commented 1 year ago

Example from GTA:O Menu, Rockstars name shows in a different font.

image

Local9 commented 1 year ago

Incorrectly mentioned in the wrong PR

manups4e commented 1 year ago

this should be made via \ TEXT \ tags 🤔 iirc but i'll take a look asap

Local9 commented 1 year ago

Tested this in the UIMenuFreemodeDetailsItem and saw no change to the font.

manups4e commented 1 year ago

taken from R* scaleforms

    static function parseHTMLForFonts(str, stdPtSize)
    {
        str = str.split("<C>").join("<FONT FACE=\'" + com.rockstargames.gtav.utils.GTAVUIConfig.CONDENSED_FONT + "\' SIZE=\'" + (stdPtSize + 3) + "\'>");
        str = str.split("</C>").join("<FONT FACE=\'" + com.rockstargames.gtav.utils.GTAVUIConfig.DEFAULT_FONT + "\' SIZE=\'" + stdPtSize + "\'>");
        return str;
    }
Local9 commented 1 year ago

Recommend testing it, as I saw no change in Left or Right labels.

manups4e commented 1 year ago

integrated in next major version! https://github.com/manups4e/ScaleformUI/commit/758a0fcf829e756aca616e55849080d9c68b7e07