This commit is contained in:
Benjamin Popp 2020-09-11 07:08:06 -05:00
parent 38d7680081
commit a83e380991
3 changed files with 8 additions and 15 deletions

View File

@ -170,7 +170,7 @@
76 hidepokepic # hides all shown pokepics
77 showcontestwinner contest. # nop in FireRed. Shows the painting of a wenner of the given contest.
78 braille text<> # displays a message in braille. The text must be formatted to use braille.
79 givePokemon species:data.pokemon.names level. item: filler:: filler:: filler.
79 givePokemon species:data.pokemon.names level. item: filler. filler:: filler::
# gives the player one of that pokemon. the last 9 bytes are all 00.
# 800D=0 if it was added to the party
# 800D=1 if it was put in the PC

View File

@ -14,6 +14,9 @@ using Xunit;
namespace HavenSoft.HexManiac.Tests {
public class ToolTests : BaseViewModelTestClass {
private readonly ThumbParser parser;
public ToolTests() => parser = new ThumbParser(Singletons);
[Fact]
public void ViewPortHasTools() {
var viewPort = new ViewPort(new LoadedFile("file.txt", new byte[100]));
@ -90,11 +93,8 @@ namespace HavenSoft.HexManiac.Tests {
[Fact]
public void HideCommandClosesAnyOpenTools() {
var model = new PokemonModel(new byte[0x200]);
var history = new ChangeHistory<ModelDelta>(null);
var tools = new ToolTray(singletons, model, new Selection(new ScrollRegion(), model), history, null) {
SelectedIndex = 1
};
var tools = ViewPort.Tools;
tools.SelectedIndex = 1;
tools.HideCommand.Execute();
Assert.Equal(-1, tools.SelectedIndex);
@ -614,12 +614,5 @@ namespace HavenSoft.HexManiac.Tests {
Assert.EndsWith("/2", tableTool.CurrentElementName);
}
private static readonly Singletons singletons;
private static readonly ThumbParser parser;
static ToolTests() {
singletons = new Singletons();
parser = new ThumbParser(singletons);
}
}
}

View File

@ -37,8 +37,8 @@ namespace HavenSoft.HexManiac.Tests {
[Fact]
public void NewColor_Draw_PixelsChange() {
var palette = editor.Palette;
palette.Elements[0].Color = Rgb(31, 31, 31);
palette.Elements[0].Selected = true;
palette.Elements[1].Color = Rgb(31, 31, 31);
palette.Elements[1].Selected = true;
editor.ToolDown(new Point(0, 0));
editor.ToolUp(new Point(0, 0));