Skip to content

Commit

Permalink
Advanced Search: Consider ProRef and Song2daBitmap datatypes as numeric
Browse files Browse the repository at this point in the history
  • Loading branch information
Argent77 committed Nov 27, 2024
1 parent 4745cc1 commit a24cf49
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/org/infinity/gui/StructViewer.java
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,12 @@
import org.infinity.datatype.IsNumeric;
import org.infinity.datatype.IsReference;
import org.infinity.datatype.IsTextual;
import org.infinity.datatype.ProRef;
import org.infinity.datatype.Readable;
import org.infinity.datatype.ResourceRef;
import org.infinity.datatype.SectionCount;
import org.infinity.datatype.SectionOffset;
import org.infinity.datatype.Song2daBitmap;
import org.infinity.datatype.TextBitmap;
import org.infinity.datatype.TextString;
import org.infinity.datatype.Unknown;
Expand Down Expand Up @@ -1567,6 +1569,9 @@ private void addToAdvancedSearch(StructEntry entry) {
if (entry instanceof Flag) {
so = new SearchOptions();
so.setValueBitfield(((Flag) entry).getValue(), SearchOptions.BitFieldMode.EXACT);
} else if (entry instanceof ProRef || entry instanceof Song2daBitmap) {
so = new SearchOptions();
so.setValueNumber(((IsNumeric) entry).getValue());
} else if (entry instanceof IsReference) {
so = new SearchOptions();
so.setValueResource(((IsReference) entry).getResourceName());
Expand Down

0 comments on commit a24cf49

Please sign in to comment.