public EmulatorDemo(PixelFormats format, Pictor.UI.PlatformSupportAbstract.ERenderOrigin RenderOrigin) : base(format, RenderOrigin) { m_idx = (-1); background = new Pictor.RGBA_Bytes(127, 127, 127); m_x[0] = 100; m_y[0] = 100; m_x[1] = 500; m_y[1] = 350; button = Pictor.UI.UIManager.CreateButton(8.0, 130.0, "Quit", 8, 1, 1, 3); button.ButtonClick += Quit; AddChild(button); white = Pictor.UI.UIManager.CreateButton(8.0, 110.0, "Gray", 8, 1, 1, 3); blue = Pictor.UI.UIManager.CreateButton(8.0, 90.0, "Blue", 8, 1, 1, 3); reset = Pictor.UI.UIManager.CreateButton(8.0, 70.0, "Reset", 8, 1, 1, 3); border = new Pictor.UI.CheckBoxWidget(8.0, 50.0, "Draw as outline"); alpha = new Pictor.UI.SliderWidget(10, 10, 590, 19); radius = new Pictor.UI.SliderWidget(10, 30, 590, 39); alpha.Range(0, 255); alpha.Value(255); //alpha.BackgroundColor(new Pictor.RGBA_Doubles(255, 255, 255)); radius.Label("Radius = {0:F3}"); radius.Range(0.0, 50.0); radius.Value(25.0); border.Status(false); white.ButtonClick += White; blue.ButtonClick += Blue; reset.ButtonClick += Reset; AddChild(white); AddChild(blue); AddChild(reset); AddChild(border); AddChild(alpha); AddChild(radius); }
public EmulatorDemo(PixelFormats format, Pictor.UI.PlatformSupportAbstract.ERenderOrigin RenderOrigin) : base(format, RenderOrigin) { m_idx = (-1); background = new Pictor.RGBA_Bytes(127, 127, 127); m_x[0] = 100; m_y[0] = 100; m_x[1] = 500; m_y[1] = 350; button = Pictor.UI.UIManager.CreateButton(8.0, 130.0, "Quit", 8, 1, 1, 3); button.ButtonClick += Quit; AddChild(button); white = Pictor.UI.UIManager.CreateButton(8.0, 110.0, "Gray", 8, 1, 1, 3); blue = Pictor.UI.UIManager.CreateButton(8.0, 90.0, "Blue", 8, 1, 1, 3); reset = Pictor.UI.UIManager.CreateButton(8.0, 70.0, "Reset", 8, 1, 1, 3); border = new Pictor.UI.CheckBoxWidget(8.0, 50.0, "Draw as outline"); alpha = new Pictor.UI.SliderWidget(10, 10, 590, 19); radius = new Pictor.UI.SliderWidget(10, 30, 590, 39); alpha.Range(0, 255); alpha.Value(255); //alpha.BackgroundColor(new Pictor.RGBA_Doubles(255, 255, 255)); radius.Label("Radius = {0:F3}"); radius.Range(0.0, 50.0); radius.Value(25.0); border.Status(false); white.ButtonClick += White; blue.ButtonClick += Blue; reset.ButtonClick += Reset; AddChild(white); AddChild(blue); AddChild(reset); AddChild(border); AddChild(alpha); AddChild(radius); }