Source
..\..\UIRes\TriplePhaseImageButton.bin
GacUI.h
Demo
Checked.png
Partial.png
module triplephasebutton;

using system::*; using presentation::*;

enum TripleState { Normal = 0, Checked = 1, Partial = 2, }
cast Color let state = self.State in ( not self.VisuallyEnabled ? "#252526" : state == ButtonState::Active ? "#54545C" : state == ButtonState::Pressed ? "#007ACC" : "#3F3F46" )
cast Color let state = self.State in ( not self.VisuallyEnabled ? "#434346" : state == ButtonState::Active ? "#6A6A75" : state == ButtonState::Pressed ? "#1C97EA" : "#54545C" )
cast Color let state = self.State in ( not self.VisuallyEnabled ? "#6D6D6D" : state == ButtonState::Active ? "#F1F1F1" : state == ButtonState::Pressed ? "#FFFFFF" : "#F1F1F1" )

<_>composeType:Percentage percentage:0.5 <_>composeType:Absolute absolute:32 <_>composeType:Percentage percentage:0.5
<_>composeType:Absolute absolute:4 <_>composeType:Absolute absolute:32 <_>composeType:Absolute absolute:4 <_>composeType:Percentage percentage:1.0 <_>composeType:Absolute absolute:4
( let control = cast (TriplePhaseButton*) self.Context in ( control.State == TripleState::Checked ? control.CheckedImage.Image: control.State == TripleState::Partial ? control.PartialImage.Image: null ) ) ?? null

prop State: TripleState = TripleState::Checked {} prop CheckedImage: GuiImageData^ = null {} prop PartialImage: GuiImageData^ = null {}
demo::TriplePhaseImageButtonTemplate
{ switch (self.State) { case TripleState::Normal: { self.State = TripleState::Checked; } case TripleState::Checked: { self.State = TripleState::Partial; } case TripleState::Partial: { self.State = TripleState::Normal; } } }
button.State == TripleState::Checked ? "Checked": button.State == TripleState::Partial ? "Partial": "Normal"