public void SetItem(ItemInst item) { if (this.item == item) { return; } this.item = item; UpdateBackTex(); if (item == null) { vis.SetVisual(string.Empty); vis.Hide(); } else { vis.SetVisual(item.ModelDef.Visual); if (shown) { vis.Show(); } int num = item.Amount; if (num > 1) { amount.Text = num.ToString(); } else { amount.Text = string.Empty; } item.Definition.PositionInVobVisual(vis); } }
public override void Hide() { vis.Hide(); leftArrow.Hide(); rightArrow.Hide(); _ZoomText.Hide(); }
void SelectSlot() { slots[cursor.X, cursor.Y].IsSelected = true; ItemInst selItem = GetSelectedItem(); if (selItem == null) { descrBack.Hide(); descrVis.Hide(); } else { List <GUCVisualText> texts = descrBack.Texts; var def = selItem.Definition; //set description name texts[0].Text = def.Name; if (def.Damage != 0) { texts[3].Text = "Schaden"; texts[4].Text = def.Damage.ToString(); } else { texts[3].Text = texts[4].Text = ""; } if (def.Range != 0) { texts[5].Text = "Reichweite"; texts[6].Text = def.Range.ToString(); } else { texts[5].Text = texts[6].Text = ""; } if (def.Protection != 0) { texts[7].Text = "Schutz vor Waffen"; texts[8].Text = def.Protection.ToString(); } else { texts[7].Text = texts[8].Text = ""; } //visual vob descrVis.SetVisual(selItem.ModelDef.Visual); //show description def.PositionInVobVisual(descrVis); descrBack.Show(); descrVis.Show(); } }