// Awake void Awake() { ms_kIstance = this; tooltipTwoPosition_1.dlgPosState = TooltipObject.ePOSITION.LEFT; tooltipTwoPosition_2.dlgPosState = TooltipObject.ePOSITION.RIGHT; tooltipOnePosition.dlgPosState = TooltipObject.ePOSITION.CENTER; }
// Set Tooltip private void SetTooltip( TooltipMgr.eOPEN_DLG _openDlgState, TooltipObject tooltipObject, sITEM _sitem, bool isRandomItemAuto, bool isEquip, MonoBehaviour script, string method, eCommonState commonState, float fOffsetZ) { if( null == _sitem) return; Item _item = ItemMgr.ItemManagement.GetItem( _sitem.nItemTableIdx); if( null == _item) return; AddTooltipInfo( tooltipObject, _sitem, isRandomItemAuto, isEquip); AddTooltipSet( tooltipObject, _item); if( _item.ItemData.CheckPetItem() == false) AddTooltipEnchant( tooltipObject, _sitem); AddTooltipGauge (tooltipObject, _sitem, _item.ItemData); AddTooltipCommon( tooltipObject, _item, _sitem, script, method, commonState); tooltipObject.ResetPosition( _openDlgState, fOffsetZ); }
//$yde public void OpenTooltip( TooltipMgr.eOPEN_DLG _openDlgState, sITEM _sitem, MonoBehaviour script_1, string method_1, float fOffsetZ) { if( null == _sitem) { Debug.LogError( "TooltipMgr::OpenSetTooltip() [ null == _sitem ]"); return; } Clear(); SetTooltip( _openDlgState, tooltipOnePosition, _sitem, false, false, script_1, method_1, eCommonState.Buy, fOffsetZ); }
public void OpenShopTooltip( TooltipMgr.eOPEN_DLG _openDlgState, RealItem _realItem_1, Item _item, MonoBehaviour script, string method, int buyAmount = -1, int tradeItemID = -1, int tradeItemCount = -1) { if( null == _item) { Debug.LogError( "TooltipMgr::OpenShopTooltip() [ null == _sitem ]"); return; } Clear(); TooltipObject _temp = null; if( null != _realItem_1) { SetTooltip( _openDlgState, tooltipTwoPosition_1, _realItem_1.sItem, true, true, null, "", eCommonState.NONE, 0f); _temp = tooltipTwoPosition_2; } else { _temp = tooltipOnePosition; } AddTooltipInfo( _temp, _item, false, false); AddTooltipSet( _temp, _item ); TooltipCommDlg tempCommon = AddTooltipCommon( _temp, _item, null, script, method, eCommonState.Buy); if (buyAmount == -1) buyAmount = _item.ItemData.buyAmount; if (tradeItemID != -1) { tempCommon.imgGold.Hide(true); GameObject objGoods = AsNpcStore.GetItemIcon(tradeItemID.ToString(), 1); objGoods.transform.parent = tempCommon.imgGold.transform.parent; objGoods.transform.localPosition = tempCommon.imgGold.transform.localPosition; objGoods.transform.localScale = new Vector3(0.35f, 0.35f, 0.35f); if (tradeItemCount <= 0) tempCommon.btnBuy.gameObject.SetActive(false); else tempCommon.btnBuy.gameObject.SetActive(true); } tempCommon.SetBuyPrice(buyAmount); _temp.ResetPosition( _openDlgState, 0f); }
private void SetTooltipForCashStore(TooltipMgr.eOPEN_DLG _openDlgState, TooltipObject tooltipObject, RealItem _realitem, bool isRandomItemAuto, bool isEquip, MonoBehaviour script, string method, eCommonState commonState, float fOffsetZ) { if (null == _realitem) return; AddTooltipInfo(tooltipObject, _realitem.sItem, isRandomItemAuto, isEquip); AddTooltipSet(tooltipObject, _realitem.item); AddTooltipCommon(tooltipObject, _realitem, script, method, commonState); tooltipObject.ResetPosition(_openDlgState, fOffsetZ); }
public void OpenTooltip( TooltipMgr.eOPEN_DLG _openDlgState, sITEM _sitem, float fOffsetZ) { if( null == _sitem) { Debug.LogError( "TooltipMgr::OpenSetTooltip() [ null == _sitem ]"); return; } Clear(); SetTooltip( _openDlgState, tooltipOnePosition, _sitem, true, false, null, "", eCommonState.Sell, fOffsetZ); }
public void OpenTooltip( TooltipMgr.eOPEN_DLG _openDlgState, RealItem _realItem_1, Item _item_2, bool isRandomItemAuto_2 = false, float fOffsetZ = 0.0f) { if( null == _realItem_1 || null == _item_2) { Debug.LogError( "TooltipMgr::OpenSetTooltip() [ null == item_1 || null == item_2 ]"); return; } if (_openDlgState == TooltipMgr.eOPEN_DLG.right) _openDlgState = ConvertOpenDlgState_In_Pad_Device (); Clear(); SetTooltip( _openDlgState, tooltipTwoPosition_1, _realItem_1.sItem, true, true, null, "", eCommonState.Sell, fOffsetZ); SetTooltip( _openDlgState, tooltipTwoPosition_2, _item_2, isRandomItemAuto_2, false, null, "", eCommonState.Sell, fOffsetZ); }
protected void SetPrice( int iSellAmount, string strGold, TooltipMgr.eCommonState commonState) { if( null != getItem && false == getItem.ItemData.isShopSell && commonState != TooltipMgr.eCommonState.Buy) { sellPrice.Text = string.Empty; if( null != imgGold) imgGold.gameObject.active = false; return; } m_sbtemp.Remove( 0, m_sbtemp.Length); m_sbtemp.Append( strGold); m_sbtemp.Append( " "); m_sbtemp.Append( iSellAmount.ToString( "#,#0", CultureInfo.InvariantCulture)); sellPrice.Text = m_sbtemp.ToString(); }
public void OpenTooltip( TooltipMgr.eOPEN_DLG _openDlgState, Item _item, bool isRandomItemAuto = false, float fOffsetZ = 0f) { if( null == _item) { Debug.LogError( "TooltipMgr::OpenSetTooltip() [ null == item ]"); return; } Clear(); SetTooltip( _openDlgState, tooltipOnePosition, _item, isRandomItemAuto, false, null, "", eCommonState.Sell, fOffsetZ); }
public void OpenTooltip( TooltipMgr.eOPEN_DLG _openDlgState, int iItemID, bool isRandomItemAuto = false) { Item _item = ItemMgr.ItemManagement.GetItem( iItemID); if( null == _item) { Debug.LogError( "TooltipMgr::OpenTooltip()[ null == Item ] item id : " + iItemID); return; } Clear(); SetTooltip( _openDlgState, tooltipOnePosition, _item, isRandomItemAuto, false, null, "", eCommonState.Sell, 0f); }
public void OpenTooltip( TooltipMgr.eOPEN_DLG _openDlgState, Item _item, MonoBehaviour script, string method, eCommonState commonState) { if( null == _item) { Debug.LogError( "TooltipMgr::OpenSetTooltip() [ null == item ]"); return; } Clear(); m_useBtnScript = script; SetTooltip( _openDlgState, tooltipOnePosition, _item, false, false, script, method, commonState, 0f); }
public void OpenTooltip( TooltipMgr.eOPEN_DLG _openDlgState, RealItem _realItem, bool isEquip, eCommonState commonState) { if( null == _realItem) { Debug.LogError( "TooltipMgr::OpenSetTooltip() [ null == RealItem ]"); return; } Clear(); SetTooltip( _openDlgState, tooltipOnePosition, _realItem, false, isEquip, null, "", commonState, 0f); }
//OpenTooltip // -------------- public void OpenToolTipForCash(TooltipMgr.eOPEN_DLG _openDlgState, RealItem _realItem) { if (null == _realItem) { Debug.LogError("TooltipMgr::OpenSetTooltip() [ null == RealItem ]"); return; } Clear(); SetTooltipForCashStore(_openDlgState, tooltipOnePosition, _realItem, false, false, null, "", eCommonState.Sell, 0f); }
public void ResetPosition( TooltipMgr.eOPEN_DLG _openDlgState, float fOffsetZ = 0.0f) { float fTotalHeight = 0; foreach( TooltipDlg _dlg in m_DlgList ) { if( null == _dlg ) { Debug.LogError("TooltipObject::ResetPosition[ null == _dlg ]"); continue; } // fTotalHeight += _dlg.simpleSprite.height; //fTotalHeight += _dlg.DlgBase.TotalHeight; fTotalHeight += _dlg.backImgHeight; } Vector3 tempPos = transform.position; tempPos.y += (fTotalHeight * 0.3f); tempPos.z = fSavedZ + fOffsetZ; float screenWidth = UIManager.instance.rayCamera.orthographicSize * UIManager.instance.rayCamera.aspect * 2.0f; float fdlgWidth = 19.5f; switch (_openDlgState) { case TooltipMgr.eOPEN_DLG.normal: transform.position = tempPos; break; case TooltipMgr.eOPEN_DLG.right: if( dlgPosState == ePOSITION.CENTER ) { transform.position = new Vector3( ( ( screenWidth * 0.5f) - 500.0f) - ( ( screenWidth + 16.5f) * 0.5f), tempPos.y, tempPos.z); } else if( dlgPosState == ePOSITION.LEFT ) { transform.position = new Vector3( ( ( screenWidth * 0.5f) - 500.0f) - ( screenWidth -(screenWidth * 0.05f)) + ( fdlgWidth * 0.5f), tempPos.y, tempPos.z); } else if( dlgPosState == ePOSITION.RIGHT ) { transform.position = new Vector3( ( ( screenWidth * 0.5f) - 500.0f) - ( screenWidth-(screenWidth * 0.05f)) + ( fdlgWidth * 1.5f), tempPos.y, tempPos.z); } break; case TooltipMgr.eOPEN_DLG.left: if( dlgPosState == ePOSITION.CENTER ) { transform.position = new Vector3( ( ( screenWidth * 0.5f) - 500.0f) - ( ( screenWidth - 16.5f) * 0.5f), tempPos.y, tempPos.z); } else if( dlgPosState == ePOSITION.LEFT ) { transform.position = new Vector3( ( ( screenWidth * 0.5f) - 500.0f) - ( ( screenWidth - 16.5f) * 0.05f) - ( fdlgWidth * 1.5f), tempPos.y, tempPos.z); } else if( dlgPosState == ePOSITION.RIGHT ) { transform.position = new Vector3( ( ( screenWidth * 0.5f) - 500.0f) - ( ( screenWidth - 16.5f) * 0.05f) - ( fdlgWidth * 0.5f), tempPos.y, tempPos.z); } break; } m_isNeedClear = false; m_fTime = 0f; }
public void OpenTooltip( TooltipMgr.eOPEN_DLG _openDlgState, sITEM _realItem_1, RealItem _realItem_2, MonoBehaviour script_2, string method_2, eCommonState commonState_1, eCommonState commonState_2) { if( null == _realItem_1 || null == _realItem_2) { Debug.LogError( "TooltipMgr::OpenSetTooltip() [ null == item_1 || null == item_2 ]"); return; } if (_openDlgState == TooltipMgr.eOPEN_DLG.right) _openDlgState = ConvertOpenDlgState_In_Pad_Device (); Clear(); SetTooltip( _openDlgState, tooltipTwoPosition_1, _realItem_1, true, true, null, "", commonState_1, 0f); SetTooltip( _openDlgState, tooltipTwoPosition_2, _realItem_2, false, false, script_2, method_2, commonState_2, 0f); }
public void Open( Item _item, sITEM _sitem, MonoBehaviour btnScript, string btnMethod, TooltipMgr.eCommonState commonState) { if( false == SetItem( _item)) return; m_script = btnScript; m_method = btnMethod; //dopamin string strGold = string.Empty; int Amount = 0; switch( commonState) { case TooltipMgr.eCommonState.Equip: case TooltipMgr.eCommonState.NONE: Set3BtnShow( false); SetBtnUseShow( false); btnButton.gameObject.SetActiveRecursively( false); Amount = getItem.ItemData.sellAmount; break; case TooltipMgr.eCommonState.Buy: strGold = AsTableManager.Instance.GetTbl_String(1290); textBtnTitle.Text = AsTableManager.Instance.GetTbl_String(1145); Set3BtnShow( false); SetBtnUseShow( false); Amount = getItem.ItemData.buyAmount; break; case TooltipMgr.eCommonState.Sell: strGold = AsTableManager.Instance.GetTbl_String(1062); btnButton.gameObject.SetActiveRecursively( false); Set3BtnShow( false); SetBtnUseShow( false); Amount = getItem.ItemData.sellAmount; break; case TooltipMgr.eCommonState.Sell_Btn: strGold = AsTableManager.Instance.GetTbl_String(1062); btnButton.spriteText.Text = AsTableManager.Instance.GetTbl_String(1146); Set3BtnShow( false); SetBtnUseShow( false); Amount = getItem.ItemData.sellAmount; break; case TooltipMgr.eCommonState.Socket: case TooltipMgr.eCommonState.Strength: case TooltipMgr.eCommonState.Socket_Strength: Set3BtnShow( false); SetBtnUseShow( false); strGold = AsTableManager.Instance.GetTbl_String(1062); Amount = getItem.ItemData.sellAmount; btnButton.gameObject.SetActiveRecursively( false); break; } SetContentText1( _sitem, getItem); SetContentText2( _sitem, getItem); SetPrice( Amount, strGold, commonState); if( null != _sitem) SetTradeCount( _sitem.nTradeCount); else if( null != getItem) SetTradeCount( getItem.ItemData.m_sbItemTradeLimit); }
public void OpenTooltip( TooltipMgr.eOPEN_DLG _openDlgState, RealItem _realItem_1, RealItem _realItem_2) { if( null == _realItem_1 || null == _realItem_2) { Debug.LogError( "TooltipMgr::OpenSetTooltip() [ null == item_1 || null == item_2 ]"); return; } if (_openDlgState == TooltipMgr.eOPEN_DLG.right) _openDlgState = ConvertOpenDlgState_In_Pad_Device (); Clear(); SetTooltip( _openDlgState, tooltipTwoPosition_1, _realItem_1.sItem, true, true, null, "", eCommonState.Sell, 0f); SetTooltip( _openDlgState, tooltipTwoPosition_2, _realItem_2.sItem, false, false, null, "", eCommonState.Sell, 0f); }
public void Open( RealItem _item, MonoBehaviour btnScript, string btnMethod, TooltipMgr.eCommonState commonState) { if( false == SetItem( _item.item)) return; m_RealItemp = _item; m_script = btnScript; m_method = btnMethod; //dopamin string strGold = string.Empty; int Amount = 0; switch( commonState) { case TooltipMgr.eCommonState.Equip: strGold = AsTableManager.Instance.GetTbl_String(1062); btnButton.gameObject.SetActiveRecursively( false); Set3BtnShow( true ); SetUseBtnState( _item.item, _item.sItem); Amount = getItem.ItemData.sellAmount; SetEnableStrength(false); SetEnableEnchant(false); SetEquipBtnState(_item); break; case TooltipMgr.eCommonState.NONE: Set3BtnShow( false); SetBtnUseShow( false); btnButton.gameObject.SetActiveRecursively( false); break; case TooltipMgr.eCommonState.Buy: strGold = AsTableManager.Instance.GetTbl_String(1290); textBtnTitle.Text = AsTableManager.Instance.GetTbl_String(1145); Set3BtnShow( false); SetBtnUseShow( false); Amount = getItem.ItemData.buyAmount; break; case TooltipMgr.eCommonState.Sell: strGold = AsTableManager.Instance.GetTbl_String(1062); btnButton.gameObject.SetActiveRecursively( false); Set3BtnShow( false); SetUseBtnState( _item.item, _item.sItem); Amount = getItem.ItemData.sellAmount; break; case TooltipMgr.eCommonState.Sell_Btn: strGold = AsTableManager.Instance.GetTbl_String(1062); btnButton.spriteText.Text = AsTableManager.Instance.GetTbl_String(1146); Set3BtnShow( false); SetBtnUseShow( false); Amount = getItem.ItemData.sellAmount; break; case TooltipMgr.eCommonState.Socket: strGold = AsTableManager.Instance.GetTbl_String(1062); Amount = getItem.ItemData.sellAmount; btnButton.gameObject.SetActiveRecursively( false); SetEnableStrength(false); SetUseBtnState( _item.item, _item.sItem); SetEquipBtnState( _item); break; case TooltipMgr.eCommonState.Strength: strGold = AsTableManager.Instance.GetTbl_String(1062); Amount = getItem.ItemData.sellAmount; btnButton.gameObject.SetActiveRecursively( false); SetEnableEnchant(false); SetUseBtnState( _item.item, _item.sItem); SetEquipBtnState( _item); break; case TooltipMgr.eCommonState.Socket_Strength: strGold = AsTableManager.Instance.GetTbl_String(1062); Amount = getItem.ItemData.sellAmount; btnButton.gameObject.SetActiveRecursively( false); SetUseBtnState( _item.item, _item.sItem); SetEquipBtnState( _item); break; } SetContentText1( _item.sItem, getItem); SetContentText2( _item.sItem, getItem); SetPrice( Amount, strGold, commonState); SetTradeCount( _item.sItem.nTradeCount); if( AsHudDlgMgr.Instance.IsOpenedPostBox || AsHudDlgMgr.Instance.IsOpenSynthesisDlg || AsHudDlgMgr.Instance.IsOpenEnchantDlg || AsHudDlgMgr.Instance.IsOpenStrengthenDlg || AsHudDlgMgr.Instance.IsOpenTrade || AsHudDlgMgr.Instance.IsOpenStorage || AsHudDlgMgr.Instance.IsOpenSynDisDlg || AsHudDlgMgr.Instance.IsOpenSynOptionDlg || AsHudDlgMgr.Instance.IsOpenSynCosDlg || (null != AsPetManager.Instance.PetSynthesisDlg) || AsPStoreManager.Instance.UnableActionByPStore()) { Set3BtnShow( false); SetBtnUseShow( false); } CheckUseBtnPvp( _item.item ); CheckUseBtnRaid( _item.item ); CheckUseBtnField(_item.item); CheckUseBtnIndun( _item.item); }
private void SetTooltip( TooltipMgr.eOPEN_DLG _openDlgState, TooltipObject tooltipObject, RealItem _realitem, bool isRandomItemAuto, bool isEquip, MonoBehaviour script, string method, eCommonState commonState, float fOffsetZ) { if( null == _realitem) return; AddTooltipInfo( tooltipObject, _realitem.sItem, isRandomItemAuto, isEquip); AddTooltipSet( tooltipObject, _realitem.item); if( _realitem.item.ItemData.CheckPetItem() == false) AddTooltipEnchant( tooltipObject, _realitem.sItem); AddTooltipGauge (tooltipObject, _realitem.sItem, _realitem.item.ItemData); AddTooltipCommon( tooltipObject, _realitem, script, method, commonState); tooltipObject.ResetPosition( _openDlgState, fOffsetZ); }