minimap work
This commit is contained in:
parent
802f1030d5
commit
ba8626b470
7 changed files with 312 additions and 118 deletions
|
|
@ -51,6 +51,9 @@ public partial class MainWindowViewModel : ObservableObject
|
|||
[ObservableProperty] private Bitmap? _inventoryImage;
|
||||
[ObservableProperty] private Bitmap? _minimapImage;
|
||||
[ObservableProperty] private string _navigationStateText = "";
|
||||
[ObservableProperty] private MinimapDebugStage _selectedMinimapStage = MinimapDebugStage.WorldMap;
|
||||
|
||||
public static MinimapDebugStage[] MinimapStages { get; } = Enum.GetValues<MinimapDebugStage>();
|
||||
|
||||
[ObservableProperty] private string _newUrl = "";
|
||||
[ObservableProperty] private string _newLinkName = "";
|
||||
|
|
@ -198,7 +201,7 @@ public partial class MainWindowViewModel : ObservableObject
|
|||
f12WasDown = f12Down;
|
||||
|
||||
// Minimap capture + display
|
||||
var bytes = _bot.Navigation.ProcessFrame();
|
||||
var bytes = _bot.Navigation.ProcessFrame(SelectedMinimapStage);
|
||||
if (bytes != null)
|
||||
{
|
||||
var bmp = new Bitmap(new MemoryStream(bytes));
|
||||
|
|
|
|||
|
|
@ -113,10 +113,15 @@
|
|||
<DockPanel>
|
||||
<StackPanel DockPanel.Dock="Top" Orientation="Horizontal" Margin="0,0,0,4">
|
||||
<TextBlock Text="MINIMAP" FontSize="11" FontWeight="SemiBold"
|
||||
Foreground="#8b949e" />
|
||||
Foreground="#8b949e" VerticalAlignment="Center" />
|
||||
<TextBlock Text="{Binding NavigationStateText}"
|
||||
FontSize="11" Foreground="#58a6ff" Margin="8,0,0,0" />
|
||||
FontSize="11" Foreground="#58a6ff" Margin="8,0,0,0"
|
||||
VerticalAlignment="Center" />
|
||||
</StackPanel>
|
||||
<ComboBox DockPanel.Dock="Top"
|
||||
ItemsSource="{x:Static vm:MainWindowViewModel.MinimapStages}"
|
||||
SelectedItem="{Binding SelectedMinimapStage}"
|
||||
FontSize="11" Margin="0,0,0,4" />
|
||||
<Grid>
|
||||
<Image Source="{Binding MinimapImage}" Stretch="Uniform"
|
||||
RenderOptions.BitmapInterpolationMode="None" />
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue