KF2-Server-Extension/ServerExt/Classes/KFGUI_Button.uc

33 lines
666 B
Ucode
Raw Normal View History

2017-10-20 02:00:49 +00:00
Class KFGUI_Button extends KFGUI_Clickable;
var() Canvas.CanvasIcon OverlayTexture;
var() string ButtonText;
var() color TextColor;
var() Canvas.FontRenderInfo TextFontInfo;
var() byte FontScale,ExtravDir;
var bool bIsHighlighted;
function DrawMenu()
{
Owner.CurrentStyle.RenderButton(Self);
}
2020-11-28 20:04:55 +00:00
function HandleMouseClick(bool bRight)
2017-10-20 02:00:49 +00:00
{
PlayMenuSound(MN_ClickButton);
2020-11-28 20:12:58 +00:00
if (bRight)
2017-10-20 02:00:49 +00:00
OnClickRight(Self);
else OnClickLeft(Self);
}
2020-11-28 20:04:55 +00:00
Delegate OnClickLeft(KFGUI_Button Sender);
Delegate OnClickRight(KFGUI_Button Sender);
2017-10-20 02:00:49 +00:00
defaultproperties
{
ButtonText="Button!"
TextColor=(R=255,G=255,B=255,A=255)
TextFontInfo=(bClipText=true,bEnableShadow=true)
FontScale=1
2023-05-14 02:49:12 +00:00
}