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; }
public ButtonNinepatchHandler(Actor actor, NinepatchSheet hoverSheet, NinepatchSheet pressedSheet) : base(actor) { this.hoverSheet = hoverSheet; this.pressedSheet = pressedSheet; this.clickable = RequireComponent <Clickable>(); this.renderer = RequireComponent <NinepatchRenderer>(); this.defaultSheet = this.renderer.Sheet; }
public RadioButtonState(Actor actor, RadioButtonGroup radioButtonGroup, bool startFilled) : base(actor) { this.clickable = RequireComponent <Clickable>(); this.clickable.OnClick += OnClick; this.group = radioButtonGroup; this.startFilled = startFilled; }
public ButtonSpriteRenderer(Actor actor, SpriteSheet spriteSheet, IFrameAnimation frames) : base(actor) { this.clickable = RequireComponent <Clickable>(); this.boundingRect = RequireComponent <BoundingRect>(); this.spriteSheet = spriteSheet; this.frames = frames; this.currentFrame = HoverSprite.Idle; }
public SingleSelectable(Actor actor, SingleSelector selector) : base(actor) { this.clickable = RequireComponent <Clickable>(); this.clickable.OnClick += OnClick; this.selector = selector; this.onSelect += () => { }; this.onDeselect += () => { }; }
public CheckboxRenderer(Actor actor, SpriteSheet spriteSheet, Image checkmark, ICheckboxStateProvider checkboxState, Clickable clickable, IFrameAnimation animation) : base(actor) { this.boundingRect = RequireComponent <BoundingRect>(); this.checkboxState = checkboxState; this.clickable = clickable; this.checkboxSpriteSheet = spriteSheet; this.checkmark = checkmark; this.animation = animation; }
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>(); }
public CheckboxState(Actor actor, bool startingValue = false) : base(actor) { this.clickable = RequireComponent <Clickable>(); this.clickable.OnClick += OnClick; IsChecked = startingValue; }
public EditableText(Actor actor, Clickable clickable) : this(actor, clickable, Color.Black, Color.CornflowerBlue) { // forwards to main ctor }
public SimpleButtonRenderer(Actor actor) : base(actor) { this.boundingRect = RequireComponent <BoundingRect>(); this.clickable = RequireComponent <Clickable>(); }
public DoubleClickable(Actor actor) : base(actor) { this.clickable = RequireComponent <Clickable>(); this.clickable.OnClick += OnClick; }