Пример #1
0
 public EditableText(Actor actor, Clickable clickable, Color cursorColor, Color highlightColor) : base(actor)
 {
     this.textRenderer       = RequireComponent <BoundedTextRenderer>();
     this.clickable          = clickable;
     this.clickable.OnClick += OnClick;
     this.cursorColor        = cursorColor;
     this.highlightColor     = highlightColor;
 }
Пример #2
0
 public DropdownTrigger(Actor actor, DropdownContent content, SpriteSheet spriteSheet, IFrameAnimation frames,
                        NinepatchSheet backgroundSheet) : base(actor)
 {
     this.clickable               = RequireComponent <Clickable>();
     this.clickable.OnClick      += OnClick;
     this.content                 = content;
     this.content.onOptionSelect += OnOptionSelected;
     this.textRenderer            = RequireComponent <BoundedTextRenderer>();
     this.selectedItem            = content.FirstItem;
     this.textRenderer.Text       = " " + this.selectedItem.text; // awkward space character
     this.frames          = frames;
     this.spriteSheet     = spriteSheet;
     this.backgroundSheet = backgroundSheet;
     this.boundingRect    = RequireComponent <BoundingRect>();
 }
Пример #3
0
 public IntroTextAnimation(Actor actor) : base(actor)
 {
     this.textRenderer = RequireComponent <BoundedTextRenderer>();
     this.actor.scene.StartCoroutine(IntroAnimation());
     SwapColor();
 }