15 return IntColor.FromInt(this._bgColor);
19 this._bgColor = IntColor.ToInt(ref value);
25 public override Color SpriteColor
29 if (!this.CanChangeIconColor || this._bgColor == 0)
31 return base.SpriteColor;
39 public virtual string Id
49 public virtual bool CanChangeIconColor
59 public virtual bool CanName
69 public override string Name
73 return this.text.IsEmpty((
"hotAction" + this.Id).lang());
79 public override string pathSprite
83 return "icon_hot" + this.Id;
90 if (!
EClass.player.CanAcceptInput())
99 public virtual void Perform()
104 public override void OnShowContextMenu(UIContextMenu m)
106 base.OnShowContextMenu(m);
109 m.AddButton(
"changeName", delegate()
111 Dialog.InputName(
"dialogChangeName", this.text.IsEmpty(
""), delegate(
bool cancel,
string t)
117 },
Dialog.InputType.Default);
120 if (this.CanChangeIconColor)
122 m.AddButton(
"actChangeColor", delegate()
124 if (this._bgColor == 0)
126 this.bgColor = Color.white;
128 EClass.ui.AddLayer<
LayerColorPicker>().SetColor(this.bgColor, Color.white, delegate(PickerState state, Color _c)
131 this.button.icon.color = _c;