complete prototype

This commit is contained in:
Alexander Popov 2021-02-04 11:53:40 +03:00
parent 2dfc5a13b3
commit 5dfe38ca4d
5 changed files with 49 additions and 16 deletions

1
.gitignore vendored
View File

@ -1,2 +1,3 @@
bin/ bin/
obj/ obj/
Build/

View File

@ -9,10 +9,10 @@ class Program
Application.Init(); Application.Init();
var top = Application.Top; var top = Application.Top;
var win = new Window("Delver Save Editor") var mainWindow = new Window("Delver Save Editor")
{ X = 0, Y = 0, Width = Dim.Fill(), Height = Dim.Fill() }; { X = 0, Y = 0, Width = Dim.Fill(), Height = Dim.Fill() };
var menu = new MenuBar (new MenuBarItem [] { var menuWindow = new MenuBar (new MenuBarItem [] {
new MenuBarItem ("_File", new MenuItem [] { new MenuBarItem ("_File", new MenuItem [] {
new MenuItem ("_Refresh", "Refresh Delver saves", null), new MenuItem ("_Refresh", "Refresh Delver saves", null),
new MenuItem ("_About", "About this program", null), new MenuItem ("_About", "About this program", null),
@ -22,7 +22,9 @@ class Program
// var statusBar = new StatusBar (new Label("Delver path: ")); // var statusBar = new StatusBar (new Label("Delver path: "));
var delverPathLabel = new Label("Delver path:") var delverPathLabel = new Label("Delver path:")
{ X = 1, Y = 1, Width = Dim.Fill (), Height = 1 }; { X = 1, Y = 1, Width = 13, Height = 1 };
var delverPathField = new TextField("null")
{ X = 14, Y = 1, Width = Dim.Fill(), Height = 1 };
var savesListData = new List<string>() { "Save 0", "Save 1", "Save 3" }; var savesListData = new List<string>() { "Save 0", "Save 1", "Save 3" };
var savesList = new ListView(savesListData) { var savesList = new ListView(savesListData) {
@ -36,15 +38,35 @@ class Program
var savesWindow = new Window("Saves slot") var savesWindow = new Window("Saves slot")
{ X = 0, Y = 3, Width = 20, Height = Dim.Fill() }; { X = 0, Y = 3, Width = 20, Height = Dim.Fill() };
savesWindow.Add(savesList);
var dataWindow = new Window("Data Editor") var dataWindow = new Window("Data Editor")
{ { X = 21, Y = 3, Width = Dim.Fill(), Height = Dim.Fill() };
X = 21, Y = 3, Width = Dim.Fill(), Height = Dim.Fill() var playerHpLabel = new Label("HP:")
}; { X = 0, Y = 0, Width = 10, Height = 1, TextAlignment = Terminal.Gui.TextAlignment.Right };
var playerHp = new TextField()
{ X = 11, Y = 0, Width = Dim.Fill() - 1, Height = 1 };
var playerMaxHpLabel = new Label("Max HP:")
{ X = 0, Y = 2, Width = 10, Height = 1, TextAlignment = Terminal.Gui.TextAlignment.Right };
var playerMaxHp = new TextField()
{ X = 11, Y = 2, Width = Dim.Fill() - 1, Height = 1 };
var playerGoldLabel = new Label("Gold:")
{ X = 0, Y = 4, Width = 10, Height = 1, TextAlignment = Terminal.Gui.TextAlignment.Right };
var playerGold = new TextField()
{ X = 11, Y = 4, Width = Dim.Fill() - 1, Height = 1 };
var playerXpLabel = new Label("XP:")
{ X = 0, Y = 6, Width = 10, Height = 1, TextAlignment = Terminal.Gui.TextAlignment.Right };
var playerXp = new TextField()
{ X = 11, Y = 6, Width = Dim.Fill() - 1, Height = 1 };
top.Add(win, menu); savesWindow.Add(savesList);
win.Add(delverPathLabel, savesWindow, dataWindow); dataWindow.Add
(
playerHpLabel,playerHp,
playerMaxHpLabel, playerMaxHp,
playerGoldLabel, playerGold,
playerXpLabel, playerXp
);
mainWindow.Add(delverPathLabel, delverPathField, savesWindow, dataWindow);
top.Add(mainWindow, menuWindow);
Application.Run(); Application.Run();
} }

1
README.md Normal file
View File

@ -0,0 +1 @@

BIN
application.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 422 KiB

View File

@ -4,6 +4,15 @@
<OutputType>Exe</OutputType> <OutputType>Exe</OutputType>
<TargetFramework>net5.0</TargetFramework> <TargetFramework>net5.0</TargetFramework>
<RootNamespace>delver_se</RootNamespace> <RootNamespace>delver_se</RootNamespace>
<RuntimeIdentifiers>win-x64;linux-x64;osx-x64</RuntimeIdentifiers>
<BuildDir>Build</BuildDir>
<PlatformTarget>x64</PlatformTarget>
<Version>0.1.0</Version>
<Company>Turn Around</Company>
<Authors>Alexander Popov</Authors>
<Product>Delver SE</Product>
<ApplicationIcon>application.ico</ApplicationIcon>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>