notes
This commit is contained in:
parent
b2567b2a01
commit
1e244795fc
49 changed files with 2767 additions and 78 deletions
|
@ -13,6 +13,30 @@
|
|||
|
||||
#---------------------------------- Content ---------------------------------#
|
||||
|
||||
#begin comment.png
|
||||
/importer:TextureImporter
|
||||
/processor:TextureProcessor
|
||||
/processorParam:ColorKeyColor=255,0,255,255
|
||||
/processorParam:ColorKeyEnabled=True
|
||||
/processorParam:GenerateMipmaps=False
|
||||
/processorParam:PremultiplyAlpha=True
|
||||
/processorParam:ResizeToPowerOfTwo=False
|
||||
/processorParam:MakeSquare=False
|
||||
/processorParam:TextureFormat=Color
|
||||
/build:comment.png
|
||||
|
||||
#begin eye.png
|
||||
/importer:TextureImporter
|
||||
/processor:TextureProcessor
|
||||
/processorParam:ColorKeyColor=255,0,255,255
|
||||
/processorParam:ColorKeyEnabled=True
|
||||
/processorParam:GenerateMipmaps=False
|
||||
/processorParam:PremultiplyAlpha=True
|
||||
/processorParam:ResizeToPowerOfTwo=False
|
||||
/processorParam:MakeSquare=False
|
||||
/processorParam:TextureFormat=Color
|
||||
/build:eye.png
|
||||
|
||||
#begin fonts/font08.spritefont
|
||||
/importer:FontDescriptionImporter
|
||||
/processor:FontDescriptionProcessor
|
||||
|
@ -69,6 +93,18 @@
|
|||
/processorParam:TextureFormat=Compressed
|
||||
/build:fonts/font99.spritefont
|
||||
|
||||
#begin location.png
|
||||
/importer:TextureImporter
|
||||
/processor:TextureProcessor
|
||||
/processorParam:ColorKeyColor=255,0,255,255
|
||||
/processorParam:ColorKeyEnabled=True
|
||||
/processorParam:GenerateMipmaps=False
|
||||
/processorParam:PremultiplyAlpha=True
|
||||
/processorParam:ResizeToPowerOfTwo=False
|
||||
/processorParam:MakeSquare=False
|
||||
/processorParam:TextureFormat=Color
|
||||
/build:location.png
|
||||
|
||||
#begin overlays/allied-star.png
|
||||
/importer:TextureImporter
|
||||
/processor:TextureProcessor
|
||||
|
|
BIN
Sledgemapper/Content/comment.png
Normal file
BIN
Sledgemapper/Content/comment.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.4 KiB |
BIN
Sledgemapper/Content/eye.png
Normal file
BIN
Sledgemapper/Content/eye.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.2 KiB |
BIN
Sledgemapper/Content/location.png
Normal file
BIN
Sledgemapper/Content/location.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.3 KiB |
|
@ -16,7 +16,7 @@ namespace Sledgemapper
|
|||
Dictionary<string, T> result = new();
|
||||
|
||||
FileInfo[] files = dir.GetFiles("*.*");
|
||||
foreach (FileInfo file in files.Where(f=>f.Extension!=".ttf"))
|
||||
foreach (FileInfo file in files.Where(f => f.Extension != ".ttf" && f.Extension != ".otf"))
|
||||
{
|
||||
result.Add(file.Name.Split('.')[0], contentManager.Load<T>(contentFolder + "/" + file.Name.Split('.')[0]));
|
||||
}
|
||||
|
|
|
@ -30,6 +30,9 @@ namespace Sledgemapper
|
|||
private Vector3 _viewportCenter = new(0, 0, 0);
|
||||
private bool _isDraggin;
|
||||
private Dictionary<string, SpriteFont> _fonts;
|
||||
private Texture2D _eye;
|
||||
private Texture2D _location;
|
||||
private Texture2D _comment;
|
||||
private readonly Session _sessionData;
|
||||
private AuthenticateResponse _authResponse;
|
||||
private MainWidget _mainWidget;
|
||||
|
@ -111,6 +114,7 @@ namespace Sledgemapper
|
|||
_mainWidget.MenuConnectUpload.Selected += OnMenuConnectUploadSelected;
|
||||
_mainWidget.MenuViewCenterOnSelection.Selected += OnMenuViewCenterOnSelectionSelected;
|
||||
_mainWidget.MenuViewShowCellNUmbers.Selected += OnMenuViewShowCellNUmbersSelected;
|
||||
_mainWidget.MenuViewShowNotes.Selected += OnMenuViewNotesSelected;
|
||||
_mainWidget.MenuConnectNew.Enabled = false;
|
||||
_mainWidget.MenuConnectJoin.Enabled = false;
|
||||
_mainWidget.MenuConnectSync.Enabled = false;
|
||||
|
@ -121,7 +125,9 @@ namespace Sledgemapper
|
|||
AddItemToToolGrid(_mainWidget.GridOverlays, OnOverlayButtonClicked, "overlays");
|
||||
|
||||
_fonts = Content.LoadContentFolder<SpriteFont>("fonts");
|
||||
|
||||
_eye = Content.Load<Texture2D>("eye");
|
||||
_location = Content.Load<Texture2D>("location");
|
||||
_comment = Content.Load<Texture2D>("comment");
|
||||
_desktop.Root = _mainWidget;
|
||||
}
|
||||
|
||||
|
@ -135,6 +141,28 @@ namespace Sledgemapper
|
|||
CenterOnSelectedTile();
|
||||
}
|
||||
|
||||
private void OnMenuViewNotesSelected(object sender, EventArgs e)
|
||||
{
|
||||
Window window = new()
|
||||
{
|
||||
Title = "Notes"
|
||||
};
|
||||
|
||||
var content = new NoteList();
|
||||
|
||||
foreach (var note in _sessionData.Notes.Values)
|
||||
{
|
||||
var item = new NoteListItem();
|
||||
item.LblNoteText.Text = $"{note.ToString()} - {note.Text}";
|
||||
item.BtnNoteCenter.Image = new TextureRegion(_location);
|
||||
item.BtnNoteView.Image = new TextureRegion(_eye);
|
||||
content.StackNotesList.AddChild(item);
|
||||
}
|
||||
|
||||
window.Content = content;
|
||||
window.ShowModal(_desktop);
|
||||
}
|
||||
|
||||
protected override void Update(GameTime gameTime)
|
||||
{
|
||||
KeyboardState newState = Keyboard.GetState();
|
||||
|
@ -199,60 +227,11 @@ namespace Sledgemapper
|
|||
|
||||
if (mouseState.RightButton == ButtonState.Released && mouseState.RightButton != oldMouseState.RightButton)
|
||||
{
|
||||
_state.SelectedTile.X = _state.HoveredTile.X;
|
||||
_state.SelectedTile.Y = _state.HoveredTile.Y;
|
||||
|
||||
var contextMenu = new TextButton { Text = "New Note" };
|
||||
contextMenu.Click += (s, e) =>
|
||||
{
|
||||
_desktop.HideContextMenu();
|
||||
var noteWindow = new NoteWindow();
|
||||
Window window = new()
|
||||
{
|
||||
Title = "Note"
|
||||
};
|
||||
noteWindow.BtnOk.Click += (s, e) =>
|
||||
{
|
||||
var note = new Note
|
||||
{
|
||||
X = _state.SelectedTile.X,
|
||||
Y = _state.SelectedTile.Y,
|
||||
Text = noteWindow.NoteText.Text
|
||||
};
|
||||
_sessionData.Notes.TryAdd(note.ToString(), note);
|
||||
|
||||
};
|
||||
// var content = new LoginRegisterWindow();
|
||||
// content.RdoLogin.IsPressed = true;
|
||||
// content.RdoLogin.Click += (s, e) =>
|
||||
// {
|
||||
// content.TxtFirstname.Visible = false;
|
||||
// content.TxtLastname.Visible = false;
|
||||
// content.TxtInitials.Visible = false;
|
||||
// content.LblFirstname.Visible = false;
|
||||
// content.LblLastname.Visible = false;
|
||||
// content.LblInitials.Visible = false;
|
||||
// content.BtnLogin.Visible = true;
|
||||
// content.BtnRegister.Visible = false;
|
||||
// window.Title = "Login";
|
||||
// };
|
||||
|
||||
// content.RdoRegister.Click += (s, e) =>
|
||||
// {
|
||||
// content.TxtFirstname.Visible = true;
|
||||
// content.TxtLastname.Visible = true;
|
||||
// content.TxtInitials.Visible = true;
|
||||
// content.LblFirstname.Visible = true;
|
||||
// content.LblLastname.Visible = true;
|
||||
// content.LblInitials.Visible = true;
|
||||
// content.BtnLogin.Visible = false;
|
||||
// content.BtnRegister.Visible = true;
|
||||
// window.Title = "Register";
|
||||
// };
|
||||
|
||||
// content.BtnRegister.Click += OnButtonRegisterClick;
|
||||
// content.BtnLogin.Click += OnButtonLoginClick;
|
||||
|
||||
window.Content = noteWindow;
|
||||
window.ShowModal(_desktop);
|
||||
};
|
||||
contextMenu.Click += OnContextMenuNewNoteClick;
|
||||
_desktop.ShowContextMenu(contextMenu, mouseState.Position);
|
||||
}
|
||||
|
||||
|
@ -531,7 +510,7 @@ namespace Sledgemapper
|
|||
|
||||
if (_showCellNumbers && _state.TileSize >= 30)
|
||||
{
|
||||
var ffont = _fonts.FirstOrDefault(m => int.Parse(m.Key.Replace("font", "")) > _state.TileSize / 8).Value ?? _fonts.Last().Value;
|
||||
var ffont = _fonts.Where(m => m.Key.Contains("awesome")).FirstOrDefault(m => int.Parse(m.Key.Replace("font", "")) > _state.TileSize / 8).Value ?? _fonts.Last().Value;
|
||||
var fscale = 1f;
|
||||
|
||||
for (var i = -1; i < visibleTilesX + 2; i++)
|
||||
|
@ -562,30 +541,46 @@ namespace Sledgemapper
|
|||
|
||||
private void DrawNotes()
|
||||
{
|
||||
if (_state.TileSize < 30)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
foreach (var note in _sessionData.Notes.Values)
|
||||
{
|
||||
var ffont = _fonts.FirstOrDefault(m => int.Parse(m.Key.Replace("font", "")) > _state.TileSize / 8).Value ?? _fonts.Last().Value;
|
||||
var fscale = 1f;
|
||||
// var ffont = _fonts.Where(m=>m.Key.Contains("awesome")).FirstOrDefault(m => int.Parse(m.Key.Replace("awesome", "")) > _state.TileSize / 8).Value ?? _fonts.Last().Value;
|
||||
// var fscale = 1f;
|
||||
|
||||
// _spriteBatch.DrawString(ffont,
|
||||
// "0xf06e",
|
||||
// new Vector2(
|
||||
// note.X * _state.TileSize + _state.TileSize - _state.TileSize / 3,
|
||||
// note.Y * _state.TileSize + _state.TileSize / 4
|
||||
// ),
|
||||
// Color.Black,
|
||||
// 0,
|
||||
// Vector2.Zero,
|
||||
// fscale,
|
||||
// SpriteEffects.None,
|
||||
// 0);
|
||||
|
||||
var screenPosition = new Point(note.X * _state.TileSize - (int)_viewportCenter.X, note.Y * _state.TileSize - (int)_viewportCenter.Y);
|
||||
|
||||
var x = screenPosition.X / _state.TileSize;
|
||||
var y = screenPosition.Y / _state.TileSize;
|
||||
|
||||
_spriteBatch.DrawString(ffont,
|
||||
"N",
|
||||
new Vector2(
|
||||
x * _state.TileSize + _state.TileSize - _state.TileSize/3,
|
||||
y * _state.TileSize + 2
|
||||
),
|
||||
Color.Black,
|
||||
0,
|
||||
Vector2.Zero,
|
||||
fscale,
|
||||
SpriteEffects.None,
|
||||
0);
|
||||
_spriteBatch.Draw(
|
||||
_comment,
|
||||
new Rectangle(
|
||||
note.X * _state.TileSize + _state.TileSize - (int)(_state.TileSize / 2) + _state.TileSize / 20,
|
||||
note.Y * _state.TileSize + _state.TileSize / 8 + _state.TileSize / 20,
|
||||
(int)(_state.TileSize / 2.5), (int)(_state.TileSize / 2.5 / 1.136)
|
||||
), Color.Black * .2f
|
||||
);
|
||||
|
||||
_spriteBatch.Draw(
|
||||
_comment,
|
||||
new Rectangle(
|
||||
note.X * _state.TileSize + _state.TileSize - (int)(_state.TileSize / 2),
|
||||
note.Y * _state.TileSize + _state.TileSize / 8,
|
||||
(int)(_state.TileSize / 2.5), (int)(_state.TileSize / 2.5 / 1.136)
|
||||
), Color.DarkRed
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -621,7 +616,7 @@ namespace Sledgemapper
|
|||
var color = player.Color.ToColor();
|
||||
_spriteBatch.DrawRectangle(new Rectangle(player.Position.X * _state.TileSize - 4, player.Position.Y * _state.TileSize - 4, _state.TileSize + 7, _state.TileSize + 7), color, 2);
|
||||
|
||||
var ffont = _fonts.FirstOrDefault(m => int.Parse(m.Key.Replace("font", "")) > _state.TileSize).Value ?? _fonts.Last().Value;
|
||||
var ffont = _fonts.Where(m => m.Key.Contains("awesome")).FirstOrDefault(m => int.Parse(m.Key.Replace("font", "")) > _state.TileSize).Value ?? _fonts.Last().Value;
|
||||
|
||||
var fscale = _state.TileSize / ((float)ffont.LineSpacing * 2);
|
||||
_spriteBatch.DrawString(ffont,
|
||||
|
@ -887,6 +882,89 @@ namespace Sledgemapper
|
|||
}
|
||||
}
|
||||
|
||||
private async void OnButtonNoteOkClick(object sender, EventArgs e)
|
||||
{
|
||||
var button = ((TextButton)sender);
|
||||
Container container = button.Parent;
|
||||
while (!(container is Window))
|
||||
{
|
||||
container = container.Parent;
|
||||
}
|
||||
|
||||
var localWindow = (Window)container;
|
||||
var localContent = localWindow.Content as NoteWindow;
|
||||
|
||||
if (!button.Enabled)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var isValid = true;
|
||||
isValid &= ValidateTextbox(localContent.NoteText);
|
||||
|
||||
|
||||
if (!isValid)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var successful = false;
|
||||
try
|
||||
{
|
||||
var note = new Note
|
||||
{
|
||||
X = _state.SelectedTile.X,
|
||||
Y = _state.SelectedTile.Y,
|
||||
Text = localContent.NoteText.Text
|
||||
};
|
||||
_sessionData.Notes.TryAdd(note.ToString(), note);
|
||||
|
||||
button.Text = "Wait...";
|
||||
// localContent.LblLoginError.Text = "";
|
||||
// localContent.LblLoginError.Visible = false;
|
||||
// _authResponse = await _communicationManager.Login(new AuthenticateModel
|
||||
// {
|
||||
// Username = localContent.TxtEmail.Text,
|
||||
// Password = localContent.TxtPassword.Text
|
||||
// });
|
||||
// successful = _authResponse != null;
|
||||
successful = true;
|
||||
}
|
||||
catch (Refit.ApiException refitException)
|
||||
{
|
||||
// localContent.LblLoginError.Text = refitException.Content;
|
||||
// localContent.LblLoginError.Visible = true;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
// localContent.LblLoginError.Text = "Can't connect to the server";
|
||||
// localContent.LblLoginError.Visible = true;
|
||||
}
|
||||
finally
|
||||
{
|
||||
button.Enabled = true;
|
||||
button.Text = "OK";
|
||||
}
|
||||
|
||||
if (successful)
|
||||
{
|
||||
localWindow.Close();
|
||||
}
|
||||
}
|
||||
|
||||
private async void OnButtonNoteCancelClick(object sender, EventArgs e)
|
||||
{
|
||||
var button = ((TextButton)sender);
|
||||
Container container = button.Parent;
|
||||
while (!(container is Window))
|
||||
{
|
||||
container = container.Parent;
|
||||
}
|
||||
|
||||
var localWindow = (Window)container;
|
||||
|
||||
localWindow.Close();
|
||||
}
|
||||
private async void OnButtonLoginClick(object sender, EventArgs e)
|
||||
{
|
||||
var button = ((TextButton)sender);
|
||||
|
@ -1045,6 +1123,22 @@ namespace Sledgemapper
|
|||
}
|
||||
}
|
||||
|
||||
private void OnContextMenuNewNoteClick(object sender, EventArgs e)
|
||||
{
|
||||
_desktop.HideContextMenu();
|
||||
var noteWindow = new NoteWindow();
|
||||
|
||||
Window window = new()
|
||||
{
|
||||
Title = $" Note on {_state.SelectedTile.X}:{_state.SelectedTile.Y}"
|
||||
};
|
||||
|
||||
noteWindow.BtnOk.Click += OnButtonNoteOkClick;
|
||||
noteWindow.BtnCancel.Click += OnButtonNoteCancelClick;
|
||||
window.Content = noteWindow;
|
||||
window.ShowModal(_desktop);
|
||||
}
|
||||
|
||||
private void OnOverlayButtonClicked(object sender, EventArgs e)
|
||||
{
|
||||
_state.CurrentOverlayId = ((ImageButton)sender).Id;
|
||||
|
@ -1087,6 +1181,7 @@ namespace Sledgemapper
|
|||
var content = new SessionWindow();
|
||||
content.BtnLogin.Text = "Join";
|
||||
content.BtnLogin.Click += OnButtonJoinSessionClicked;
|
||||
|
||||
window.Content = content;
|
||||
|
||||
window.ShowModal(_desktop);
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
/* Generated by MyraPad at 21/11/2020 00:18:48 */
|
||||
/* Generated by MyraPad at 01/12/2020 11:38:49 */
|
||||
using Myra;
|
||||
using Myra.Graphics2D;
|
||||
using Myra.Graphics2D.TextureAtlases;
|
||||
using Myra.Graphics2D.UI;
|
||||
|
@ -78,6 +79,11 @@ namespace Sledgemapper.UI
|
|||
menuItem1.Items.Add(MenuConnectSync);
|
||||
menuItem1.Items.Add(MenuConnectUpload);
|
||||
|
||||
MenuViewShowNotes = new MenuItem();
|
||||
MenuViewShowNotes.Text = "N&otes";
|
||||
MenuViewShowNotes.ShortcutText = "Ctrl+O";
|
||||
MenuViewShowNotes.Id = "MenuViewShowNotes";
|
||||
|
||||
MenuViewShowCellNUmbers = new MenuItem();
|
||||
MenuViewShowCellNUmbers.Text = "S&how cell numbers";
|
||||
MenuViewShowCellNUmbers.ShortcutText = "Ctrl+H";
|
||||
|
@ -90,6 +96,7 @@ namespace Sledgemapper.UI
|
|||
|
||||
var menuItem2 = new MenuItem();
|
||||
menuItem2.Text = "&View";
|
||||
menuItem2.Items.Add(MenuViewShowNotes);
|
||||
menuItem2.Items.Add(MenuViewShowCellNUmbers);
|
||||
menuItem2.Items.Add(MenuViewCenterOnSelection);
|
||||
|
||||
|
@ -259,6 +266,7 @@ namespace Sledgemapper.UI
|
|||
public MenuItem MenuConnectJoin;
|
||||
public MenuItem MenuConnectSync;
|
||||
public MenuItem MenuConnectUpload;
|
||||
public MenuItem MenuViewShowNotes;
|
||||
public MenuItem MenuViewShowCellNUmbers;
|
||||
public MenuItem MenuViewCenterOnSelection;
|
||||
public MenuItem MenuHelpAbout;
|
||||
|
@ -270,4 +278,4 @@ namespace Sledgemapper.UI
|
|||
public Label lblUsername;
|
||||
public Label lblSessionName;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
35
Sledgemapper/UI/NoteList.Generated.cs
Normal file
35
Sledgemapper/UI/NoteList.Generated.cs
Normal file
|
@ -0,0 +1,35 @@
|
|||
/* Generated by MyraPad at 01/12/2020 11:46:54 */
|
||||
using Myra;
|
||||
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 NoteList: ScrollViewer
|
||||
{
|
||||
private void BuildUI()
|
||||
{
|
||||
StackNotesList = new VerticalStackPanel();
|
||||
StackNotesList.Proportions.Add(new Proportion
|
||||
{
|
||||
Type = Myra.Graphics2D.UI.ProportionType.Fill,
|
||||
});
|
||||
StackNotesList.Id = "StackNotesList";
|
||||
|
||||
|
||||
Content = StackNotesList;
|
||||
}
|
||||
|
||||
|
||||
public VerticalStackPanel StackNotesList;
|
||||
}
|
||||
}
|
11
Sledgemapper/UI/NoteList.cs
Normal file
11
Sledgemapper/UI/NoteList.cs
Normal file
|
@ -0,0 +1,11 @@
|
|||
/* Generated by MyraPad at 01/12/2020 11:46:54 */
|
||||
namespace Sledgemapper.UI
|
||||
{
|
||||
public partial class NoteList
|
||||
{
|
||||
public NoteList()
|
||||
{
|
||||
BuildUI();
|
||||
}
|
||||
}
|
||||
}
|
55
Sledgemapper/UI/NoteListItem.Generated.cs
Normal file
55
Sledgemapper/UI/NoteListItem.Generated.cs
Normal file
|
@ -0,0 +1,55 @@
|
|||
/* Generated by MyraPad at 01/12/2020 15:39:17 */
|
||||
using Myra;
|
||||
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 NoteListItem: HorizontalStackPanel
|
||||
{
|
||||
private void BuildUI()
|
||||
{
|
||||
LblNoteText = new Label();
|
||||
LblNoteText.Text = "13:13 - Something like this, very long and trimmed";
|
||||
LblNoteText.AutoEllipsisMethod = Myra.Graphics2D.UI.AutoEllipsisMethod.Character;
|
||||
LblNoteText.Width = 300;
|
||||
LblNoteText.VerticalAlignment = Myra.Graphics2D.UI.VerticalAlignment.Center;
|
||||
LblNoteText.Id = "LblNoteText";
|
||||
|
||||
BtnNoteView = new ImageButton();
|
||||
BtnNoteView.Width = 30;
|
||||
BtnNoteView.Height = 30;
|
||||
BtnNoteView.Padding = new Thickness(5);
|
||||
BtnNoteView.VerticalAlignment = Myra.Graphics2D.UI.VerticalAlignment.Center;
|
||||
BtnNoteView.Id = "BtnNoteView";
|
||||
|
||||
BtnNoteCenter = new ImageButton();
|
||||
BtnNoteCenter.Width = 30;
|
||||
BtnNoteCenter.Height = 30;
|
||||
BtnNoteCenter.Padding = new Thickness(5);
|
||||
BtnNoteCenter.VerticalAlignment = Myra.Graphics2D.UI.VerticalAlignment.Center;
|
||||
BtnNoteCenter.Id = "BtnNoteCenter";
|
||||
|
||||
|
||||
Spacing = 15;
|
||||
VerticalAlignment = Myra.Graphics2D.UI.VerticalAlignment.Center;
|
||||
Widgets.Add(LblNoteText);
|
||||
Widgets.Add(BtnNoteView);
|
||||
Widgets.Add(BtnNoteCenter);
|
||||
}
|
||||
|
||||
|
||||
public Label LblNoteText;
|
||||
public ImageButton BtnNoteView;
|
||||
public ImageButton BtnNoteCenter;
|
||||
}
|
||||
}
|
11
Sledgemapper/UI/NoteListItem.cs
Normal file
11
Sledgemapper/UI/NoteListItem.cs
Normal file
|
@ -0,0 +1,11 @@
|
|||
/* Generated by MyraPad at 01/12/2020 14:29:43 */
|
||||
namespace Sledgemapper.UI
|
||||
{
|
||||
public partial class NoteListItem
|
||||
{
|
||||
public NoteListItem()
|
||||
{
|
||||
BuildUI();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -21,6 +21,7 @@
|
|||
<MenuItem Text="&Upload" ShortcutText="Ctrl+U" Id="MenuConnectUpload" />
|
||||
</MenuItem>
|
||||
<MenuItem Text="&View">
|
||||
<MenuItem Text="N&otes" ShortcutText="Ctrl+O" Id="MenuViewShowNotes" />
|
||||
<MenuItem Text="S&how cell numbers" ShortcutText="Ctrl+H" Id="MenuViewShowCellNUmbers" />
|
||||
<MenuItem Text="C&enter on selection" ShortcutText="Ctrl+E" Id="MenuViewCenterOnSelection" />
|
||||
</MenuItem>
|
||||
|
|
10
Sledgemapper/UI/noteList.xml.xmmp
Normal file
10
Sledgemapper/UI/noteList.xml.xmmp
Normal file
|
@ -0,0 +1,10 @@
|
|||
<Project>
|
||||
<Project.ExportOptions Namespace="Sledgemapper.UI" Class="NoteList" OutputPath="C:\dev\Map\Sledgemapper\UI" />
|
||||
<ScrollViewer>
|
||||
<VerticalStackPanel Id="StackNotesList">
|
||||
<VerticalStackPanel.Proportions>
|
||||
<Proportion Type="Fill" />
|
||||
</VerticalStackPanel.Proportions>
|
||||
</VerticalStackPanel>
|
||||
</ScrollViewer>
|
||||
</Project>
|
8
Sledgemapper/UI/noteListItem.xmmp
Normal file
8
Sledgemapper/UI/noteListItem.xmmp
Normal file
|
@ -0,0 +1,8 @@
|
|||
<Project>
|
||||
<Project.ExportOptions Namespace="Sledgemapper.UI" Class="NoteListItem" OutputPath="C:\dev\Map\Sledgemapper\UI" />
|
||||
<HorizontalStackPanel Spacing="15" VerticalAlignment="Center">
|
||||
<Label Text="13:13 - Something like this, very long and trimmed" AutoEllipsisMethod="Character" Width="300" VerticalAlignment="Center" Id="LblNoteText" />
|
||||
<ImageButton Width="30" Height="30" Padding="5" VerticalAlignment="Center" Id="BtnNoteView" />
|
||||
<ImageButton Width="30" Height="30" Padding="5" VerticalAlignment="Center" Id="BtnNoteCenter" />
|
||||
</HorizontalStackPanel>
|
||||
</Project>
|
Loading…
Add table
Add a link
Reference in a new issue