Difference between revisions of "LavishGUI:lguifont (Data Type)"

From Lavish Software Wiki
Jump to navigation Jump to search
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
== Description ==
 
== Description ==
This data type provides and controls data for ISUI fonts.
+
This data type provides and controls data for LGUI fonts.
 
== Members ==
 
== Members ==
 
* [[DataType:int|int]] '''Height''' : font height
 
* [[DataType:int|int]] '''Height''' : font height
Line 10: Line 10:
 
*'''SetName['''text''']''': text can be any acceptable font interface name, default are terminal, fixedsys, and "bradley hand itc". default fonts are located in inner space\interface\defaultfonts.xml
 
*'''SetName['''text''']''': text can be any acceptable font interface name, default are terminal, fixedsys, and "bradley hand itc". default fonts are located in inner space\interface\defaultfonts.xml
 
*'''SetColor['''#''']''':  set the color of the font with <#> in hex format <e.g. FFFFFF00>
 
*'''SetColor['''#''']''':  set the color of the font with <#> in hex format <e.g. FFFFFF00>
 +
*'''EnableBold''': Enables bold
 +
*'''DisableBold''': Disables bold
 +
*'''ToggleBold''': Toggles bold status
 +
== Inherits ==
  
== Inherits ==
+
[[LavishGUI:lguielement_%28Data_Type%29|lguielement]]
[[ISSession:isuielement (Data Type)|isuielement]]
 
  
 
== Returns ==
 
== Returns ==
Same as '''isuielement.Name'''
+
Same as '''lguielement.Name'''
  
 
== Examples ==
 
== Examples ==

Latest revision as of 20:42, 9 December 2005

Description

This data type provides and controls data for LGUI fonts.

Members

  • int Height : font height
  • string Name : name of the font
  • int Color : font color

Methods

  • SetHeight[#]: 0-96 - if you use 0 it will set it to the default for the font
  • SetName[text]: text can be any acceptable font interface name, default are terminal, fixedsys, and "bradley hand itc". default fonts are located in inner space\interface\defaultfonts.xml
  • SetColor[#]: set the color of the font with <#> in hex format <e.g. FFFFFF00>
  • EnableBold: Enables bold
  • DisableBold: Disables bold
  • ToggleBold: Toggles bold status

Inherits

lguielement

Returns

Same as lguielement.Name

Examples

Change a font for an element

  • UIElement[main hud].FindChild[fps].Font:SetName[fixedsys]
This command changes the font of element "fps" to fixedsys

Change a font color to red

  • UIElement[main hud].FindChild[fps].Font:SetColor[ffff0000]
This command changes the font color of element "FPS" to FFFF0000 (red)

Change a font height

  • UIElement[main hud].FindChild[fps].Font:SetHeight[30]
This command changes FPS's font height to 30

Display the font type

  • echo Font Type: ${UIElement[main hud].FindChild[fps].Font.Name}
Output
Font Type: terminal

Display the color of an element

  • echo Color(in hex): ${UIElement[main hud].FindChild[fps].Font.Color.Hex}
Output
Color(in hex): ffff0000

See Also