Hello there. I am having a bit of a problem with a custom GUI controller. It stems to the point of when I change it in my mods .ini file the game crashes on load saying theres a Runtime Error!. I think this all back tracks for me making a custom font style for the main menu so I will post the code based on this. All of the code is held in a folder called MyModMenu.
In MyMod.ini I have this line of code.
Here is the custom GUI controller code.
Here is the code for the custom font.
Here is the code for the custom style.
Finally I have in my MainMenu class a GUIButton which uses MyModTextButton as its stylename. Any help for reading through my horrendously named code would be extremely helpful. Many thanks.
In MyMod.ini I have this line of code.
Code:
[Engine.Engine] GUIController=MyModMenu.MyModGUIController
Code:
class MyModGUIController extends UT2k4GUIController; defaultproperties { Begin Object Class=MyModMenu.jrFontMenu Name=MyModGUI_MenuFont End Object FontStack(12)=MyModGUI_MenuFont FONT_NUM=13 DefaultStyleNames(60)="MyModMenu.MyModTextButtonStyle" STYLE_NUM=61 }
Code:
class MyModFontMenu extends GUIFont; defaultproperties { KeyName="MyModMenuFont" FontArrayNames(0)="MyModTestFont.Arial" FontArrayNames(1)="MyModTestFont.Arial" FontArrayNames(2)="MyModTestFont.Arial" FontArrayNames(3)="MyModTestFont.Arial" FontArrayNames(4)="MyModTestFont.Arial" }
Code:
class MyModTextButtonStyle extends GUIStyles; defaultproperties { KeyName="MyModTextButton" FontNames(0)="MyModMenuFont" FontNames(1)="MyModMenuFont" FontNames(2)="MyModMenuFont" FontNames(3)="MyModMenuFont" FontNames(4)="MyModMenuFont" FontNames(5)="MyModMenuFont" FontNames(6)="MyModMenuFont" FontNames(7)="MyModMenuFont" FontNames(8)="MyModMenuFont" FontNames(9)="MyModMenuFont" FontNames(10)="MyModMenuFont" FontNames(11)="MyModMenuFont" FontNames(12)="MyModMenuFont" FontNames(13)="MyModMenuFont" FontNames(14)="MyModMenuFont" }
Finally I have in my MainMenu class a GUIButton which uses MyModTextButton as its stylename. Any help for reading through my horrendously named code would be extremely helpful. Many thanks.
Comment