Jump to content

Interface Multisell Window Help


Recommended Posts

Hello MxC!

 

I want to add to multisell window next to item needed count, the item count that the player have in his inventory. For ex if you need 15000 adena to buy x item price to be  like 15000 (100000000). Check image bellow.

image.png.92d5f1ea27fbdc09a730c77ef179f17e.png

 

I know that this is interface matter and maybe needed some core support. Anyone can give me a hand? I have decrypted and allready edited interface files for my needs. This is the last addon i would like to have.

Thanks in advance

Edited by andy1984
Link to comment
Share on other sites

One idea which i just tested is just replace `UIAPI_MULTISELLNEEDEDITEM` to `UIAPI_HTMLCTRL` and just create how  want via html code.

https://prnt.sc/TaxhUdUma-U1

 

function OnClickItem( String strID, int index )			// ItemWindow
{
	local int i;
	local int Index2;
	local int have;
	local string param;
	local string html;
	local string multi;
	local ItemInfo a_ItemInfo;
	InventoryItem = ItemWindowHandle(GetHandle("InventoryWnd.InventoryItem"));
	
	class'UIAPI_MULTISELLITEMINFO'.static.Clear("MultiSellWnd.ItemInfo");
	class'UIAPI_MULTISELLNEEDEDITEM'.static.Clear("MultiSellWnd.NeededItem");
	//debug("OnClickItem : " $ strID $ ", index : " $ index );
	if( strID == "ItemList" )
	{
		if( index >= 0 && index < m_itemList.Length )
		{
			for( i=0 ; i < m_itemList[index].NeededItemList.Length ; ++i )
			{
				have = 0;
				param = "";
				//ParamAdd( param, "Name", m_itemList[index].NeededItemList[i].Name $ "\r\n99999");
				//ParamAdd( param, "ID", string(m_itemList[index].NeededItemList[i].ID ));
				//ParamAdd( param, "Num", string(m_itemList[index].NeededItemList[i].Count ));
				//ParamAdd( param, "Icon", m_itemList[index].NeededItemList[i].IconName );
				//ParamAdd( param, "enchant", string(m_itemList[index].NeededItemList[i].Enchant) );
				//ParamAdd( param, "CrystalType", string(m_itemList[index].NeededItemList[i].CrystalType) );
				//ParamAdd( param, "ItemType", string(m_itemList[index].NeededItemList[i].ItemType) );

				//debug("AddData " $ param );
				//class'UIAPI_MULTISELLNEEDEDITEM'.static.AddData("MultiSellWnd.NeededItem", param);
					Index2 = InventoryItem.FindItemWithClassID(m_itemList[index].NeededItemList[i].ID);
					if (Index2 > -1) {
					InventoryItem.GetItem(Index2,a_ItemInfo);
						have = a_ItemInfo.ItemNum;
					}
				multi = multi $ "<tr><td width=32><button width=32 height=32 back=\""$m_itemList[index].NeededItemList[i].IconName$"\" fore=\""$m_itemList[index].NeededItemList[i].IconName$"\"></td><td width=188 align=left><table cellspacing=0 cellpadding=0 width=188><tr><td>"$m_itemList[index].NeededItemList[i].Name$"</td></tr><tr><td>x "$string(m_itemList[index].NeededItemList[i].Count )$" (x"$string(have)$")</td></tr></table></td></tr>";
			}
			html = "<html><body><table width=220>"$multi$"</table></body></html>";
			class'UIAPI_HTMLCTRL'.static.LoadHtmlFromString("MultiSellWnd.NeededItemHtml", html);
			for( i=0 ; i < m_itemList[index].NeededItemNum ; ++i )
			{
				class'UIAPI_MULTISELLITEMINFO'.static.SetItemInfo("MultiSellWnd.ItemInfo", i, m_itemList[index].ItemInfoList[i] );
			}

 

xdat:

https://prnt.sc/1GenJx567s-N

Edited by wongerlt
Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now


×
×
  • Create New...