public SizeAdjustmentOverlay() { Add(settings = new Container { AutoSizeAxes = Axes.Both, Anchor = Anchor.Centre, Origin = Anchor.Centre, Children = new Drawable[] { new Box { RelativeSizeAxes = Axes.Both, Colour = IWannaColour.GrayDarker }, new FillFlowContainer { Anchor = Anchor.Centre, Origin = Anchor.Centre, AutoSizeAxes = Axes.Both, Direction = FillDirection.Vertical, Spacing = new Vector2(0, 10), Margin = new MarginPadding(10), Children = new Drawable[] { widthTextBox = new IWannaTextBox { Anchor = Anchor.Centre, Origin = Anchor.Centre, PlaceholderText = "Width", Width = 300, }, heightTextBox = new IWannaTextBox { Anchor = Anchor.Centre, Origin = Anchor.Centre, PlaceholderText = "Height", Width = 300, }, new IWannaBasicButton("Ok", onConfirm) { Anchor = Anchor.Centre, Origin = Anchor.Centre, } } } } }); }
public CreationScreen() { ValidForResume = false; AddRangeInternal(new Drawable[] { new FillFlowContainer { Anchor = Anchor.Centre, Origin = Anchor.Centre, AutoSizeAxes = Axes.Both, Direction = FillDirection.Vertical, Spacing = new Vector2(0, 10), Children = new Drawable[] { new SettingName("Name"), textbox = new IWannaTextBox { Width = 300, Anchor = Anchor.Centre, Origin = Anchor.Centre, }, new SettingName("First room settings"), new IWannaBasicButton("Adjust", onAdjust) { Anchor = Anchor.Centre, Origin = Anchor.Centre }, new IWannaBasicButton("Ok", onCommit) { Anchor = Anchor.Centre, Origin = Anchor.Centre, Margin = new MarginPadding { Top = 20 } } } }, roomCreationOverlay = new RoomCreationOverlay(), }); }
public CherriesEditOverlay() { AddRange(new Drawable[] { content = new Container { Anchor = Anchor.CentreRight, Origin = Anchor.CentreRight, RelativeSizeAxes = Axes.Y, Width = 200, Children = new Drawable[] { new Box { RelativeSizeAxes = Axes.Both, Colour = IWannaColour.GrayDark }, new Container { RelativeSizeAxes = Axes.Both, Padding = new MarginPadding(10), Child = new FillFlowContainer { RelativeSizeAxes = Axes.X, AutoSizeAxes = Axes.Y, Direction = FillDirection.Vertical, Spacing = new Vector2(0, 10), Children = new Drawable[] { new SpriteText { Text = "Count:" }, count = new IWannaTextBox { RelativeSizeAxes = Axes.X }, new SpriteText { Text = "Distance:" }, distance = new IWannaTextBox { RelativeSizeAxes = Axes.X }, new SpriteText { Text = "OriginX:" }, originX = new IWannaTextBox { RelativeSizeAxes = Axes.X }, new SpriteText { Text = "OriginY:" }, originY = new IWannaTextBox { RelativeSizeAxes = Axes.X }, new SpriteText { Text = "Angle offset:" }, angleOffset = new IWannaTextBox { RelativeSizeAxes = Axes.X }, new SpriteText { Text = "Rotation duration:" }, rotationDuration = new IWannaTextBox { RelativeSizeAxes = Axes.X }, new IWannaBasicButton("Add", onAdd), } } } } } }); count.Current.BindValueChanged(_ => updatePreview()); distance.Current.BindValueChanged(_ => updatePreview()); originX.Current.BindValueChanged(_ => updatePreview()); originY.Current.BindValueChanged(_ => updatePreview()); angleOffset.Current.BindValueChanged(_ => updatePreview()); rotationDuration.Current.BindValueChanged(_ => updatePreview(), true); }