///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// by Silent - silentl2.com : SILENT API
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
class UISilentAPI extends UICommonAPI;
function WindowHandle GetWindowHandle (string WindowName)
{
local WindowHandle Handle;
Handle = GetHandle(WindowName);
return Handle;
}
function ButtonHandle GetButtonHandle (string WindowName)
{
local ButtonHandle Handle;
Handle = ButtonHandle(GetHandle(WindowName));
return Handle;
}
function ItemWindowHandle GetItemWindowHandle (string WindowName)
{
local ItemWindowHandle Handle;
Handle = ItemWindowHandle(GetHandle(WindowName));
return Handle;
}
function TextureHandle GetTextureHandle (string WindowName)
{
local TextureHandle Handle;
Handle = TextureHandle(GetHandle(WindowName));
return Handle;
}
function AnimTextureHandle GetAnimTextureHandle (string WindowName)
{
local AnimTextureHandle Handle;
Handle = AnimTextureHandle(GetHandle(WindowName));
return Handle;
}
function TextBoxHandle GetTextBoxHandle(string WindowName)
{
local TextBoxHandle Handle;
Handle = TextBoxHandle(GetHandle(WindowName));
return Handle;
}
function DebugColor(string param, string color)
{
Class'UIAPI_TEXTLISTBOX'.static.AddString("ChatWnd.NormalChat",param,SetColor(color));
}
function ShowOnScreenMessage (string MessageText)
{
local string out_Param;
ParamAdd(out_Param,"MsgType",string(1));
ParamAdd(out_Param,"MsgNo",string(0));
ParamAdd(out_Param,"WindowType",string(2));
ParamAdd(out_Param,"FontSize","20");
ParamAdd(out_Param,"FontType",string(0));
ParamAdd(out_Param,"MsgColor","1");
ParamAdd(out_Param,"MsgColorR",string(240));
ParamAdd(out_Param,"MsgColorG",string(227));
ParamAdd(out_Param,"MsgColorB",string(200));
ParamAdd(out_Param,"ShadowType","0");
ParamAdd(out_Param,"BackgroundType","0");
ParamAdd(out_Param,"LifeTime",string(1000));
ParamAdd(out_Param,"AnimationType","1");
ParamAdd(out_Param,"Msg",MessageText);
ExecuteEvent(140,out_Param);
}
function Color SetColor (string m_color)
{
local Color RGB;
RGB.A = 255;
switch (m_color)
{
case "Goldlite":
RGB.R = 240;
RGB.G = 227;
RGB.B = 200;
break;
case "BlueLite":
RGB.R = 0;
RGB.G = 242;
RGB.B = 255;
break;
case "RedLite":
RGB.R = 255;
RGB.G = 80;
RGB.B = 80;
break;
case "Grey":
RGB.R = 180;
RGB.G = 180;
RGB.B = 180;
break;
case "GreyLight":
RGB.R = 220;
RGB.G = 220;
RGB.B = 220;
break;
case "GreyDark":
RGB.R = 100;
RGB.G = 100;
RGB.B = 100;
break;
case "Yellow":
RGB.R = 255;
RGB.G = 255;
RGB.B = 0;
break;
case "Red":
RGB.R = 255;
RGB.G = 0;
RGB.B = 0;
break;
case "Blue":
RGB.R = 0;
RGB.G = 0;
RGB.B = 255;
break;
case "Green":
RGB.R = 0;
RGB.G = 255;
RGB.B = 0;
break;
case "Orange":
RGB.R = 230;
RGB.G = 153;
RGB.B = 77;
break;
case "System":
RGB.R = 176;
RGB.G = 155;
RGB.B = 121;
break;
case "Amber":
RGB.R = 218;
RGB.G = 165;
RGB.B = 32;
break;
case "White":
RGB.R = 255;
RGB.G = 255;
RGB.B = 255;
break;
case "Dim":
RGB.R = 177;
RGB.G = 173;
RGB.B = 172;
break;
case "Magenta":
RGB.R = 255;
RGB.G = 0;
RGB.B = 255;
break;
case "Brown":
RGB.R = 176;
RGB.G = 155;
RGB.B = 121;
break;
case "Black":
RGB.R = 0;
RGB.G = 0;
RGB.B = 0;
break;
default:
RGB.R = 255;
RGB.G = 255;
RGB.B = 255;
break;
}
return RGB;
}
function CustomTooltip SetTooltip(string Text)
{
local CustomTooltip Tooltip;
local DrawItemInfo info;
Tooltip.DrawList.Length = 1;
info.eType = DIT_TEXT;
info.t_strText = Text;
Tooltip.DrawList[0] = info;
return Tooltip;
}
function ShowHideWindow(string param)
{
if ( IsShowWindow(param) )
{
HideWindow(param);
PlayConsoleSound(IFST_WINDOW_CLOSE);
} else {
ShowWindowWithFocus(param);
PlayConsoleSound(IFST_WINDOW_OPEN);
}
}
defaultproperties{}