class CollectionSystemWndProgressComponent extends UICommonAPI;

var WindowHandle Me;
var string m_WindowName;
var L2Util util;
var ButtonHandle ItemBTN;
var TextBoxHandle ProgressText;
var StatusRoundHandle Progress;

delegate DelegateOnButtonClick (string Name);

function Initialize ()
{
	util = L2Util(GetScript("L2Util"));
	ItemBTN = GetButtonHandle(m_WindowName $ ".ItemBTN");
	Progress = GetStatusRoundHandle(m_WindowName $ ".progress");
}

function Init (string WindowName, string _title, int Num)
{
	m_WindowName = WindowName;
	Me = GetWindowHandle(m_WindowName);
	Initialize();
	GetTextBoxHandle(m_WindowName $ ".TitleText").SetText(_title);
}

function SetPoint (int Min, int Max)
{
	Progress.SetPoint(Min,Max);
	ProgressText.SetText(string(Min) $ "/" $ string(Max));
}

function SetEnable ()
{
	ItemBTN.EnableWindow();
}

function SetDisable ()
{
	ItemBTN.DisableWindow();
}

event OnClickButton (string btnName)
{
	Debug("OnClickButton" @ btnName);
	switch (btnName)
	{
		case "ItemBTN":
			break;
	}
}

function SetTooltip (bool isActivated)
{
	local CustomTooltip t;

	util.setCustomTooltip(t);
	util.ToopTipMinWidth(10);
	if ( isActivated )
	{
		GetButtonHandle(m_WindowName $ ".KeyItemBTN").SetTooltipCustomType(MakeTooltipSimpleText(GetSystemString(13402)));
	} else {
		GetButtonHandle(m_WindowName $ ".KeyItemBTN").SetTooltipCustomType(MakeTooltipSimpleText(GetSystemString(13401)));
	}
}

function ClearAll ()
{
}

