Skip to content

Commit 77784c9

Browse files
committed
Remove highlight mode, always use set by set
1 parent b74e1be commit 77784c9

File tree

7 files changed

+24
-123
lines changed

7 files changed

+24
-123
lines changed

EnhancePoE/App.config

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,6 @@
8282
<setting name="ColorAmulet" serializeAs="String">
8383
<value>#FFFF0303</value>
8484
</setting>
85-
<setting name="HighlightMode" serializeAs="String">
86-
<value>0</value>
87-
</setting>
8885
<setting name="FillWithChaos" serializeAs="String">
8986
<value>True</value>
9087
</setting>

EnhancePoE/Model/Data.cs

Lines changed: 24 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using System;
1+
using System;
22
using System.Collections.Generic;
33
using System.Diagnostics;
44
using System.Threading;
@@ -606,83 +606,43 @@ public static void CalculateItemAmounts()
606606

607607
public static void ActivateNextCell( bool active, Cell cell )
608608
{
609-
if ( !active )
609+
if ( !active || ItemSetListHighlight.Count == 0 )
610610
{
611611
return;
612612
}
613613

614614
var stashTab = MainWindow.Instance.SelectedStashTab;
615-
if ( Properties.Settings.Default.HighlightMode == 0 )
616-
{
617-
//activate cell by cell
618-
stashTab.DeactivateItemCells();
619615

620-
// remove if itemlist empty
621-
if ( ItemSetListHighlight.Count > 0 && ItemSetListHighlight[0].ItemList.Count == 0 )
616+
Trace.WriteLine( ItemSetListHighlight[0].ItemList.Count, "item list count" );
617+
Trace.WriteLine( ItemSetListHighlight.Count, "itemset list ocunt" );
618+
619+
// check for full sets
620+
if ( ItemSetListHighlight[0].EmptyItemSlots.Count == 0 )
621+
{
622+
if ( cell != null )
622623
{
623-
ItemSetListHighlight.RemoveAt( 0 );
624+
var highlightItem = cell.CellItem;
625+
stashTab.DeactivateSingleItemCells( cell.CellItem );
626+
_ = ItemSetListHighlight[0].ItemList.Remove( highlightItem );
624627
}
625628

626-
// next item if itemlist not empty
627-
if ( ItemSetListHighlight.Count > 0 && ItemSetListHighlight[0].ItemList.Count > 0 && ItemSetListHighlight[0].EmptyItemSlots.Count == 0 )
629+
foreach ( var i in ItemSetListHighlight[0].ItemList )
628630
{
629-
var highlightItem = ItemSetListHighlight[0].ItemList[0];
630-
stashTab.ActivateItemCells( highlightItem );
631-
ItemSetListHighlight[0].ItemList.RemoveAt( 0 );
631+
stashTab.ActivateItemCells( i );
632632
}
633-
}
634-
else if ( Properties.Settings.Default.HighlightMode == 1 )
635-
{
636-
// activate whole set
637-
if ( ItemSetListHighlight.Count > 0 )
638-
{
639-
Trace.WriteLine( ItemSetListHighlight[0].ItemList.Count, "item list count" );
640-
Trace.WriteLine( ItemSetListHighlight.Count, "itemset list ocunt" );
641-
// check for full sets
642-
643-
if ( ItemSetListHighlight[0].EmptyItemSlots.Count == 0 )
644-
{
645-
if ( cell != null )
646-
{
647-
var highlightItem = cell.CellItem;
648-
stashTab.DeactivateSingleItemCells( cell.CellItem );
649-
_ = ItemSetListHighlight[0].ItemList.Remove( highlightItem );
650-
}
651-
652-
foreach ( var i in ItemSetListHighlight[0].ItemList )
653-
{
654-
stashTab.ActivateItemCells( i );
655-
}
656-
657-
// mark item order
658-
if ( ItemSetListHighlight[0] != null && ItemSetListHighlight[0].ItemList.Count > 0 )
659-
{
660-
stashTab.MarkNextItem( ItemSetListHighlight[0].ItemList[0] );
661-
}
662-
if ( ItemSetListHighlight[0].ItemList.Count == 0 )
663-
{
664-
ItemSetListHighlight.RemoveAt( 0 );
665633

666-
// activate next set
667-
ActivateNextCell( true, null );
668-
}
669-
}
634+
// mark item order
635+
if ( ItemSetListHighlight[0]?.ItemList.Count > 0 )
636+
{
637+
stashTab.MarkNextItem( ItemSetListHighlight[0].ItemList[0] );
670638
}
671-
}
672-
else if ( Properties.Settings.Default.HighlightMode == 2 )
673-
{
674-
//activate all cells at once
675-
if ( ItemSetListHighlight.Count > 0 )
639+
640+
if ( ItemSetListHighlight[0].ItemList.Count == 0 )
676641
{
677-
foreach ( var set in ItemSetListHighlight )
678-
{
679-
if ( set.EmptyItemSlots.Count == 0 && cell != null )
680-
{
681-
var highlightItem = cell.CellItem;
682-
stashTab.DeactivateSingleItemCells( cell.CellItem );
683-
_ = ItemSetListHighlight[0].ItemList.Remove( highlightItem );
684-
}
685-
}
642+
ItemSetListHighlight.RemoveAt( 0 );
643+
644+
// activate next set
645+
ActivateNextCell( true, null );
686646
}
687647
}
688648
}

EnhancePoE/Model/StashTab.cs

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -187,17 +187,5 @@ public void MarkNextItem( Item item )
187187
}
188188
}
189189
}
190-
191-
public void ShowNumbersOnActiveCells( int index )
192-
{
193-
index++;
194-
foreach ( var cell in OverlayCellsList )
195-
{
196-
if ( cell.Active )
197-
{
198-
cell.ButtonName = index.ToString();
199-
}
200-
}
201-
}
202190
}
203191
}

