I' am having trouble understanding the main menu font change. I look at code of other mods who have changed their main menu font like "Muralis" and "Neotokyo", and I don't know why, but in their main menu class they do not even create/define objects for each of the buttons.
Here is some advice from UDN, in changing the font by using guistyles.
My question is:
1. Where are these objects made (what class)?
2. How do these other mods not even declare objects and still work perfectly well?
Here is some code from default properties from the mod "Muralis", for reference.
Help would be appreciated.
Here is some advice from UDN, in changing the font by using guistyles.
Fonts, like styles, need to be registered with the GUIController. This is done differently than styles because the FontStack is an array of GUIFont objects as opposed to an array of String names. To put fonts into this array, you need to create objects in default properties and then assign them like so:
defaultproperties
{
Begin Object Class=fntGreekFont Name=GUIGreekFont
bFixedSize=false
End Object
FontStack(6)=GUIGreekFont
}
defaultproperties
{
Begin Object Class=fntGreekFont Name=GUIGreekFont
bFixedSize=false
End Object
FontStack(6)=GUIGreekFont
}
1. Where are these objects made (what class)?
2. How do these other mods not even declare objects and still work perfectly well?
Here is some code from default properties from the mod "Muralis", for reference.
Code:
//Muralis code defaultproperties { i_Background=BackgroundImage'MurGuiMainMenu.PageBackground' i_MuralisLogo=GUIImage'MurGuiMainMenu.ImgMuralisLogo' i_AscLogo=GUIImage'MurGuiMainMenu.ImgAscLogo' b_Practice=GUIButton'MurGuiMainMenu.PracticeButton' b_MultiPlayer=GUIButton'MurGuiMainMenu.MultiplayerButton' b_Host=GUIButton'MurGuiMainMenu.HostButton' b_Settings=GUIButton'MurGuiMainMenu.SettingsButton' b_Quit=GUIButton'MurGuiMainMenu.QuitButton' lblVersion=GUILabel'MurGuiMainMenu.VersionLabel' MenuSong="Muralis" bDisconnectOnOpen=True bAllowedAsLast=True __OnOpen__Delegate="MurGuiMainMenu.InternalOnOpen" __OnReOpen__Delegate="MurGuiMainMenu.MainReopened" __OnCanClose__Delegate="MurGuiMainMenu.CanClose" WinTop=0.00 WinHeight=1.00 bDebugging=True __OnKeyEvent__Delegate="MurGuiMainMenu.MyKeyEvent" }
Comment