ui fixes
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Michele 2021-09-02 23:42:03 +01:00
parent 12080cf6da
commit a8991b474f
5 changed files with 26 additions and 21 deletions

View file

@ -535,15 +535,15 @@ namespace Sledgemapper
{
var item = new CampaignListItem();
item.TxtCampaignName.Text = campaign.Name;
item.Background = new NinePatchRegion(
Content.Load<Texture2D>("listBackground"), new Rectangle(0, 0, 418, 25),
new Myra.Graphics2D.Thickness
{
Left = 11,
Right = 11,
Top = 11,
Bottom = 11
});
//item.Background = new NinePatchRegion(
// Content.Load<Texture2D>("listBackground"), new Rectangle(0, 0, 418, 25),
// new Myra.Graphics2D.Thickness
// {
// Left = 11,
// Right = 11,
// Top = 11,
// Bottom = 11
// });
item.TouchUp += OnCampaignSelected;
content.StackCampaignsList.AddChild(item);
}

View file

@ -1,4 +1,4 @@
/* Generated by MyraPad at 28/08/2021 16:25:44 */
/* Generated by MyraPad at 02/09/2021 23:40:23 */
using Myra;
using Myra.Graphics2D;
using Myra.Graphics2D.TextureAtlases;
@ -27,11 +27,14 @@ namespace Sledgemapper.UI
label1.HorizontalAlignment = Myra.Graphics2D.UI.HorizontalAlignment.Center;
StackCampaignsList = new VerticalStackPanel();
StackCampaignsList.MinHeight = 350;
StackCampaignsList.MaxHeight = 350;
StackCampaignsList.DefaultProportion = new Proportion
{
Type = Myra.Graphics2D.UI.ProportionType.Auto,
};
StackCampaignsList.Id = "StackCampaignsList";
var scrollViewer1 = new ScrollViewer();
scrollViewer1.Height = 250;
scrollViewer1.Content = StackCampaignsList;
BtnNewCampaign = new TextButton();

View file

@ -1,4 +1,4 @@
/* Generated by MyraPad at 28/08/2021 19:31:16 */
/* Generated by MyraPad at 02/09/2021 22:56:13 */
using Myra;
using Myra.Graphics2D;
using Myra.Graphics2D.TextureAtlases;
@ -24,17 +24,17 @@ namespace Sledgemapper.UI
{
TxtCampaignName = new Label();
TxtCampaignName.Text = "Highfell";
TxtCampaignName.TextColor = ColorStorage.CreateColor(102, 102, 102, 255);
TxtCampaignName.TextColor = ColorStorage.CreateColor(32, 32, 32, 255);
TxtCampaignName.Margin = new Thickness(10, 0, 0, 0);
TxtCampaignName.VerticalAlignment = Myra.Graphics2D.UI.VerticalAlignment.Center;
TxtCampaignName.Background = new SolidBrush("#00000000");
TxtCampaignName.Id = "TxtCampaignName";
VerticalAlignment = Myra.Graphics2D.UI.VerticalAlignment.Center;
Width = 300;
Height = 30;
BorderThickness = new Thickness(2);
Padding = new Thickness(10);
Padding = new Thickness(5);
Background = new SolidBrush("#D9D9D9FF");
Id = "PnlCampaignItem";
Widgets.Add(TxtCampaignName);
}

View file

@ -1,6 +1,6 @@
<Project>
<Project.ExportOptions Namespace="Sledgemapper.UI" Class="CampaignListItem" OutputPath="C:\dev\Map\Sledgemapper\UI" />
<HorizontalStackPanel VerticalAlignment="Center" Width="300" Height="30" BorderThickness="2" Padding="10" Id="PnlCampaignItem">
<Label Text="Highfell" TextColor="#666666FF" VerticalAlignment="Center" Background="#00000000" Id="TxtCampaignName" />
<HorizontalStackPanel VerticalAlignment="Center" Height="30" BorderThickness="2" Padding="5" Background="#D9D9D9FF" Id="PnlCampaignItem" >
<Label Text="Highfell" TextColor="#202020FF" Margin="10, 0, 0, 0" VerticalAlignment="Center" Id="TxtCampaignName" />
</HorizontalStackPanel>
</Project>

View file

@ -2,8 +2,10 @@
<Project.ExportOptions Namespace="Sledgemapper.UI" Class="CampaignList" OutputPath="C:\dev\Map\Sledgemapper\UI" />
<VerticalStackPanel Spacing="13" Width="400" Padding="10">
<Label Text="Campaigns" HorizontalAlignment="Center" />
<ScrollViewer>
<VerticalStackPanel MinHeight="350" MaxHeight="350" Id="StackCampaignsList" />
<ScrollViewer Height="250">
<VerticalStackPanel Id="StackCampaignsList">
<VerticalStackPanel.DefaultProportion Type="Auto" />
</VerticalStackPanel>
</ScrollViewer>
<HorizontalStackPanel Spacing="15" HorizontalAlignment="Right">
<TextButton Text="New" Width="70" Height="20" Padding="5" HorizontalAlignment="Center" Id="BtnNewCampaign" />