diff --git a/English.lproj/MainMenu.xib b/English.lproj/MainMenu.xib index eab4a9f..9e3d567 100644 --- a/English.lproj/MainMenu.xib +++ b/English.lproj/MainMenu.xib @@ -12,8 +12,8 @@ YES - - + + YES @@ -324,6 +324,25 @@ + + + YES + YES + + + 2147483647 + + + + + + Find Item + f + 1048576 + 2147483647 + + + YES @@ -492,7 +511,7 @@ 7 2 - {{347, 255}, {670, 481}} + {{347, 340}, {585, 396}} 1954021376 Inside Job NSWindow @@ -506,7 +525,7 @@ 266 - {{211, 454}, {451, 14}} + {{211, 369}, {366, 14}} YES @@ -542,7 +561,7 @@ 268 - {{53, 415}, {85, 19}} + {{101, 327}, {85, 19}} YES @@ -585,7 +604,7 @@ NaN - + YES YES @@ -595,7 +614,7 @@ - + 0 0 YES @@ -603,7 +622,7 @@ 1 AAAAAAAAAAAAAAAAAAAAAA - + 3 YES @@ -638,7 +657,7 @@ 268 - {{8, 417}, {40, 14}} + {{56, 329}, {40, 14}} YES @@ -654,7 +673,7 @@ 10 - {{0, 440}, {670, 5}} + {{0, 355}, {585, 5}} {0, 0} @@ -680,7 +699,7 @@ 268 - {{11, 449}, {195, 25}} + {{11, 364}, {195, 25}} YES @@ -724,39 +743,39 @@ 2 - + 268 - {{78, 277}, {360, 120}} + {{11, 58}, {360, 120}} IJInventoryView - + 268 - {{78, 217}, {360, 40}} + {{11, 10}, {360, 40}} IJInventoryView - + 268 - {{20, 237}, {40, 160}} + {{11, 186}, {40, 160}} IJInventoryView - + 265 - {{482, 412}, {177, 22}} + {{379, 327}, {195, 22}} YES - + 343014976 268436544 - + YES 1 @@ -765,9 +784,9 @@ 130560 0 search - + _searchFieldSearch: - + 138690815 0 @@ -794,9 +813,9 @@ - + _searchFieldCancel: - + 138690815 0 @@ -807,21 +826,21 @@ CAAAAA - + 4369 YES - - + + 2304 YES - - + + 4352 - {205, 403} - + {193, 307} + YES @@ -830,7 +849,7 @@ YES - + itemId 40 40 @@ -840,7 +859,7 @@ 2048 - + 3 MC4zMzMzMzI5ODU2AA @@ -851,12 +870,12 @@ - + 337772096 -2080372736 Text Cell - + YES @@ -888,10 +907,10 @@ NaN - + - - + + 3 YES @@ -904,7 +923,7 @@ NO YES - + 6 System @@ -916,9 +935,9 @@ 3 YES YES - + - + image 32 10 @@ -936,7 +955,7 @@ - + 67239424 33554432 @@ -948,11 +967,11 @@ 3 YES YES - + - + name - 124 + 112 40 1000 @@ -960,22 +979,22 @@ 2048 - + - + 337772096 2048 Text Cell - + 3 YES YES - + 3 @@ -1001,44 +1020,44 @@ 0 - {{1, 1}, {205, 403}} - - - + {{1, 1}, {193, 307}} + + + 4 - - + + -2147483392 {{191, 17}, {15, 365}} - - + + _doScroller: 0.9974811083123426 - - + + -2147483392 {{1, 382}, {190, 15}} - + 1 - + _doScroller: 0.99514563106796117 - {{464, -1}, {207, 405}} + {{379, 10}, {195, 309}} - + 562 - - - + + + QSAAAEEgAABBmAAAQZgAAA - {670, 481} + {585, 396} {{0, 0}, {1440, 878}} @@ -1326,7 +1345,7 @@ inventoryView - + 642 @@ -1334,7 +1353,7 @@ armorView - + 645 @@ -1342,7 +1361,7 @@ quickView - + 646 @@ -1350,7 +1369,7 @@ itemSearchField - + 659 @@ -1358,14 +1377,14 @@ itemTableView - + 660 dataSource - + 661 @@ -1373,7 +1392,7 @@ delegate - + 662 @@ -1382,7 +1401,7 @@ updateItemSearchFilter: - + 663 @@ -1390,10 +1409,18 @@ initialFirstResponder - + 668 + + + makeSearchFieldFirstResponder: + + + + 670 + @@ -1525,6 +1552,8 @@ + + @@ -1761,15 +1790,15 @@ YES - - - - - - - + + + + + + + @@ -1883,7 +1912,7 @@ 641 - + YES @@ -1891,110 +1920,120 @@ 643 - + 644 - + 647 - + YES - + 648 - - + + 649 - + YES - - - + + + 650 - - + + 651 - - + + 652 - + YES - - - + + + - + 654 - + YES - + - + 655 - + YES - + - + 656 - - + + 657 - + YES - + - + 658 - - + + 665 - + YES - + - + 667 - - + + + + + 669 + + + + + 671 + + @@ -2052,6 +2091,7 @@ 207.ImportedFromIB2 211.IBPluginDependency 211.ImportedFromIB2 + 212.IBEditorWindowLastContentRect 212.IBPluginDependency 212.ImportedFromIB2 212.editorWindowContentRectSynchronizationRect @@ -2143,6 +2183,8 @@ 658.IBNumberFormatterLocalizesFormatMetadataKey 658.IBPluginDependency 667.IBPluginDependency + 669.IBPluginDependency + 671.IBPluginDependency 74.IBPluginDependency 74.ImportedFromIB2 75.IBPluginDependency @@ -2202,7 +2244,7 @@ com.apple.InterfaceBuilder.CocoaPlugin - {{525, 653}, {158, 183}} + {{525, 623}, {160, 213}} com.apple.InterfaceBuilder.CocoaPlugin {{187, 434}, {243, 243}} @@ -2212,6 +2254,7 @@ com.apple.InterfaceBuilder.CocoaPlugin + {{685, 603}, {164, 43}} com.apple.InterfaceBuilder.CocoaPlugin {{608, 612}, {167, 43}} @@ -2242,9 +2285,9 @@ {{475, 832}, {234, 43}} com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin - {{114, 210}, {670, 481}} + {{114, 295}, {585, 396}} com.apple.InterfaceBuilder.CocoaPlugin - {{114, 210}, {670, 481}} + {{114, 295}, {585, 396}} {{33, 99}, {480, 360}} {3.40282e+38, 3.40282e+38} @@ -2279,7 +2322,7 @@ com.apple.InterfaceBuilder.CocoaPlugin - P4AAAL+AAABCPAAAw72AAA + P4AAAL+AAABDMgAAw6wAAA com.apple.InterfaceBuilder.CocoaPlugin @@ -2287,7 +2330,7 @@ com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin - P4AAAL+AAABBiAAAw60AAA + P4AAAL+AAABDBQAAw6qAAA com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin @@ -2299,15 +2342,15 @@ com.apple.InterfaceBuilder.CocoaPlugin - AUKcAABDdgAAA + AUKcAABDFQAAA com.apple.InterfaceBuilder.CocoaPlugin - AUKcAABDRgAAA + AUKcAABCygAAA com.apple.InterfaceBuilder.CocoaPlugin - AUEwAABDRgAAA + AUKcAABDioAAA com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin @@ -2327,6 +2370,8 @@ com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin @@ -2360,7 +2405,7 @@ - 668 + 671 @@ -2391,6 +2436,7 @@ YES YES + makeSearchFieldFirstResponder: updateItemSearchFilter: worldSelectionChanged: @@ -2398,17 +2444,23 @@ YES id id + id YES YES + makeSearchFieldFirstResponder: updateItemSearchFilter: worldSelectionChanged: YES + + makeSearchFieldFirstResponder: + id + updateItemSearchFilter: id diff --git a/IJInventoryWindowController.h b/IJInventoryWindowController.h index b979b4b..fdc1790 100644 --- a/IJInventoryWindowController.h +++ b/IJInventoryWindowController.h @@ -57,5 +57,6 @@ - (IBAction)worldSelectionChanged:(id)sender; - (IBAction)updateItemSearchFilter:(id)sender; +- (IBAction)makeSearchFieldFirstResponder:(id)sender; @end diff --git a/IJInventoryWindowController.m b/IJInventoryWindowController.m index 9896dee..d43627f 100644 --- a/IJInventoryWindowController.m +++ b/IJInventoryWindowController.m @@ -222,6 +222,11 @@ // [outlineView reloadItem:item]; } +- (IBAction)makeSearchFieldFirstResponder:(id)sender +{ + [itemSearchField becomeFirstResponder]; +} + - (BOOL)validateUserInterfaceItem:(id )anItem { return YES; @@ -332,6 +337,8 @@ queue:[NSOperationQueue mainQueue] usingBlock:^(NSNotification *notification) { [propertiesViewController commitEditing]; + if (item.count == 0) + item.itemId = 0; [theInventoryView reloadItemAtIndex:itemIndex]; [propertiesWindow setAlphaValue:0.0]; }]; @@ -364,7 +371,18 @@ NSString *name = [[IJInventoryItem itemIdLookup] objectForKey:itemId]; NSRange range = [name rangeOfString:filterString options:NSCaseInsensitiveSearch]; if (range.location != NSNotFound) + { [results addObject:itemId]; + continue; + } + + // Also search the item id: + range = [[itemId stringValue] rangeOfString:filterString]; + if (range.location != NSNotFound) + { + [results addObject:itemId]; + continue; + } } [filteredItemIds autorelease];