DRLA-RPG/ZSCRIPT.txt

45 lines
1.1 KiB
Plaintext

version "3.7.2"
// Base
#include "ZScript/Util.zs"
#include "ZScript/Player.zs"
#include "ZScript/Weapon.zs"
#include "ZScript/StatusBar.zs"
// Structs
#include "ZScript/Structs.zs"
class RLHUDHandler : StaticEventHandler
{
RLBasePlayer RLPlayer;
Vector2 Size;
override void OnRegister()
{
Super.OnRegister();
RLPlayer = RLBasePlayer(Players[0].MO);
Size = (320, 240);
}
override void RenderOverlay(RenderEvent e)
{
Super.RenderOverlay(e);
// DrawTexture("MEDIA0", 0, 20);
// DrawBigText("" .. RLPlayer.Medikit, "Brick", 16, 16);
}
ui void DrawBigText(string text, Color color, float x, float y) const
{
Screen.DrawText(Font.FindFont("BIGFONT"), color, x, y, text, DTA_VirtualWidth, int(Size.X), DTA_VirtualHeight, int(Size.Y));
}
ui void DrawTexture(string texture, float x, float y) const
{
Screen.DrawTexture(TexMan.CheckForTexture(texture, TexMan.Type_Any), true, x, y, DTA_VirtualWidth, int(Size.X), DTA_VirtualHeight, int(Size.Y), DTA_CenterOffset, true);
}
}