Hey, I've been trying to create my own HUD with my own fonts but of course I am running into trouble. I am following along with how the DoomStatusBar class added it's own fonts in it's Init() function but I keep getting a "expression must be a modifiable value" error.
Here is my code.
class TheLastIconHUD : BaseStatusBar
{
HUDFont visor;
HUDFont damageEffects;
Question
ArrivedHero
Hey, I've been trying to create my own HUD with my own fonts but of course I am running into trouble. I am following along with how the DoomStatusBar class added it's own fonts in it's Init() function but I keep getting a "expression must be a modifiable value" error.
Here is my code.
class TheLastIconHUD : BaseStatusBar
{
HUDFont visor;
HUDFont damageEffects;
override void Init()
{
Super.Init();
SetSize(0, 1920, 1080);
Font fnt = "TESTFONT";
visor = HUDFont.Create(fnt, fnt.GetCharWidth("0"), Mono_CellLeft, 1, 1);
fnt = "DAZEFONT";
damageEffects = HUDFont.Create(fnt);
}
override void Draw(int state, double TicFrac)
{
super.Draw(state, TicFrac);
DrawImage("hud0", (0, 0), DI_ITEM_OFFSETS);
}
}
What exactly am I doing wrong?
Edited by ArrivedHeroShare this post
Link to post
1 answer to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.