mirror of
https://github.com/haven1433/HexManiacAdvance.git
synced 2026-04-29 09:47:02 -05:00
show selected tile index in block editor
This commit is contained in:
parent
e4473d1a40
commit
f7e6c73d25
|
|
@ -418,6 +418,7 @@ namespace HavenSoft.HexManiac.Core.ViewModels.Map {
|
||||||
|
|
||||||
private IPixelViewModel drawTileRender;
|
private IPixelViewModel drawTileRender;
|
||||||
public IPixelViewModel DrawTileRender => drawTileRender;
|
public IPixelViewModel DrawTileRender => drawTileRender;
|
||||||
|
public int DrawTileIndex => drawTile;
|
||||||
|
|
||||||
public BlockEditor(ChangeHistory<ModelDelta> history, IDataModel listSource, MapTutorialsViewModel tutorials, short[][] palettes, int[][,] tiles, byte[][] blocks, byte[][] blockAttributes) {
|
public BlockEditor(ChangeHistory<ModelDelta> history, IDataModel listSource, MapTutorialsViewModel tutorials, short[][] palettes, int[][,] tiles, byte[][] blocks, byte[][] blockAttributes) {
|
||||||
this.history = history;
|
this.history = history;
|
||||||
|
|
@ -739,7 +740,7 @@ namespace HavenSoft.HexManiac.Core.ViewModels.Map {
|
||||||
private void UpdateDrawTileRender() {
|
private void UpdateDrawTileRender() {
|
||||||
var palette = SpriteTool.CreatePaletteWithUniqueTransparentColor(palettes[drawPalette]);
|
var palette = SpriteTool.CreatePaletteWithUniqueTransparentColor(palettes[drawPalette]);
|
||||||
drawTileRender = new CanvasPixelViewModel(8, 8, SpriteTool.Render(tiles[drawTile], palette, 0, 0)) { Transparent = palette[0], SpriteScale = 4 };
|
drawTileRender = new CanvasPixelViewModel(8, 8, SpriteTool.Render(tiles[drawTile], palette, 0, 0)) { Transparent = palette[0], SpriteScale = 4 };
|
||||||
NotifyPropertiesChanged(nameof(DrawTileRender));
|
NotifyPropertiesChanged(nameof(DrawTileRender), nameof(DrawTileIndex));
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
|
||||||
|
|
@ -1534,9 +1534,12 @@
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
<StackPanel DockPanel.Dock="Top" HorizontalAlignment="Center" Orientation="Horizontal" Margin="0,0,0,4" DataContext="{Binding PrimaryMap.BlockEditor}">
|
<StackPanel DockPanel.Dock="Top" HorizontalAlignment="Center" Orientation="Horizontal" Margin="0,0,0,4" DataContext="{Binding PrimaryMap.BlockEditor}">
|
||||||
<TextBlock Text="Selected Tile:" VerticalAlignment="Center" Margin="5,0" Width="100" TextAlignment="Right" />
|
<TextBlock Text="Selected Tile:" VerticalAlignment="Center" Margin="5,0" Width="100" TextAlignment="Right" />
|
||||||
<Border Padding="2" BorderBrush="{DynamicResource Secondary}" BorderThickness="1" Margin="0,0,30,0" VerticalAlignment="Center" HorizontalAlignment="Left">
|
<StackPanel Margin="0,10,30,0" HorizontalAlignment="Left">
|
||||||
<local:PixelImage DataContext="{Binding DrawTileRender}" TransparentBrush="{DynamicResource Background}" />
|
<Border Padding="2" BorderBrush="{DynamicResource Secondary}" BorderThickness="1" VerticalAlignment="Center">
|
||||||
</Border>
|
<local:PixelImage DataContext="{Binding DrawTileRender}" TransparentBrush="{DynamicResource Background}" />
|
||||||
|
</Border>
|
||||||
|
<TextBlock HorizontalAlignment="Center" Text="{Binding DrawTileIndex}" />
|
||||||
|
</StackPanel>
|
||||||
<TextBlock VerticalAlignment="Center" Margin="5,0" TextAlignment="Center">
|
<TextBlock VerticalAlignment="Center" Margin="5,0" TextAlignment="Center">
|
||||||
<Run Text="Selected Palette:" />
|
<Run Text="Selected Palette:" />
|
||||||
<LineBreak />
|
<LineBreak />
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user