Elin Decompiled Documentation EA 23.343.5 Nightly
Loading...
Searching...
No Matches
InvOwnerChoose.cs
Go to the documentation of this file.
1public class InvOwnerChoose : InvOwner
2{
3 public override bool UseGuide => true;
4
5 public InvOwnerChoose(Card owner, Card container = null, CurrencyType _currency = CurrencyType.None)
6 : base(owner, container, _currency)
7 {
8 }
9
10 public override bool ShouldShowGuide(Thing t)
11 {
12 return t.parent == owner;
13 }
14
15 public override bool AllowMoved(Thing t)
16 {
17 return false;
18 }
19
20 public override bool OnCancelDrag(DragItemCard.DragInfo from)
21 {
22 return false;
23 }
24
25 public override void OnClick(ButtonGrid button)
26 {
27 Process(button);
28 }
29
30 public override void OnRightClick(ButtonGrid button)
31 {
32 Process(button);
33 }
34
35 public override void OnRightPressed(ButtonGrid button)
36 {
37 }
38
39 public bool Process(ButtonGrid button)
40 {
41 if (!button || button.card == null || button.card.parent != owner)
42 {
43 return false;
44 }
45 owner.ChangeMaterial("onyx");
50 return true;
51 }
52}
CurrencyType
Definition: CurrencyType.cs:2
Card card
Definition: ButtonGrid.cs:24
Definition: Card.cs:11
Card ChangeMaterial(int idNew, bool ignoreFixedMaterial=false)
Definition: Card.cs:3217
ICardParent parent
Definition: Card.cs:56
Point pos
Definition: Card.cs:60
Trait trait
Definition: Card.cs:54
ThingContainer things
Definition: Card.cs:39
virtual Thing Thing
Definition: Card.cs:2110
void PickOrDrop(Point p, string idThing, int idMat=-1, int num=1, bool msg=true)
Definition: Chara.cs:4557
Definition: EClass.cs:6
static Chara pc
Definition: EClass.cs:15
static UI ui
Definition: EClass.cs:17
override bool OnCancelDrag(DragItemCard.DragInfo from)
override bool AllowMoved(Thing t)
bool Process(ButtonGrid button)
override bool ShouldShowGuide(Thing t)
override void OnRightClick(ButtonGrid button)
override void OnRightPressed(ButtonGrid button)
override void OnClick(ButtonGrid button)
InvOwnerChoose(Card owner, Card container=null, CurrencyType _currency=CurrencyType.None)
override bool UseGuide
Card owner
Definition: InvOwner.cs:533
void CloseLayers()
Definition: Layer.cs:488
void DestroyAll(Func< Thing, bool > funcExclude=null)
Definition: Thing.cs:8
virtual bool OnUse(Chara c)
Definition: Trait.cs:1210