void DockChanged(Base control) { Base inner = (Base)control.UserData; RadioButtonGroup rbg = (RadioButtonGroup)control; Base gb = inner.UserData as Base; Alt.GUI.Temporary.Gwen.Control.Slider w = gb.FindChildByName("Width", true) as Slider; Alt.GUI.Temporary.Gwen.Control.Slider h = gb.FindChildByName("Height", true) as Slider; switch (rbg.SelectedIndex) { case 0: inner.Dock = Alt.GUI.Temporary.Gwen.Pos.Left; break; case 1: inner.Dock = Alt.GUI.Temporary.Gwen.Pos.Top; break; case 2: inner.Dock = Alt.GUI.Temporary.Gwen.Pos.Right; break; case 3: inner.Dock = Alt.GUI.Temporary.Gwen.Pos.Bottom; break; case 4: inner.Dock = Alt.GUI.Temporary.Gwen.Pos.Fill; break; } inner.SetSize((int)w.Value, (int)h.Value); //inner.Invalidate(); outer.Invalidate(); }
void HeightChanged(Base control) { Base inner = control.UserData as Base; Alt.GUI.Temporary.Gwen.Control.Slider val = control as Alt.GUI.Temporary.Gwen.Control.Slider; inner.Height = (int)val.Value; outer.Invalidate(); }
void MarginChanged(Base control) { Base inner = control.UserData as Base; Alt.GUI.Temporary.Gwen.Control.Slider val = control as Alt.GUI.Temporary.Gwen.Control.Slider; int i = (int)val.Value; inner.Margin = new Alt.GUI.Temporary.Gwen.Margin(i, i, i, i); outer.Invalidate(); }