Jump to content

Recommended Posts

Posted (edited)

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
Posted (edited)

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
Posted (edited)

 

 

fixed. thanks very much mate.

P.S is not 100% ready. some changes needed to be 100% ok.

if someone know another way please give me a advise. 

Edited by andy1984

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...