EnhancePoE/Properties/Settings.Designer.cs

Lines changed: 0 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

EnhancePoE/Properties/Settings.settings

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,6 @@
7474
<Setting Name="ColorAmulet" Type="System.String" Scope="User">
7575
<Value Profile="(Default)">#FFFF0303</Value>
7676
</Setting>
77-
<Setting Name="HighlightMode" Type="System.Int32" Scope="User">
78-
<Value Profile="(Default)">0</Value>
79-
</Setting>
8077
<Setting Name="FillWithChaos" Type="System.Boolean" Scope="User">
8178
<Value Profile="(Default)">True</Value>
8279
</Setting>

EnhancePoE/View/MainWindow.xaml

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -406,8 +406,6 @@
406406
<RowDefinition Height="25" />
407407
<RowDefinition Height="5" />
408408
<RowDefinition Height="25" />
409-
<RowDefinition Height="5" />
410-
<RowDefinition Height="25" />
411409
<RowDefinition Height="10" />
412410
</Grid.RowDefinitions>
413411

@@ -462,23 +460,6 @@
462460
Name="ColorStashPicker"
463461
ColorMode="ColorCanvas"
464462
SelectedColorChanged="OnColorStashPickerSelectedColorChanged" />
465-
466-
<TextBlock Grid.Column="1"
467-
Grid.Row="9"
468-
VerticalAlignment="Center"
469-
Text="Highlight Mode:"
470-
ToolTipService.InitialShowDelay="50"
471-
ToolTip="Item by Item: highlights each item after another. &#x0a;Set by Set: highlights a full set at once, each after another. &#x0a;All Items: highlights all items at once." />
472-
<ComboBox Grid.Column="3"
473-
Grid.Row="9"
474-
Name="HighlightModeComboBox"
475-
Width="200"
476-
VerticalContentAlignment="Center"
477-
SelectedIndex="{Binding Source={x:Static properties:Settings.Default}, Path=HighlightMode, Mode=TwoWay}">
478-
<ComboBoxItem Content="Item by Item" />
479-
<ComboBoxItem Content="Set by Set" />
480-
<ComboBoxItem Content="All Items" />
481-
</ComboBox>
482463
</Grid>
483464
</StackPanel>
484465
</TabItem>

EnhancePoE/View/StashTabWindow.xaml.cs

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -89,16 +89,6 @@ public StashTabWindow()
8989

9090
Data.PrepareSelling();
9191
Data.ActivateNextCell( true, null );
92-
if ( Properties.Settings.Default.HighlightMode == 2 )
93-
{
94-
foreach ( var set in Data.ItemSetListHighlight )
95-
{
96-
foreach ( var item in set.ItemList )
97-
{
98-
tab.ActivateItemCells( item );
99-
}
100-
}
101-
}
10292

10393
MainWindow.Overlay.OpenStashOverlayButtonContent = "Hide";
10494

0 commit comments

Comments
 (0)