new note window

This commit is contained in:
Michele 2020-11-29 23:54:48 +00:00 committed by Michele Scandura
parent da302af8bf
commit ec98d53f48
5 changed files with 167 additions and 0 deletions

View file

@ -0,0 +1,77 @@
/* Generated by MyraPad at 29/11/2020 23:51:26 */
using Myra.Graphics2D;
using Myra.Graphics2D.TextureAtlases;
using Myra.Graphics2D.UI;
using Myra.Graphics2D.Brushes;
#if !STRIDE
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
#else
using Stride.Core.Mathematics;
#endif
namespace Sledgemapper.UI
{
partial class NoteWindow: Grid
{
private void BuildUI()
{
NoteText = new TextBox();
NoteText.Multiline = true;
NoteText.Wrap = true;
NoteText.VerticalAlignment = Myra.Graphics2D.UI.VerticalAlignment.Stretch;
NoteText.Id = "NoteText";
var scrollViewer1 = new ScrollViewer();
scrollViewer1.Content = NoteText;
BtnCancel = new TextButton();
BtnCancel.Text = "Cancel";
BtnCancel.Width = 70;
BtnCancel.Height = 20;
BtnCancel.Padding = new Thickness(5);
BtnCancel.HorizontalAlignment = Myra.Graphics2D.UI.HorizontalAlignment.Center;
BtnCancel.Id = "BtnCancel";
BtnOk = new TextButton();
BtnOk.Text = "Ok";
BtnOk.Width = 70;
BtnOk.Height = 20;
BtnOk.Padding = new Thickness(5);
BtnOk.HorizontalAlignment = Myra.Graphics2D.UI.HorizontalAlignment.Center;
BtnOk.Id = "BtnOk";
var horizontalStackPanel1 = new HorizontalStackPanel();
horizontalStackPanel1.Spacing = 10;
horizontalStackPanel1.HorizontalAlignment = Myra.Graphics2D.UI.HorizontalAlignment.Right;
horizontalStackPanel1.GridRow = 1;
horizontalStackPanel1.Widgets.Add(BtnCancel);
horizontalStackPanel1.Widgets.Add(BtnOk);
RowSpacing = 13;
ColumnsProportions.Add(new Proportion
{
Type = Myra.Graphics2D.UI.ProportionType.Fill,
});
RowsProportions.Add(new Proportion
{
Type = Myra.Graphics2D.UI.ProportionType.Fill,
});
RowsProportions.Add(new Proportion
{
Type = Myra.Graphics2D.UI.ProportionType.Auto,
});
Width = 400;
Height = 300;
Widgets.Add(scrollViewer1);
Widgets.Add(horizontalStackPanel1);
}
public TextBox NoteText;
public TextButton BtnCancel;
public TextButton BtnOk;
}
}

View file

@ -0,0 +1,11 @@
/* Generated by MyraPad at 29/11/2020 23:50:42 */
namespace Sledgemapper.UI
{
public partial class NoteWindow
{
public NoteWindow()
{
BuildUI();
}
}
}

View file

@ -0,0 +1,19 @@
<Project>
<Project.ExportOptions Namespace="Sledgemapper.UI" Class="NoteWindow" OutputPath="C:\dev\Map\Sledgemapper\UI" />
<Grid RowSpacing="13" Width="400" Height="300">
<Grid.ColumnsProportions>
<Proportion Type="Fill" />
</Grid.ColumnsProportions>
<Grid.RowsProportions>
<Proportion Type="Fill" />
<Proportion Type="Auto" />
</Grid.RowsProportions>
<ScrollViewer>
<TextBox Multiline="True" Wrap="True" VerticalAlignment="Stretch" Id="NoteText" />
</ScrollViewer>
<HorizontalStackPanel Spacing="10" HorizontalAlignment="Right" GridRow="1">
<TextButton Text="Cancel" Width="70" Height="20" Padding="5" HorizontalAlignment="Center" Id="BtnCancel" />
<TextButton Text="Ok" Width="70" Height="20" Padding="5" HorizontalAlignment="Center" Id="BtnOk" />
</HorizontalStackPanel>
</Grid>
</Project>