More work on slot properties. Moved properties window popup back to IJInventoryWindowController.
This commit is contained in:
parent
c46eaf6ab7
commit
8f2dd75a4d
@ -12,7 +12,7 @@
|
||||
</object>
|
||||
<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<integer value="372"/>
|
||||
<integer value="371"/>
|
||||
<integer value="29"/>
|
||||
</object>
|
||||
<object class="NSArray" key="IBDocument.PluginDependencies">
|
||||
@ -492,7 +492,7 @@
|
||||
<object class="NSWindowTemplate" id="972006081">
|
||||
<int key="NSWindowStyleMask">7</int>
|
||||
<int key="NSWindowBacking">2</int>
|
||||
<string key="NSWindowRect">{{431, 251}, {744, 474}}</string>
|
||||
<string key="NSWindowRect">{{347, 255}, {670, 481}}</string>
|
||||
<int key="NSWTFlags">1954021376</int>
|
||||
<string key="NSWindowTitle">Inside Job</string>
|
||||
<string key="NSWindowClass">NSWindow</string>
|
||||
@ -506,7 +506,7 @@
|
||||
<object class="NSTextField" id="574149520">
|
||||
<reference key="NSNextResponder" ref="439893737"/>
|
||||
<int key="NSvFlags">266</int>
|
||||
<string key="NSFrame">{{211, 447}, {525, 14}}</string>
|
||||
<string key="NSFrame">{{211, 454}, {451, 14}}</string>
|
||||
<reference key="NSSuperview" ref="439893737"/>
|
||||
<bool key="NSEnabled">YES</bool>
|
||||
<object class="NSTextFieldCell" key="NSCell" id="828498206">
|
||||
@ -542,7 +542,7 @@
|
||||
<object class="NSTextField" id="395301483">
|
||||
<reference key="NSNextResponder" ref="439893737"/>
|
||||
<int key="NSvFlags">268</int>
|
||||
<string key="NSFrame">{{53, 408}, {85, 19}}</string>
|
||||
<string key="NSFrame">{{53, 415}, {85, 19}}</string>
|
||||
<reference key="NSSuperview" ref="439893737"/>
|
||||
<bool key="NSEnabled">YES</bool>
|
||||
<object class="NSTextFieldCell" key="NSCell" id="52955396">
|
||||
@ -585,7 +585,7 @@
|
||||
</object>
|
||||
<object class="NSAttributedString" key="NS.nan">
|
||||
<string key="NSString">NaN</string>
|
||||
<object class="NSDictionary" key="NSAttributes" id="203469606">
|
||||
<object class="NSDictionary" key="NSAttributes" id="752565535">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="NSArray" key="dict.sortedKeys" id="0">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
@ -595,7 +595,7 @@
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object class="NSDecimalNumberPlaceholder" key="NS.min" id="1028447999">
|
||||
<object class="NSDecimalNumberPlaceholder" key="NS.min" id="341979191">
|
||||
<int key="NS.exponent">0</int>
|
||||
<int key="NS.length">0</int>
|
||||
<bool key="NS.negative">YES</bool>
|
||||
@ -603,7 +603,7 @@
|
||||
<int key="NS.mantissa.bo">1</int>
|
||||
<bytes key="NS.mantissa">AAAAAAAAAAAAAAAAAAAAAA</bytes>
|
||||
</object>
|
||||
<reference key="NS.max" ref="1028447999"/>
|
||||
<reference key="NS.max" ref="341979191"/>
|
||||
<object class="NSDecimalNumberHandler" key="NS.rounding">
|
||||
<int key="NS.roundingmode">3</int>
|
||||
<bool key="NS.raise.overflow">YES</bool>
|
||||
@ -638,7 +638,7 @@
|
||||
<object class="NSTextField" id="924742053">
|
||||
<reference key="NSNextResponder" ref="439893737"/>
|
||||
<int key="NSvFlags">268</int>
|
||||
<string key="NSFrame">{{8, 410}, {40, 14}}</string>
|
||||
<string key="NSFrame">{{8, 417}, {40, 14}}</string>
|
||||
<reference key="NSSuperview" ref="439893737"/>
|
||||
<bool key="NSEnabled">YES</bool>
|
||||
<object class="NSTextFieldCell" key="NSCell" id="421186712">
|
||||
@ -654,7 +654,7 @@
|
||||
<object class="NSBox" id="263108995">
|
||||
<reference key="NSNextResponder" ref="439893737"/>
|
||||
<int key="NSvFlags">10</int>
|
||||
<string key="NSFrame">{{0, 433}, {744, 5}}</string>
|
||||
<string key="NSFrame">{{0, 440}, {670, 5}}</string>
|
||||
<reference key="NSSuperview" ref="439893737"/>
|
||||
<string key="NSOffsets">{0, 0}</string>
|
||||
<object class="NSTextFieldCell" key="NSTitleCell">
|
||||
@ -680,7 +680,7 @@
|
||||
<object class="NSSegmentedControl" id="626341130">
|
||||
<reference key="NSNextResponder" ref="439893737"/>
|
||||
<int key="NSvFlags">268</int>
|
||||
<string key="NSFrame">{{11, 442}, {195, 25}}</string>
|
||||
<string key="NSFrame">{{11, 449}, {195, 25}}</string>
|
||||
<reference key="NSSuperview" ref="439893737"/>
|
||||
<bool key="NSEnabled">YES</bool>
|
||||
<object class="NSSegmentedCell" key="NSCell" id="587756353">
|
||||
@ -724,39 +724,39 @@
|
||||
<int key="NSSegmentStyle">2</int>
|
||||
</object>
|
||||
</object>
|
||||
<object class="NSCustomView" id="971078756">
|
||||
<object class="NSCustomView" id="729035718">
|
||||
<reference key="NSNextResponder" ref="439893737"/>
|
||||
<int key="NSvFlags">268</int>
|
||||
<string key="NSFrame">{{78, 246}, {432, 144}}</string>
|
||||
<string key="NSFrame">{{78, 277}, {360, 120}}</string>
|
||||
<reference key="NSSuperview" ref="439893737"/>
|
||||
<string key="NSClassName">IJInventoryView</string>
|
||||
</object>
|
||||
<object class="NSCustomView" id="935002701">
|
||||
<object class="NSCustomView" id="39723937">
|
||||
<reference key="NSNextResponder" ref="439893737"/>
|
||||
<int key="NSvFlags">268</int>
|
||||
<string key="NSFrame">{{78, 179}, {432, 48}}</string>
|
||||
<string key="NSFrame">{{78, 217}, {360, 40}}</string>
|
||||
<reference key="NSSuperview" ref="439893737"/>
|
||||
<string key="NSClassName">IJInventoryView</string>
|
||||
</object>
|
||||
<object class="NSCustomView" id="404767995">
|
||||
<object class="NSCustomView" id="709037171">
|
||||
<reference key="NSNextResponder" ref="439893737"/>
|
||||
<int key="NSvFlags">268</int>
|
||||
<string key="NSFrame">{{11, 198}, {48, 192}}</string>
|
||||
<string key="NSFrame">{{20, 237}, {40, 160}}</string>
|
||||
<reference key="NSSuperview" ref="439893737"/>
|
||||
<string key="NSClassName">IJInventoryView</string>
|
||||
</object>
|
||||
<object class="NSSearchField" id="546340560">
|
||||
<object class="NSSearchField" id="835917990">
|
||||
<reference key="NSNextResponder" ref="439893737"/>
|
||||
<int key="NSvFlags">265</int>
|
||||
<string key="NSFrame">{{556, 405}, {177, 22}}</string>
|
||||
<string key="NSFrame">{{482, 412}, {177, 22}}</string>
|
||||
<reference key="NSSuperview" ref="439893737"/>
|
||||
<bool key="NSEnabled">YES</bool>
|
||||
<object class="NSSearchFieldCell" key="NSCell" id="106296">
|
||||
<object class="NSSearchFieldCell" key="NSCell" id="174542751">
|
||||
<int key="NSCellFlags">343014976</int>
|
||||
<int key="NSCellFlags2">268436544</int>
|
||||
<string key="NSContents"/>
|
||||
<reference key="NSSupport" ref="731765667"/>
|
||||
<reference key="NSControlView" ref="546340560"/>
|
||||
<reference key="NSControlView" ref="835917990"/>
|
||||
<bool key="NSDrawsBackground">YES</bool>
|
||||
<int key="NSTextBezelStyle">1</int>
|
||||
<reference key="NSBackgroundColor" ref="61377669"/>
|
||||
@ -765,9 +765,9 @@
|
||||
<int key="NSCellFlags">130560</int>
|
||||
<int key="NSCellFlags2">0</int>
|
||||
<string key="NSContents">search</string>
|
||||
<reference key="NSControlView" ref="546340560"/>
|
||||
<reference key="NSControlView" ref="835917990"/>
|
||||
<string key="NSAction">_searchFieldSearch:</string>
|
||||
<reference key="NSTarget" ref="106296"/>
|
||||
<reference key="NSTarget" ref="174542751"/>
|
||||
<int key="NSButtonFlags">138690815</int>
|
||||
<int key="NSButtonFlags2">0</int>
|
||||
<string key="NSKeyEquivalent"/>
|
||||
@ -794,9 +794,9 @@
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<reference key="NSControlView" ref="546340560"/>
|
||||
<reference key="NSControlView" ref="835917990"/>
|
||||
<string key="NSAction">_searchFieldCancel:</string>
|
||||
<reference key="NSTarget" ref="106296"/>
|
||||
<reference key="NSTarget" ref="174542751"/>
|
||||
<int key="NSButtonFlags">138690815</int>
|
||||
<int key="NSButtonFlags2">0</int>
|
||||
<string key="NSKeyEquivalent"/>
|
||||
@ -807,21 +807,21 @@
|
||||
<bytes key="NSSearchFieldFlags">CAAAAA</bytes>
|
||||
</object>
|
||||
</object>
|
||||
<object class="NSScrollView" id="846187987">
|
||||
<object class="NSScrollView" id="429551178">
|
||||
<reference key="NSNextResponder" ref="439893737"/>
|
||||
<int key="NSvFlags">4369</int>
|
||||
<object class="NSMutableArray" key="NSSubviews">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="NSClipView" id="545233995">
|
||||
<reference key="NSNextResponder" ref="846187987"/>
|
||||
<object class="NSClipView" id="317132246">
|
||||
<reference key="NSNextResponder" ref="429551178"/>
|
||||
<int key="NSvFlags">2304</int>
|
||||
<object class="NSMutableArray" key="NSSubviews">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="NSTableView" id="890218557">
|
||||
<reference key="NSNextResponder" ref="545233995"/>
|
||||
<object class="NSTableView" id="437274660">
|
||||
<reference key="NSNextResponder" ref="317132246"/>
|
||||
<int key="NSvFlags">4352</int>
|
||||
<string key="NSFrameSize">{205, 396}</string>
|
||||
<reference key="NSSuperview" ref="545233995"/>
|
||||
<string key="NSFrameSize">{205, 403}</string>
|
||||
<reference key="NSSuperview" ref="317132246"/>
|
||||
<bool key="NSEnabled">YES</bool>
|
||||
<object class="_NSCornerView" key="NSCornerView">
|
||||
<nil key="NSNextResponder"/>
|
||||
@ -830,7 +830,7 @@
|
||||
</object>
|
||||
<object class="NSMutableArray" key="NSTableColumns">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="NSTableColumn" id="457307628">
|
||||
<object class="NSTableColumn" id="60821140">
|
||||
<string key="NSIdentifier">itemId</string>
|
||||
<double key="NSWidth">40</double>
|
||||
<double key="NSMinWidth">40</double>
|
||||
@ -840,7 +840,7 @@
|
||||
<int key="NSCellFlags2">2048</int>
|
||||
<string key="NSContents"/>
|
||||
<reference key="NSSupport" ref="26"/>
|
||||
<object class="NSColor" key="NSBackgroundColor" id="1049587905">
|
||||
<object class="NSColor" key="NSBackgroundColor" id="946938472">
|
||||
<int key="NSColorSpace">3</int>
|
||||
<bytes key="NSWhite">MC4zMzMzMzI5ODU2AA</bytes>
|
||||
</object>
|
||||
@ -851,12 +851,12 @@
|
||||
<reference key="NSColor" ref="795034080"/>
|
||||
</object>
|
||||
</object>
|
||||
<object class="NSTextFieldCell" key="NSDataCell" id="174398824">
|
||||
<object class="NSTextFieldCell" key="NSDataCell" id="161049741">
|
||||
<int key="NSCellFlags">337772096</int>
|
||||
<int key="NSCellFlags2">-2080372736</int>
|
||||
<string key="NSContents">Text Cell</string>
|
||||
<reference key="NSSupport" ref="731765667"/>
|
||||
<object class="NSNumberFormatter" key="NSFormatter" id="893402973">
|
||||
<object class="NSNumberFormatter" key="NSFormatter" id="282965990">
|
||||
<object class="NSMutableDictionary" key="NS.attributes">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="NSArray" key="dict.sortedKeys">
|
||||
@ -888,10 +888,10 @@
|
||||
</object>
|
||||
<object class="NSAttributedString" key="NS.nan">
|
||||
<string key="NSString">NaN</string>
|
||||
<reference key="NSAttributes" ref="203469606"/>
|
||||
<reference key="NSAttributes" ref="752565535"/>
|
||||
</object>
|
||||
<reference key="NS.min" ref="1028447999"/>
|
||||
<reference key="NS.max" ref="1028447999"/>
|
||||
<reference key="NS.min" ref="341979191"/>
|
||||
<reference key="NS.max" ref="341979191"/>
|
||||
<object class="NSDecimalNumberHandler" key="NS.rounding">
|
||||
<int key="NS.roundingmode">3</int>
|
||||
<bool key="NS.raise.overflow">YES</bool>
|
||||
@ -904,7 +904,7 @@
|
||||
<bool key="NS.localized">NO</bool>
|
||||
<bool key="NS.allowsfloats">YES</bool>
|
||||
</object>
|
||||
<reference key="NSControlView" ref="890218557"/>
|
||||
<reference key="NSControlView" ref="437274660"/>
|
||||
<object class="NSColor" key="NSBackgroundColor" id="451382550">
|
||||
<int key="NSColorSpace">6</int>
|
||||
<string key="NSCatalogName">System</string>
|
||||
@ -916,9 +916,9 @@
|
||||
<int key="NSResizingMask">3</int>
|
||||
<bool key="NSIsResizeable">YES</bool>
|
||||
<bool key="NSIsEditable">YES</bool>
|
||||
<reference key="NSTableView" ref="890218557"/>
|
||||
<reference key="NSTableView" ref="437274660"/>
|
||||
</object>
|
||||
<object class="NSTableColumn" id="195367098">
|
||||
<object class="NSTableColumn" id="879175979">
|
||||
<string key="NSIdentifier">image</string>
|
||||
<double key="NSWidth">32</double>
|
||||
<double key="NSMinWidth">10</double>
|
||||
@ -936,7 +936,7 @@
|
||||
</object>
|
||||
<reference key="NSTextColor" ref="115003830"/>
|
||||
</object>
|
||||
<object class="NSImageCell" key="NSDataCell" id="1064994847">
|
||||
<object class="NSImageCell" key="NSDataCell" id="276354353">
|
||||
<int key="NSCellFlags">67239424</int>
|
||||
<int key="NSCellFlags2">33554432</int>
|
||||
<reference key="NSSupport" ref="731765667"/>
|
||||
@ -948,9 +948,9 @@
|
||||
<int key="NSResizingMask">3</int>
|
||||
<bool key="NSIsResizeable">YES</bool>
|
||||
<bool key="NSIsEditable">YES</bool>
|
||||
<reference key="NSTableView" ref="890218557"/>
|
||||
<reference key="NSTableView" ref="437274660"/>
|
||||
</object>
|
||||
<object class="NSTableColumn" id="107691055">
|
||||
<object class="NSTableColumn" id="249996994">
|
||||
<string key="NSIdentifier">name</string>
|
||||
<double key="NSWidth">124</double>
|
||||
<double key="NSMinWidth">40</double>
|
||||
@ -960,22 +960,22 @@
|
||||
<int key="NSCellFlags2">2048</int>
|
||||
<string key="NSContents"/>
|
||||
<reference key="NSSupport" ref="26"/>
|
||||
<reference key="NSBackgroundColor" ref="1049587905"/>
|
||||
<reference key="NSBackgroundColor" ref="946938472"/>
|
||||
<reference key="NSTextColor" ref="115003830"/>
|
||||
</object>
|
||||
<object class="NSTextFieldCell" key="NSDataCell" id="439891406">
|
||||
<object class="NSTextFieldCell" key="NSDataCell" id="90342421">
|
||||
<int key="NSCellFlags">337772096</int>
|
||||
<int key="NSCellFlags2">2048</int>
|
||||
<string key="NSContents">Text Cell</string>
|
||||
<reference key="NSSupport" ref="731765667"/>
|
||||
<reference key="NSControlView" ref="890218557"/>
|
||||
<reference key="NSControlView" ref="437274660"/>
|
||||
<reference key="NSBackgroundColor" ref="451382550"/>
|
||||
<reference key="NSTextColor" ref="915322728"/>
|
||||
</object>
|
||||
<int key="NSResizingMask">3</int>
|
||||
<bool key="NSIsResizeable">YES</bool>
|
||||
<bool key="NSIsEditable">YES</bool>
|
||||
<reference key="NSTableView" ref="890218557"/>
|
||||
<reference key="NSTableView" ref="437274660"/>
|
||||
</object>
|
||||
</object>
|
||||
<double key="NSIntercellSpacingWidth">3</double>
|
||||
@ -1001,44 +1001,44 @@
|
||||
<int key="NSTableViewDraggingDestinationStyle">0</int>
|
||||
</object>
|
||||
</object>
|
||||
<string key="NSFrame">{{1, 1}, {205, 396}}</string>
|
||||
<reference key="NSSuperview" ref="846187987"/>
|
||||
<reference key="NSNextKeyView" ref="890218557"/>
|
||||
<reference key="NSDocView" ref="890218557"/>
|
||||
<string key="NSFrame">{{1, 1}, {205, 403}}</string>
|
||||
<reference key="NSSuperview" ref="429551178"/>
|
||||
<reference key="NSNextKeyView" ref="437274660"/>
|
||||
<reference key="NSDocView" ref="437274660"/>
|
||||
<reference key="NSBGColor" ref="451382550"/>
|
||||
<int key="NScvFlags">4</int>
|
||||
</object>
|
||||
<object class="NSScroller" id="77446428">
|
||||
<reference key="NSNextResponder" ref="846187987"/>
|
||||
<object class="NSScroller" id="810797583">
|
||||
<reference key="NSNextResponder" ref="429551178"/>
|
||||
<int key="NSvFlags">-2147483392</int>
|
||||
<string key="NSFrame">{{191, 17}, {15, 365}}</string>
|
||||
<reference key="NSSuperview" ref="846187987"/>
|
||||
<reference key="NSTarget" ref="846187987"/>
|
||||
<reference key="NSSuperview" ref="429551178"/>
|
||||
<reference key="NSTarget" ref="429551178"/>
|
||||
<string key="NSAction">_doScroller:</string>
|
||||
<double key="NSPercent">0.9974811083123426</double>
|
||||
</object>
|
||||
<object class="NSScroller" id="954038452">
|
||||
<reference key="NSNextResponder" ref="846187987"/>
|
||||
<object class="NSScroller" id="945475559">
|
||||
<reference key="NSNextResponder" ref="429551178"/>
|
||||
<int key="NSvFlags">-2147483392</int>
|
||||
<string key="NSFrame">{{1, 382}, {190, 15}}</string>
|
||||
<reference key="NSSuperview" ref="846187987"/>
|
||||
<reference key="NSSuperview" ref="429551178"/>
|
||||
<int key="NSsFlags">1</int>
|
||||
<reference key="NSTarget" ref="846187987"/>
|
||||
<reference key="NSTarget" ref="429551178"/>
|
||||
<string key="NSAction">_doScroller:</string>
|
||||
<double key="NSPercent">0.99514563106796117</double>
|
||||
</object>
|
||||
</object>
|
||||
<string key="NSFrame">{{538, -1}, {207, 398}}</string>
|
||||
<string key="NSFrame">{{464, -1}, {207, 405}}</string>
|
||||
<reference key="NSSuperview" ref="439893737"/>
|
||||
<reference key="NSNextKeyView" ref="545233995"/>
|
||||
<reference key="NSNextKeyView" ref="317132246"/>
|
||||
<int key="NSsFlags">562</int>
|
||||
<reference key="NSVScroller" ref="77446428"/>
|
||||
<reference key="NSHScroller" ref="954038452"/>
|
||||
<reference key="NSContentView" ref="545233995"/>
|
||||
<reference key="NSVScroller" ref="810797583"/>
|
||||
<reference key="NSHScroller" ref="945475559"/>
|
||||
<reference key="NSContentView" ref="317132246"/>
|
||||
<bytes key="NSScrollAmts">QSAAAEEgAABBmAAAQZgAAA</bytes>
|
||||
</object>
|
||||
</object>
|
||||
<string key="NSFrameSize">{744, 474}</string>
|
||||
<string key="NSFrameSize">{670, 481}</string>
|
||||
<reference key="NSSuperview"/>
|
||||
</object>
|
||||
<string key="NSScreenRect">{{0, 0}, {1440, 878}}</string>
|
||||
@ -1326,7 +1326,7 @@
|
||||
<object class="IBOutletConnection" key="connection">
|
||||
<string key="label">inventoryView</string>
|
||||
<reference key="source" ref="760161335"/>
|
||||
<reference key="destination" ref="971078756"/>
|
||||
<reference key="destination" ref="729035718"/>
|
||||
</object>
|
||||
<int key="connectionID">642</int>
|
||||
</object>
|
||||
@ -1334,7 +1334,7 @@
|
||||
<object class="IBOutletConnection" key="connection">
|
||||
<string key="label">armorView</string>
|
||||
<reference key="source" ref="760161335"/>
|
||||
<reference key="destination" ref="404767995"/>
|
||||
<reference key="destination" ref="709037171"/>
|
||||
</object>
|
||||
<int key="connectionID">645</int>
|
||||
</object>
|
||||
@ -1342,7 +1342,7 @@
|
||||
<object class="IBOutletConnection" key="connection">
|
||||
<string key="label">quickView</string>
|
||||
<reference key="source" ref="760161335"/>
|
||||
<reference key="destination" ref="935002701"/>
|
||||
<reference key="destination" ref="39723937"/>
|
||||
</object>
|
||||
<int key="connectionID">646</int>
|
||||
</object>
|
||||
@ -1350,7 +1350,7 @@
|
||||
<object class="IBOutletConnection" key="connection">
|
||||
<string key="label">itemSearchField</string>
|
||||
<reference key="source" ref="760161335"/>
|
||||
<reference key="destination" ref="546340560"/>
|
||||
<reference key="destination" ref="835917990"/>
|
||||
</object>
|
||||
<int key="connectionID">659</int>
|
||||
</object>
|
||||
@ -1358,14 +1358,14 @@
|
||||
<object class="IBOutletConnection" key="connection">
|
||||
<string key="label">itemTableView</string>
|
||||
<reference key="source" ref="760161335"/>
|
||||
<reference key="destination" ref="890218557"/>
|
||||
<reference key="destination" ref="437274660"/>
|
||||
</object>
|
||||
<int key="connectionID">660</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBOutletConnection" key="connection">
|
||||
<string key="label">dataSource</string>
|
||||
<reference key="source" ref="890218557"/>
|
||||
<reference key="source" ref="437274660"/>
|
||||
<reference key="destination" ref="760161335"/>
|
||||
</object>
|
||||
<int key="connectionID">661</int>
|
||||
@ -1373,7 +1373,7 @@
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBOutletConnection" key="connection">
|
||||
<string key="label">delegate</string>
|
||||
<reference key="source" ref="890218557"/>
|
||||
<reference key="source" ref="437274660"/>
|
||||
<reference key="destination" ref="760161335"/>
|
||||
</object>
|
||||
<int key="connectionID">662</int>
|
||||
@ -1382,7 +1382,7 @@
|
||||
<object class="IBActionConnection" key="connection">
|
||||
<string key="label">updateItemSearchFilter:</string>
|
||||
<reference key="source" ref="760161335"/>
|
||||
<reference key="destination" ref="546340560"/>
|
||||
<reference key="destination" ref="835917990"/>
|
||||
</object>
|
||||
<int key="connectionID">663</int>
|
||||
</object>
|
||||
@ -1390,7 +1390,7 @@
|
||||
<object class="IBOutletConnection" key="connection">
|
||||
<string key="label">initialFirstResponder</string>
|
||||
<reference key="source" ref="972006081"/>
|
||||
<reference key="destination" ref="546340560"/>
|
||||
<reference key="destination" ref="835917990"/>
|
||||
</object>
|
||||
<int key="connectionID">668</int>
|
||||
</object>
|
||||
@ -1765,11 +1765,11 @@
|
||||
<reference ref="395301483"/>
|
||||
<reference ref="574149520"/>
|
||||
<reference ref="626341130"/>
|
||||
<reference ref="404767995"/>
|
||||
<reference ref="971078756"/>
|
||||
<reference ref="935002701"/>
|
||||
<reference ref="546340560"/>
|
||||
<reference ref="846187987"/>
|
||||
<reference ref="835917990"/>
|
||||
<reference ref="429551178"/>
|
||||
<reference ref="729035718"/>
|
||||
<reference ref="709037171"/>
|
||||
<reference ref="39723937"/>
|
||||
</object>
|
||||
<reference key="parent" ref="972006081"/>
|
||||
</object>
|
||||
@ -1883,7 +1883,7 @@
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">641</int>
|
||||
<reference key="object" ref="971078756"/>
|
||||
<reference key="object" ref="729035718"/>
|
||||
<object class="NSMutableArray" key="children">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
</object>
|
||||
@ -1891,110 +1891,110 @@
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">643</int>
|
||||
<reference key="object" ref="935002701"/>
|
||||
<reference key="object" ref="39723937"/>
|
||||
<reference key="parent" ref="439893737"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">644</int>
|
||||
<reference key="object" ref="404767995"/>
|
||||
<reference key="object" ref="709037171"/>
|
||||
<reference key="parent" ref="439893737"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">647</int>
|
||||
<reference key="object" ref="546340560"/>
|
||||
<reference key="object" ref="835917990"/>
|
||||
<object class="NSMutableArray" key="children">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<reference ref="106296"/>
|
||||
<reference ref="174542751"/>
|
||||
</object>
|
||||
<reference key="parent" ref="439893737"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">648</int>
|
||||
<reference key="object" ref="106296"/>
|
||||
<reference key="parent" ref="546340560"/>
|
||||
<reference key="object" ref="174542751"/>
|
||||
<reference key="parent" ref="835917990"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">649</int>
|
||||
<reference key="object" ref="846187987"/>
|
||||
<reference key="object" ref="429551178"/>
|
||||
<object class="NSMutableArray" key="children">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<reference ref="77446428"/>
|
||||
<reference ref="954038452"/>
|
||||
<reference ref="890218557"/>
|
||||
<reference ref="810797583"/>
|
||||
<reference ref="945475559"/>
|
||||
<reference ref="437274660"/>
|
||||
</object>
|
||||
<reference key="parent" ref="439893737"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">650</int>
|
||||
<reference key="object" ref="77446428"/>
|
||||
<reference key="parent" ref="846187987"/>
|
||||
<reference key="object" ref="810797583"/>
|
||||
<reference key="parent" ref="429551178"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">651</int>
|
||||
<reference key="object" ref="954038452"/>
|
||||
<reference key="parent" ref="846187987"/>
|
||||
<reference key="object" ref="945475559"/>
|
||||
<reference key="parent" ref="429551178"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">652</int>
|
||||
<reference key="object" ref="890218557"/>
|
||||
<reference key="object" ref="437274660"/>
|
||||
<object class="NSMutableArray" key="children">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<reference ref="457307628"/>
|
||||
<reference ref="107691055"/>
|
||||
<reference ref="195367098"/>
|
||||
<reference ref="60821140"/>
|
||||
<reference ref="249996994"/>
|
||||
<reference ref="879175979"/>
|
||||
</object>
|
||||
<reference key="parent" ref="846187987"/>
|
||||
<reference key="parent" ref="429551178"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">654</int>
|
||||
<reference key="object" ref="457307628"/>
|
||||
<reference key="object" ref="60821140"/>
|
||||
<object class="NSMutableArray" key="children">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<reference ref="174398824"/>
|
||||
<reference ref="161049741"/>
|
||||
</object>
|
||||
<reference key="parent" ref="890218557"/>
|
||||
<reference key="parent" ref="437274660"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">655</int>
|
||||
<reference key="object" ref="107691055"/>
|
||||
<reference key="object" ref="249996994"/>
|
||||
<object class="NSMutableArray" key="children">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<reference ref="439891406"/>
|
||||
<reference ref="90342421"/>
|
||||
</object>
|
||||
<reference key="parent" ref="890218557"/>
|
||||
<reference key="parent" ref="437274660"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">656</int>
|
||||
<reference key="object" ref="439891406"/>
|
||||
<reference key="parent" ref="107691055"/>
|
||||
<reference key="object" ref="90342421"/>
|
||||
<reference key="parent" ref="249996994"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">657</int>
|
||||
<reference key="object" ref="174398824"/>
|
||||
<reference key="object" ref="161049741"/>
|
||||
<object class="NSMutableArray" key="children">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<reference ref="893402973"/>
|
||||
<reference ref="282965990"/>
|
||||
</object>
|
||||
<reference key="parent" ref="457307628"/>
|
||||
<reference key="parent" ref="60821140"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">658</int>
|
||||
<reference key="object" ref="893402973"/>
|
||||
<reference key="parent" ref="174398824"/>
|
||||
<reference key="object" ref="282965990"/>
|
||||
<reference key="parent" ref="161049741"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">665</int>
|
||||
<reference key="object" ref="195367098"/>
|
||||
<reference key="object" ref="879175979"/>
|
||||
<object class="NSMutableArray" key="children">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<reference ref="1064994847"/>
|
||||
<reference ref="276354353"/>
|
||||
</object>
|
||||
<reference key="parent" ref="890218557"/>
|
||||
<reference key="parent" ref="437274660"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">667</int>
|
||||
<reference key="object" ref="1064994847"/>
|
||||
<reference key="parent" ref="195367098"/>
|
||||
<reference key="object" ref="276354353"/>
|
||||
<reference key="parent" ref="879175979"/>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
@ -2242,9 +2242,9 @@
|
||||
<string>{{475, 832}, {234, 43}}</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>{{34, 169}, {744, 474}}</string>
|
||||
<string>{{114, 210}, {670, 481}}</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>{{34, 169}, {744, 474}}</string>
|
||||
<string>{{114, 210}, {670, 481}}</string>
|
||||
<integer value="1"/>
|
||||
<string>{{33, 99}, {480, 360}}</string>
|
||||
<string>{3.40282e+38, 3.40282e+38}</string>
|
||||
@ -2299,15 +2299,15 @@
|
||||
<integer value="0"/>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<object class="NSAffineTransform">
|
||||
<bytes key="NSTransformStruct">AUJsAABDmoAAA</bytes>
|
||||
<bytes key="NSTransformStruct">AUKcAABDdgAAA</bytes>
|
||||
</object>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<object class="NSAffineTransform">
|
||||
<bytes key="NSTransformStruct">AUJsAABDcgAAA</bytes>
|
||||
<bytes key="NSTransformStruct">AUKcAABDRgAAA</bytes>
|
||||
</object>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<object class="NSAffineTransform">
|
||||
<bytes key="NSTransformStruct">AUIQAABDSgAAA</bytes>
|
||||
<bytes key="NSTransformStruct">AUEwAABDRgAAA</bytes>
|
||||
</object>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
@ -2427,6 +2427,7 @@
|
||||
<string>inventoryView</string>
|
||||
<string>itemSearchField</string>
|
||||
<string>itemTableView</string>
|
||||
<string>observerObject</string>
|
||||
<string>quickView</string>
|
||||
<string>statusTextField</string>
|
||||
<string>worldSelectionControl</string>
|
||||
@ -2437,6 +2438,7 @@
|
||||
<string>IJInventoryView</string>
|
||||
<string>NSSearchField</string>
|
||||
<string>NSTableView</string>
|
||||
<string>id</string>
|
||||
<string>IJInventoryView</string>
|
||||
<string>NSTextField</string>
|
||||
<string>NSSegmentedControl</string>
|
||||
@ -2450,6 +2452,7 @@
|
||||
<string>inventoryView</string>
|
||||
<string>itemSearchField</string>
|
||||
<string>itemTableView</string>
|
||||
<string>observerObject</string>
|
||||
<string>quickView</string>
|
||||
<string>statusTextField</string>
|
||||
<string>worldSelectionControl</string>
|
||||
@ -2472,6 +2475,10 @@
|
||||
<string key="name">itemTableView</string>
|
||||
<string key="candidateClassName">NSTableView</string>
|
||||
</object>
|
||||
<object class="IBToOneOutletInfo">
|
||||
<string key="name">observerObject</string>
|
||||
<string key="candidateClassName">id</string>
|
||||
</object>
|
||||
<object class="IBToOneOutletInfo">
|
||||
<string key="name">quickView</string>
|
||||
<string key="candidateClassName">IJInventoryView</string>
|
||||
|
||||
@ -12,8 +12,6 @@ extern NSString * const IJPasteboardTypeInventoryItem;
|
||||
|
||||
@protocol IJInventoryViewDelegate;
|
||||
@class IJInventoryItem;
|
||||
@class IJItemPropertiesViewController;
|
||||
@class MAAttachedWindow;
|
||||
|
||||
@interface IJInventoryView : NSView {
|
||||
int rows;
|
||||
@ -23,10 +21,6 @@ extern NSString * const IJPasteboardTypeInventoryItem;
|
||||
|
||||
NSArray *items;
|
||||
|
||||
IJItemPropertiesViewController *propertiesViewController;
|
||||
MAAttachedWindow *propertiesWindow;
|
||||
id observerObject;
|
||||
|
||||
id<IJInventoryViewDelegate> delegate;
|
||||
|
||||
BOOL dragging;
|
||||
@ -35,6 +29,8 @@ extern NSString * const IJPasteboardTypeInventoryItem;
|
||||
|
||||
- (void)setRows:(int)numberOfRows columns:(int)numberOfColumns;
|
||||
- (void)setItems:(NSArray *)theItems;
|
||||
- (NSPoint)pointForItemAtIndex:(int)index;
|
||||
- (void)reloadItemAtIndex:(int)itemIndex;
|
||||
|
||||
@end
|
||||
|
||||
@ -42,4 +38,5 @@ extern NSString * const IJPasteboardTypeInventoryItem;
|
||||
@protocol IJInventoryViewDelegate <NSObject>
|
||||
- (void)inventoryView:(IJInventoryView *)inventoryView removeItemAtIndex:(int)itemIndex;
|
||||
- (void)inventoryView:(IJInventoryView *)inventoryView setItem:(IJInventoryItem *)item atIndex:(int)itemIndex;
|
||||
- (void)inventoryView:(IJInventoryView *)inventoryView selectedItemAtIndex:(int)itemIndex;
|
||||
@end
|
||||
|
||||
@ -8,8 +8,8 @@
|
||||
|
||||
#import "IJInventoryView.h"
|
||||
#import "IJInventoryItem.h"
|
||||
#import "IJItemPropertiesViewController.h"
|
||||
#import "MAAttachedWindow.h"
|
||||
#import <QuartzCore/QuartzCore.h>
|
||||
|
||||
NSString * const IJPasteboardTypeInventoryItem = @"net.adampreble.insidejob.inventoryitem";
|
||||
|
||||
@ -34,7 +34,6 @@ const static CGFloat cellOffset = 40;
|
||||
{
|
||||
[items release];
|
||||
[mouseDownEvent release];
|
||||
[propertiesViewController release];
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
@ -46,24 +45,13 @@ const static CGFloat cellOffset = 40;
|
||||
{
|
||||
return YES;
|
||||
}
|
||||
- (void)removePropertiesWindow
|
||||
|
||||
// For use by external stuff, since it flips the coordinates and our layer uses flipped geometry.
|
||||
- (NSPoint)pointForItemAtIndex:(int)index
|
||||
{
|
||||
if (observerObject)
|
||||
{
|
||||
[[NSNotificationCenter defaultCenter] removeObserver:observerObject];
|
||||
observerObject = nil;
|
||||
|
||||
[self.window removeChildWindow:propertiesWindow];
|
||||
[propertiesWindow orderOut:nil];
|
||||
//[propertiesWindow release];
|
||||
propertiesWindow = nil;
|
||||
propertiesViewController.item = nil;
|
||||
}
|
||||
}
|
||||
- (BOOL)resignFirstResponder
|
||||
{
|
||||
[self removePropertiesWindow];
|
||||
return YES;
|
||||
int x = index % cols;
|
||||
int y = index / cols;
|
||||
return CGPointMake(x * cellOffset, self.bounds.size.height - y * cellOffset);
|
||||
}
|
||||
|
||||
- (void)setRows:(int)numberOfRows columns:(int)numberOfColumns
|
||||
@ -99,6 +87,18 @@ const static CGFloat cellOffset = 40;
|
||||
layer.bounds = CGRectMake(0, 0, cellSize, cellSize);
|
||||
layer.borderWidth = 1.0;
|
||||
layer.borderColor = CGColorGetConstantColor(kCGColorBlack);
|
||||
|
||||
CATextLayer *textLayer = [CATextLayer layer];
|
||||
textLayer.bounds = CGRectMake(0, 0, cellSize-2, 18);
|
||||
textLayer.position = CGPointMake(cellSize/2.0, cellSize/2.0 + 18/2 - 1);
|
||||
textLayer.foregroundColor = CGColorGetConstantColor(kCGColorWhite);
|
||||
textLayer.fontSize = 18;
|
||||
textLayer.shadowOpacity = 1.0;
|
||||
textLayer.shadowRadius = 0.5;
|
||||
textLayer.shadowOffset = NSMakeSize(0, 1);
|
||||
textLayer.alignmentMode = @"right";
|
||||
[layer addSublayer:textLayer];
|
||||
|
||||
[self.layer addSublayer:layer];
|
||||
}
|
||||
}
|
||||
@ -109,6 +109,19 @@ const static CGFloat cellOffset = 40;
|
||||
return [self.layer.sublayers objectAtIndex:row * cols + column];
|
||||
}
|
||||
|
||||
- (void)reloadItemAtIndex:(int)itemIndex
|
||||
{
|
||||
IJInventoryItem *item = [items objectAtIndex:itemIndex];
|
||||
CALayer *layer = [self.layer.sublayers objectAtIndex:itemIndex];
|
||||
layer.contents = item.image;
|
||||
|
||||
CATextLayer *textLayer = [layer.sublayers objectAtIndex:0];
|
||||
if (item.count == 0)
|
||||
textLayer.string = @"";
|
||||
else
|
||||
textLayer.string = [NSString stringWithFormat:@"%d", item.count];
|
||||
}
|
||||
|
||||
- (void)setItems:(NSArray *)theItems
|
||||
{
|
||||
NSLog(@"%s", __PRETTY_FUNCTION__);
|
||||
@ -116,12 +129,8 @@ const static CGFloat cellOffset = 40;
|
||||
[theItems retain];
|
||||
items = theItems;
|
||||
|
||||
//NSLog(@"%@ sublayers=%@", [self layer], self.layer.sublayers);
|
||||
[items enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) {
|
||||
IJInventoryItem *item = obj;
|
||||
CALayer *layer = [self.layer.sublayers objectAtIndex:idx];
|
||||
layer.contents = item.image;
|
||||
}];
|
||||
for (int i = 0; i < items.count; i++)
|
||||
[self reloadItemAtIndex:i];
|
||||
}
|
||||
|
||||
- (int)itemIndexForPoint:(NSPoint)point
|
||||
@ -200,42 +209,11 @@ const static CGFloat cellOffset = 40;
|
||||
NSLog(@"%s", __PRETTY_FUNCTION__);
|
||||
if (!dragging)
|
||||
{
|
||||
// Show the properties window for this item.
|
||||
IJInventoryItem *lastItem = propertiesViewController.item;
|
||||
|
||||
[self removePropertiesWindow];
|
||||
|
||||
NSPoint mouseDownPoint = [mouseDownEvent locationInWindow];
|
||||
NSPoint pointInView = [self convertPoint:mouseDownPoint fromView:nil];
|
||||
|
||||
int itemIndex = [self itemIndexForPoint:pointInView];
|
||||
IJInventoryItem *item = [items objectAtIndex:itemIndex];
|
||||
if (item.itemId == 0 || lastItem == item)
|
||||
return; // can't show info on nothing
|
||||
|
||||
if (!propertiesViewController)
|
||||
{
|
||||
propertiesViewController = [[IJItemPropertiesViewController alloc] initWithNibName:@"ItemPropertiesView" bundle:nil];
|
||||
}
|
||||
propertiesViewController.item = item;
|
||||
propertiesWindow = [[MAAttachedWindow alloc] initWithView:propertiesViewController.view
|
||||
attachedToPoint:mouseDownPoint
|
||||
inWindow:self.window
|
||||
onSide:MAPositionRight
|
||||
atDistance:0];
|
||||
[propertiesWindow setBackgroundColor:[NSColor controlBackgroundColor]];
|
||||
[propertiesWindow setViewMargin:10.0];
|
||||
[propertiesWindow setAlphaValue:1.0];
|
||||
//[[propertiesWindow animator] setAlphaValue:1.0];
|
||||
[[self window] addChildWindow:propertiesWindow ordered:NSWindowAbove];
|
||||
[propertiesWindow makeKeyAndOrderFront:nil];
|
||||
|
||||
observerObject = [[NSNotificationCenter defaultCenter] addObserverForName:NSWindowDidResignKeyNotification
|
||||
object:propertiesWindow
|
||||
queue:[NSOperationQueue mainQueue]
|
||||
usingBlock:^(NSNotification *notification) {
|
||||
[self removePropertiesWindow];
|
||||
}];
|
||||
[delegate inventoryView:self selectedItemAtIndex:itemIndex];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -11,6 +11,8 @@
|
||||
|
||||
@class IJInventoryView;
|
||||
@class IJMinecraftLevel;
|
||||
@class MAAttachedWindow;
|
||||
@class IJItemPropertiesViewController;
|
||||
|
||||
@interface IJInventoryWindowController : NSWindowController <NSCollectionViewDelegate, IJInventoryViewDelegate> {
|
||||
IJMinecraftLevel *level;
|
||||
@ -33,6 +35,11 @@
|
||||
NSArray *allItemIds;
|
||||
NSArray *filteredItemIds;
|
||||
|
||||
//
|
||||
IJItemPropertiesViewController *propertiesViewController;
|
||||
MAAttachedWindow *propertiesWindow;
|
||||
id observerObject;
|
||||
|
||||
// Document
|
||||
BOOL dirty;
|
||||
int64_t sessionLockValue;
|
||||
|
||||
@ -9,8 +9,13 @@
|
||||
#import "IJInventoryWindowController.h"
|
||||
#import "IJMinecraftLevel.h"
|
||||
#import "IJInventoryItem.h"
|
||||
#import "IJItemPickerWindowController.h"
|
||||
#import "IJInventoryView.h"
|
||||
#import "IJItemPropertiesViewController.h"
|
||||
#import "MAAttachedWindow.h"
|
||||
|
||||
@interface IJInventoryWindowController ()
|
||||
- (void)removePropertiesWindow;
|
||||
@end
|
||||
|
||||
@implementation IJInventoryWindowController
|
||||
|
||||
@ -43,6 +48,7 @@
|
||||
|
||||
- (void)dealloc
|
||||
{
|
||||
[propertiesViewController release];
|
||||
[armorInventory release];
|
||||
[quickInventory release];
|
||||
[normalInventory release];
|
||||
@ -240,17 +246,17 @@
|
||||
{
|
||||
if (theInventoryView == inventoryView)
|
||||
{
|
||||
*slotOffset = IJInventorySlotNormalFirst;
|
||||
if (slotOffset) *slotOffset = IJInventorySlotNormalFirst;
|
||||
return normalInventory;
|
||||
}
|
||||
else if (theInventoryView == quickView)
|
||||
{
|
||||
*slotOffset = IJInventorySlotQuickFirst;
|
||||
if (slotOffset) *slotOffset = IJInventorySlotQuickFirst;
|
||||
return quickInventory;
|
||||
}
|
||||
else if (theInventoryView == armorView)
|
||||
{
|
||||
*slotOffset = IJInventorySlotArmorFirst;
|
||||
if (slotOffset) *slotOffset = IJInventorySlotArmorFirst;
|
||||
return armorInventory;
|
||||
}
|
||||
return nil;
|
||||
@ -284,6 +290,48 @@
|
||||
[self markDirty];
|
||||
}
|
||||
|
||||
- (void)inventoryView:(IJInventoryView *)theInventoryView selectedItemAtIndex:(int)itemIndex
|
||||
{
|
||||
// Show the properties window for this item.
|
||||
IJInventoryItem *lastItem = propertiesViewController.item;
|
||||
|
||||
//[self removePropertiesWindow];
|
||||
|
||||
NSPoint itemLocationInView = [theInventoryView pointForItemAtIndex:itemIndex];
|
||||
NSPoint point = [theInventoryView convertPoint:itemLocationInView toView:nil];
|
||||
point.x += 16 + 8;
|
||||
point.y -= 16;
|
||||
|
||||
NSArray *items = [self itemArrayForInventoryView:theInventoryView slotOffset:nil];
|
||||
IJInventoryItem *item = [items objectAtIndex:itemIndex];
|
||||
if (item.itemId == 0 || lastItem == item)
|
||||
return; // can't show info on nothing
|
||||
|
||||
if (!propertiesViewController)
|
||||
{
|
||||
propertiesViewController = [[IJItemPropertiesViewController alloc] initWithNibName:@"ItemPropertiesView" bundle:nil];
|
||||
}
|
||||
propertiesViewController.item = item;
|
||||
propertiesWindow = [[MAAttachedWindow alloc] initWithView:propertiesViewController.view
|
||||
attachedToPoint:point
|
||||
inWindow:self.window
|
||||
onSide:MAPositionRight
|
||||
atDistance:0];
|
||||
[propertiesWindow setDelegate:propertiesViewController]; // Be the delegate so it can be part of the responder chain (to get cancelOperation:).
|
||||
[propertiesWindow setBackgroundColor:[NSColor controlBackgroundColor]];
|
||||
[propertiesWindow setViewMargin:10.0];
|
||||
[propertiesWindow setAlphaValue:1.0];
|
||||
[[self window] addChildWindow:propertiesWindow ordered:NSWindowAbove];
|
||||
[propertiesWindow makeKeyAndOrderFront:nil];
|
||||
|
||||
observerObject = [[NSNotificationCenter defaultCenter] addObserverForName:NSWindowDidResignKeyNotification
|
||||
object:propertiesWindow
|
||||
queue:[NSOperationQueue mainQueue]
|
||||
usingBlock:^(NSNotification *notification) {
|
||||
[self removePropertiesWindow];
|
||||
}];
|
||||
}
|
||||
|
||||
#pragma mark -
|
||||
#pragma mark Item Picker
|
||||
|
||||
@ -359,6 +407,36 @@
|
||||
}
|
||||
|
||||
|
||||
#pragma mark -
|
||||
#pragma mark
|
||||
|
||||
- (void)reloadInventoryViewForItem:(IJInventoryItem *)item
|
||||
{
|
||||
if ([normalInventory containsObject:item])
|
||||
[inventoryView reloadItemAtIndex:[normalInventory indexOfObject:item]];
|
||||
else if ([quickInventory containsObject:item])
|
||||
[quickView reloadItemAtIndex:[quickInventory indexOfObject:item]];
|
||||
else if ([armorInventory containsObject:item])
|
||||
[armorView reloadItemAtIndex:[armorInventory indexOfObject:item]];
|
||||
}
|
||||
|
||||
- (void)removePropertiesWindow
|
||||
{
|
||||
if (observerObject)
|
||||
{
|
||||
[propertiesViewController commitEditing];
|
||||
[[NSNotificationCenter defaultCenter] removeObserver:observerObject];
|
||||
observerObject = nil;
|
||||
|
||||
[self reloadInventoryViewForItem:propertiesViewController.item];
|
||||
|
||||
[self.window removeChildWindow:propertiesWindow];
|
||||
[propertiesWindow orderOut:nil];
|
||||
//[propertiesWindow release];
|
||||
propertiesWindow = nil;
|
||||
propertiesViewController.item = nil;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@end
|
||||
|
||||
@ -1,29 +0,0 @@
|
||||
//
|
||||
// IJItemPickerWindowController.h
|
||||
// InsideJob
|
||||
//
|
||||
// Created by Adam Preble on 10/7/10.
|
||||
// Copyright 2010 Adam Preble. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Cocoa/Cocoa.h>
|
||||
|
||||
|
||||
@interface IJItemPickerWindowController : NSWindowController {
|
||||
void(^completionBlock)(uint16_t itemId);
|
||||
NSSearchField *searchField;
|
||||
NSTableView *tableView;
|
||||
NSArray *allItemIds;
|
||||
NSArray *filteredItemIds;
|
||||
}
|
||||
@property (nonatomic, assign) IBOutlet NSTableView *tableView;
|
||||
@property (nonatomic, assign) IBOutlet NSSearchField *searchField;
|
||||
|
||||
+ (IJItemPickerWindowController *)sharedController;
|
||||
|
||||
- (void)showPickerWithInitialItemId:(uint16_t)initialItemId completionBlock:(void(^)(uint16_t itemId))block;
|
||||
|
||||
- (IBAction)itemActivated:(id)sender;
|
||||
- (IBAction)updateFilter:(id)sender;
|
||||
|
||||
@end
|
||||
@ -1,115 +0,0 @@
|
||||
//
|
||||
// IJItemPickerWindowController.m
|
||||
// InsideJob
|
||||
//
|
||||
// Created by Adam Preble on 10/7/10.
|
||||
// Copyright 2010 Adam Preble. All rights reserved.
|
||||
//
|
||||
|
||||
#import "IJItemPickerWindowController.h"
|
||||
#import "IJInventoryItem.h"
|
||||
|
||||
@implementation IJItemPickerWindowController
|
||||
|
||||
@synthesize tableView, searchField;
|
||||
|
||||
+ (IJItemPickerWindowController *)sharedController
|
||||
{
|
||||
static IJItemPickerWindowController *globalSharedController = nil;
|
||||
if (!globalSharedController)
|
||||
{
|
||||
globalSharedController = [[IJItemPickerWindowController alloc] initWithWindowNibName:@"ItemPicker"];
|
||||
}
|
||||
return globalSharedController;
|
||||
}
|
||||
|
||||
- (void)awakeFromNib
|
||||
{
|
||||
[tableView setTarget:self];
|
||||
[tableView setDoubleAction:@selector(itemActivated:)];
|
||||
|
||||
NSArray *keys = [[IJInventoryItem itemIdLookup] allKeys];
|
||||
keys = [keys sortedArrayUsingSelector:@selector(compare:)];
|
||||
allItemIds = [[NSArray alloc] initWithArray:keys];
|
||||
filteredItemIds = [allItemIds retain];
|
||||
}
|
||||
|
||||
- (void)showPickerWithInitialItemId:(uint16_t)initialItemId completionBlock:(void(^)(uint16_t itemId))theBlock
|
||||
{
|
||||
[self showWindow:nil];
|
||||
|
||||
[searchField becomeFirstResponder];
|
||||
|
||||
[completionBlock autorelease];
|
||||
completionBlock = [theBlock copy];
|
||||
|
||||
NSUInteger row = [filteredItemIds indexOfObject:[NSNumber numberWithShort:initialItemId]];
|
||||
if (row != NSNotFound)
|
||||
{
|
||||
[tableView selectRowIndexes:[NSIndexSet indexSetWithIndex:row] byExtendingSelection:NO];
|
||||
[tableView scrollRowToVisible:row];
|
||||
}
|
||||
}
|
||||
|
||||
- (IBAction)updateFilter:(id)sender
|
||||
{
|
||||
NSString *filterString = [sender stringValue];
|
||||
|
||||
if (filterString.length == 0)
|
||||
{
|
||||
[filteredItemIds autorelease];
|
||||
filteredItemIds = [allItemIds retain];
|
||||
[tableView reloadData];
|
||||
return;
|
||||
}
|
||||
|
||||
NSMutableArray *results = [NSMutableArray array];
|
||||
|
||||
for (NSNumber *itemId in allItemIds)
|
||||
{
|
||||
NSString *name = [[IJInventoryItem itemIdLookup] objectForKey:itemId];
|
||||
NSRange range = [name rangeOfString:filterString options:NSCaseInsensitiveSearch];
|
||||
if (range.location != NSNotFound)
|
||||
[results addObject:itemId];
|
||||
}
|
||||
|
||||
[filteredItemIds autorelease];
|
||||
filteredItemIds = [results retain];
|
||||
[tableView reloadData];
|
||||
}
|
||||
|
||||
- (IBAction)itemActivated:(id)sender
|
||||
{
|
||||
NSUInteger row = [tableView selectedRow];
|
||||
uint16_t itemId = [[filteredItemIds objectAtIndex:row] shortValue];
|
||||
|
||||
[[self window] orderOut:nil];
|
||||
|
||||
completionBlock(itemId);
|
||||
}
|
||||
|
||||
#pragma mark -
|
||||
#pragma mark NSTableViewDataSource
|
||||
|
||||
- (NSInteger)numberOfRowsInTableView:(NSTableView *)theTableView
|
||||
{
|
||||
return filteredItemIds.count;
|
||||
}
|
||||
- (id)tableView:(NSTableView *)theTableView objectValueForTableColumn:(NSTableColumn *)tableColumn row:(NSInteger)row
|
||||
{
|
||||
// TODO: Change this, because the row will not correspond once we support sorting.
|
||||
NSNumber *itemId = [filteredItemIds objectAtIndex:row];
|
||||
|
||||
if ([tableColumn.identifier isEqual:@"itemId"])
|
||||
return [itemId stringValue];
|
||||
|
||||
NSString *name = [[IJInventoryItem itemIdLookup] objectForKey:itemId];
|
||||
return name;
|
||||
}
|
||||
|
||||
- (void)windowDidResignKey:(NSNotification *)notification
|
||||
{
|
||||
[[self window] orderOut:nil];
|
||||
}
|
||||
|
||||
@end
|
||||
@ -13,31 +13,10 @@
|
||||
|
||||
@synthesize item;
|
||||
|
||||
+ (NSSet *)keyPathsForValuesAffectingCountNumber
|
||||
- (void)cancelOperation:(id)sender
|
||||
{
|
||||
return [NSSet setWithObject:@"item"];
|
||||
}
|
||||
+ (NSSet *)keyPathsForValuesAffectingDamageNumber
|
||||
{
|
||||
return [NSSet setWithObject:@"item"];
|
||||
}
|
||||
|
||||
- (NSNumber *)countNumber
|
||||
{
|
||||
return [NSNumber numberWithShort:item.count];
|
||||
}
|
||||
- (void)setCountNumber:(NSNumber *)number
|
||||
{
|
||||
item.count = [number shortValue];
|
||||
}
|
||||
|
||||
- (NSNumber *)damageNumber
|
||||
{
|
||||
return [NSNumber numberWithShort:item.damage];
|
||||
}
|
||||
- (void)setDamageNumber:(NSNumber *)number
|
||||
{
|
||||
item.damage = [number shortValue];
|
||||
// Somewhat hacky method of closing the window on Esc. Depends on us being the window's delegate.
|
||||
[self.view.window orderOut:nil];
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@ -16,13 +16,12 @@
|
||||
668B27B2125D8F8E0060BF71 /* IJInventoryItem.m in Sources */ = {isa = PBXBuildFile; fileRef = 668B27B1125D8F8E0060BF71 /* IJInventoryItem.m */; };
|
||||
668B27F2125D963F0060BF71 /* IJInventoryWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = 668B27F1125D963F0060BF71 /* IJInventoryWindowController.m */; };
|
||||
668B290F125E40560060BF71 /* Items.csv in Resources */ = {isa = PBXBuildFile; fileRef = 668B28D8125E370A0060BF71 /* Items.csv */; };
|
||||
668B2979125E5DD40060BF71 /* IJItemPickerWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = 668B2978125E5DD40060BF71 /* IJItemPickerWindowController.m */; };
|
||||
668B297C125E5DF00060BF71 /* ItemPicker.xib in Resources */ = {isa = PBXBuildFile; fileRef = 668B297B125E5DF00060BF71 /* ItemPicker.xib */; };
|
||||
66BC00031260215C005A23F4 /* IJInventoryView.m in Sources */ = {isa = PBXBuildFile; fileRef = 66BC00021260215C005A23F4 /* IJInventoryView.m */; };
|
||||
66BC000E12602359005A23F4 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 66BC000D12602359005A23F4 /* QuartzCore.framework */; };
|
||||
66BC033B1260CC59005A23F4 /* MAAttachedWindow.m in Sources */ = {isa = PBXBuildFile; fileRef = 66BC033A1260CC59005A23F4 /* MAAttachedWindow.m */; };
|
||||
66BC03621260D095005A23F4 /* IJItemPropertiesViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 66BC03611260D095005A23F4 /* IJItemPropertiesViewController.m */; };
|
||||
66BC03641260D0B3005A23F4 /* ItemPropertiesView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 66BC03631260D0B3005A23F4 /* ItemPropertiesView.xib */; };
|
||||
66BC04F812619072005A23F4 /* NSColor+Additions.m in Sources */ = {isa = PBXBuildFile; fileRef = 66BC04F712619072005A23F4 /* NSColor+Additions.m */; };
|
||||
66BCFC2B125E9A51005A23F4 /* Credits.rtf in Resources */ = {isa = PBXBuildFile; fileRef = 66BCFC2A125E9A51005A23F4 /* Credits.rtf */; };
|
||||
66BCFC36125EA53E005A23F4 /* InsideJob.icns in Resources */ = {isa = PBXBuildFile; fileRef = 66BCFC35125EA53E005A23F4 /* InsideJob.icns */; };
|
||||
66BCFE62125FCEC6005A23F4 /* DataValuesV110Transparent.png in Resources */ = {isa = PBXBuildFile; fileRef = 66BCFE61125FCEC6005A23F4 /* DataValuesV110Transparent.png */; };
|
||||
@ -54,9 +53,6 @@
|
||||
668B27F0125D963F0060BF71 /* IJInventoryWindowController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IJInventoryWindowController.h; sourceTree = "<group>"; };
|
||||
668B27F1125D963F0060BF71 /* IJInventoryWindowController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = IJInventoryWindowController.m; sourceTree = "<group>"; };
|
||||
668B28D8125E370A0060BF71 /* Items.csv */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = Items.csv; sourceTree = "<group>"; };
|
||||
668B2977125E5DD40060BF71 /* IJItemPickerWindowController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IJItemPickerWindowController.h; sourceTree = "<group>"; };
|
||||
668B2978125E5DD40060BF71 /* IJItemPickerWindowController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = IJItemPickerWindowController.m; sourceTree = "<group>"; };
|
||||
668B297B125E5DF00060BF71 /* ItemPicker.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = ItemPicker.xib; sourceTree = "<group>"; };
|
||||
66BC00011260215C005A23F4 /* IJInventoryView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IJInventoryView.h; sourceTree = "<group>"; };
|
||||
66BC00021260215C005A23F4 /* IJInventoryView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = IJInventoryView.m; sourceTree = "<group>"; };
|
||||
66BC000D12602359005A23F4 /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; };
|
||||
@ -65,6 +61,8 @@
|
||||
66BC03601260D095005A23F4 /* IJItemPropertiesViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IJItemPropertiesViewController.h; sourceTree = "<group>"; };
|
||||
66BC03611260D095005A23F4 /* IJItemPropertiesViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = IJItemPropertiesViewController.m; sourceTree = "<group>"; };
|
||||
66BC03631260D0B3005A23F4 /* ItemPropertiesView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = ItemPropertiesView.xib; sourceTree = "<group>"; };
|
||||
66BC04F612619072005A23F4 /* NSColor+Additions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSColor+Additions.h"; sourceTree = "<group>"; };
|
||||
66BC04F712619072005A23F4 /* NSColor+Additions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSColor+Additions.m"; sourceTree = "<group>"; };
|
||||
66BCFC2A125E9A51005A23F4 /* Credits.rtf */ = {isa = PBXFileReference; lastKnownFileType = text.rtf; path = Credits.rtf; sourceTree = "<group>"; };
|
||||
66BCFC35125EA53E005A23F4 /* InsideJob.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; path = InsideJob.icns; sourceTree = "<group>"; };
|
||||
66BCFE61125FCEC6005A23F4 /* DataValuesV110Transparent.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = DataValuesV110Transparent.png; sourceTree = "<group>"; };
|
||||
@ -156,7 +154,6 @@
|
||||
8D1107310486CEB800E47090 /* InsideJob-Info.plist */,
|
||||
089C165CFE840E0CC02AAC07 /* InfoPlist.strings */,
|
||||
1DDD58140DA1D0A300B32029 /* MainMenu.xib */,
|
||||
668B297B125E5DF00060BF71 /* ItemPicker.xib */,
|
||||
668B28D8125E370A0060BF71 /* Items.csv */,
|
||||
66BCFC2A125E9A51005A23F4 /* Credits.rtf */,
|
||||
66BC03631260D0B3005A23F4 /* ItemPropertiesView.xib */,
|
||||
@ -191,6 +188,8 @@
|
||||
children = (
|
||||
668B255A125D5BCA0060BF71 /* NSData+CocoaDevAdditions.h */,
|
||||
668B255B125D5BCA0060BF71 /* NSData+CocoaDevAdditions.m */,
|
||||
66BC04F612619072005A23F4 /* NSColor+Additions.h */,
|
||||
66BC04F712619072005A23F4 /* NSColor+Additions.m */,
|
||||
);
|
||||
name = Categories;
|
||||
sourceTree = "<group>";
|
||||
@ -200,8 +199,6 @@
|
||||
children = (
|
||||
668B27F0125D963F0060BF71 /* IJInventoryWindowController.h */,
|
||||
668B27F1125D963F0060BF71 /* IJInventoryWindowController.m */,
|
||||
668B2977125E5DD40060BF71 /* IJItemPickerWindowController.h */,
|
||||
668B2978125E5DD40060BF71 /* IJItemPickerWindowController.m */,
|
||||
66BC00011260215C005A23F4 /* IJInventoryView.h */,
|
||||
66BC00021260215C005A23F4 /* IJInventoryView.m */,
|
||||
66BC03601260D095005A23F4 /* IJItemPropertiesViewController.h */,
|
||||
@ -275,7 +272,6 @@
|
||||
8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */,
|
||||
1DDD58160DA1D0A300B32029 /* MainMenu.xib in Resources */,
|
||||
668B290F125E40560060BF71 /* Items.csv in Resources */,
|
||||
668B297C125E5DF00060BF71 /* ItemPicker.xib in Resources */,
|
||||
66BCFC2B125E9A51005A23F4 /* Credits.rtf in Resources */,
|
||||
66BCFC36125EA53E005A23F4 /* InsideJob.icns in Resources */,
|
||||
66BCFE62125FCEC6005A23F4 /* DataValuesV110Transparent.png in Resources */,
|
||||
@ -297,10 +293,10 @@
|
||||
668B27AF125D8EFD0060BF71 /* IJMinecraftLevel.m in Sources */,
|
||||
668B27B2125D8F8E0060BF71 /* IJInventoryItem.m in Sources */,
|
||||
668B27F2125D963F0060BF71 /* IJInventoryWindowController.m in Sources */,
|
||||
668B2979125E5DD40060BF71 /* IJItemPickerWindowController.m in Sources */,
|
||||
66BC00031260215C005A23F4 /* IJInventoryView.m in Sources */,
|
||||
66BC033B1260CC59005A23F4 /* MAAttachedWindow.m in Sources */,
|
||||
66BC03621260D095005A23F4 /* IJItemPropertiesViewController.m in Sources */,
|
||||
66BC04F812619072005A23F4 /* NSColor+Additions.m in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
|
||||
1136
ItemPicker.xib
1136
ItemPicker.xib
File diff suppressed because it is too large
Load Diff
@ -43,21 +43,21 @@
|
||||
<int key="NSvFlags">268</int>
|
||||
<object class="NSMutableArray" key="NSSubviews">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="NSTextField" id="10727911">
|
||||
<object class="NSTextField" id="182288573">
|
||||
<reference key="NSNextResponder" ref="1005"/>
|
||||
<int key="NSvFlags">268</int>
|
||||
<string key="NSFrame">{{74, 11}, {51, 22}}</string>
|
||||
<reference key="NSSuperview" ref="1005"/>
|
||||
<bool key="NSEnabled">YES</bool>
|
||||
<object class="NSTextFieldCell" key="NSCell" id="412323995">
|
||||
<object class="NSTextFieldCell" key="NSCell" id="303491351">
|
||||
<int key="NSCellFlags">-1804468671</int>
|
||||
<int key="NSCellFlags2">272630784</int>
|
||||
<object class="NSFont" key="NSSupport" id="425774918">
|
||||
<object class="NSFont" key="NSSupport" id="705918169">
|
||||
<string key="NSName">LucidaGrande</string>
|
||||
<double key="NSSize">13</double>
|
||||
<int key="NSfFlags">1044</int>
|
||||
</object>
|
||||
<object class="NSNumberFormatter" key="NSFormatter" id="509614708">
|
||||
<object class="NSNumberFormatter" key="NSFormatter" id="942575896">
|
||||
<object class="NSMutableDictionary" key="NS.attributes">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="NSArray" key="dict.sortedKeys">
|
||||
@ -74,7 +74,7 @@
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<boolean value="YES"/>
|
||||
<integer value="1040"/>
|
||||
<object class="NSLocale" id="764553091">
|
||||
<object class="NSLocale" id="309797058">
|
||||
<string key="NS.identifier"/>
|
||||
</object>
|
||||
<string>-∞</string>
|
||||
@ -93,7 +93,7 @@
|
||||
</object>
|
||||
<object class="NSAttributedString" key="NS.nan">
|
||||
<string key="NSString">NaN</string>
|
||||
<object class="NSDictionary" key="NSAttributes" id="367316503">
|
||||
<object class="NSDictionary" key="NSAttributes" id="996502482">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<reference key="dict.sortedKeys" ref="0"/>
|
||||
<object class="NSMutableArray" key="dict.values">
|
||||
@ -101,7 +101,7 @@
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object class="NSDecimalNumberPlaceholder" key="NS.min" id="814214909">
|
||||
<object class="NSDecimalNumberPlaceholder" key="NS.min" id="539232445">
|
||||
<int key="NS.exponent">0</int>
|
||||
<int key="NS.length">0</int>
|
||||
<bool key="NS.negative">YES</bool>
|
||||
@ -109,7 +109,7 @@
|
||||
<int key="NS.mantissa.bo">1</int>
|
||||
<bytes key="NS.mantissa">AAAAAAAAAAAAAAAAAAAAAA</bytes>
|
||||
</object>
|
||||
<reference key="NS.max" ref="814214909"/>
|
||||
<reference key="NS.max" ref="539232445"/>
|
||||
<object class="NSDecimalNumberHandler" key="NS.rounding">
|
||||
<int key="NS.roundingmode">3</int>
|
||||
<bool key="NS.raise.overflow">YES</bool>
|
||||
@ -122,9 +122,9 @@
|
||||
<bool key="NS.localized">NO</bool>
|
||||
<bool key="NS.allowsfloats">YES</bool>
|
||||
</object>
|
||||
<reference key="NSControlView" ref="10727911"/>
|
||||
<reference key="NSControlView" ref="182288573"/>
|
||||
<bool key="NSDrawsBackground">YES</bool>
|
||||
<object class="NSColor" key="NSBackgroundColor" id="21650325">
|
||||
<object class="NSColor" key="NSBackgroundColor" id="735568978">
|
||||
<int key="NSColorSpace">6</int>
|
||||
<string key="NSCatalogName">System</string>
|
||||
<string key="NSColorName">textBackgroundColor</string>
|
||||
@ -133,28 +133,28 @@
|
||||
<bytes key="NSWhite">MQA</bytes>
|
||||
</object>
|
||||
</object>
|
||||
<object class="NSColor" key="NSTextColor" id="123648980">
|
||||
<object class="NSColor" key="NSTextColor" id="687311750">
|
||||
<int key="NSColorSpace">6</int>
|
||||
<string key="NSCatalogName">System</string>
|
||||
<string key="NSColorName">textColor</string>
|
||||
<object class="NSColor" key="NSColor" id="810431693">
|
||||
<object class="NSColor" key="NSColor" id="603691369">
|
||||
<int key="NSColorSpace">3</int>
|
||||
<bytes key="NSWhite">MAA</bytes>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object class="NSTextField" id="941864215">
|
||||
<object class="NSTextField" id="716645080">
|
||||
<reference key="NSNextResponder" ref="1005"/>
|
||||
<int key="NSvFlags">268</int>
|
||||
<string key="NSFrame">{{74, 38}, {51, 22}}</string>
|
||||
<reference key="NSSuperview" ref="1005"/>
|
||||
<bool key="NSEnabled">YES</bool>
|
||||
<object class="NSTextFieldCell" key="NSCell" id="689823842">
|
||||
<object class="NSTextFieldCell" key="NSCell" id="252659595">
|
||||
<int key="NSCellFlags">-1804468671</int>
|
||||
<int key="NSCellFlags2">272630784</int>
|
||||
<reference key="NSSupport" ref="425774918"/>
|
||||
<object class="NSNumberFormatter" key="NSFormatter" id="1072479286">
|
||||
<reference key="NSSupport" ref="705918169"/>
|
||||
<object class="NSNumberFormatter" key="NSFormatter" id="396294665">
|
||||
<object class="NSMutableDictionary" key="NS.attributes">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="NSArray" key="dict.sortedKeys">
|
||||
@ -171,7 +171,7 @@
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<boolean value="YES"/>
|
||||
<integer value="1040"/>
|
||||
<reference ref="764553091"/>
|
||||
<reference ref="309797058"/>
|
||||
<string>-∞</string>
|
||||
<string/>
|
||||
<integer value="1"/>
|
||||
@ -188,10 +188,10 @@
|
||||
</object>
|
||||
<object class="NSAttributedString" key="NS.nan">
|
||||
<string key="NSString">NaN</string>
|
||||
<reference key="NSAttributes" ref="367316503"/>
|
||||
<reference key="NSAttributes" ref="996502482"/>
|
||||
</object>
|
||||
<reference key="NS.min" ref="814214909"/>
|
||||
<reference key="NS.max" ref="814214909"/>
|
||||
<reference key="NS.min" ref="539232445"/>
|
||||
<reference key="NS.max" ref="539232445"/>
|
||||
<object class="NSDecimalNumberHandler" key="NS.rounding">
|
||||
<int key="NS.roundingmode">3</int>
|
||||
<bool key="NS.raise.overflow">YES</bool>
|
||||
@ -204,25 +204,25 @@
|
||||
<bool key="NS.localized">NO</bool>
|
||||
<bool key="NS.allowsfloats">YES</bool>
|
||||
</object>
|
||||
<reference key="NSControlView" ref="941864215"/>
|
||||
<reference key="NSControlView" ref="716645080"/>
|
||||
<bool key="NSDrawsBackground">YES</bool>
|
||||
<reference key="NSBackgroundColor" ref="21650325"/>
|
||||
<reference key="NSTextColor" ref="123648980"/>
|
||||
<reference key="NSBackgroundColor" ref="735568978"/>
|
||||
<reference key="NSTextColor" ref="687311750"/>
|
||||
</object>
|
||||
</object>
|
||||
<object class="NSTextField" id="1049197209">
|
||||
<object class="NSTextField" id="10217760">
|
||||
<reference key="NSNextResponder" ref="1005"/>
|
||||
<int key="NSvFlags">268</int>
|
||||
<string key="NSFrame">{{3, 13}, {66, 17}}</string>
|
||||
<reference key="NSSuperview" ref="1005"/>
|
||||
<bool key="NSEnabled">YES</bool>
|
||||
<object class="NSTextFieldCell" key="NSCell" id="689917300">
|
||||
<object class="NSTextFieldCell" key="NSCell" id="827912331">
|
||||
<int key="NSCellFlags">68288064</int>
|
||||
<int key="NSCellFlags2">71304192</int>
|
||||
<string key="NSContents">Damage:</string>
|
||||
<reference key="NSSupport" ref="425774918"/>
|
||||
<reference key="NSControlView" ref="1049197209"/>
|
||||
<object class="NSColor" key="NSBackgroundColor" id="248768576">
|
||||
<reference key="NSSupport" ref="705918169"/>
|
||||
<reference key="NSControlView" ref="10217760"/>
|
||||
<object class="NSColor" key="NSBackgroundColor" id="133865741">
|
||||
<int key="NSColorSpace">6</int>
|
||||
<string key="NSCatalogName">System</string>
|
||||
<string key="NSColorName">controlColor</string>
|
||||
@ -231,28 +231,28 @@
|
||||
<bytes key="NSWhite">MC42NjY2NjY2NjY3AA</bytes>
|
||||
</object>
|
||||
</object>
|
||||
<object class="NSColor" key="NSTextColor" id="880752474">
|
||||
<object class="NSColor" key="NSTextColor" id="579144755">
|
||||
<int key="NSColorSpace">6</int>
|
||||
<string key="NSCatalogName">System</string>
|
||||
<string key="NSColorName">controlTextColor</string>
|
||||
<reference key="NSColor" ref="810431693"/>
|
||||
<reference key="NSColor" ref="603691369"/>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object class="NSTextField" id="233758798">
|
||||
<object class="NSTextField" id="708961076">
|
||||
<reference key="NSNextResponder" ref="1005"/>
|
||||
<int key="NSvFlags">268</int>
|
||||
<string key="NSFrame">{{3, 40}, {66, 17}}</string>
|
||||
<reference key="NSSuperview" ref="1005"/>
|
||||
<bool key="NSEnabled">YES</bool>
|
||||
<object class="NSTextFieldCell" key="NSCell" id="549320844">
|
||||
<object class="NSTextFieldCell" key="NSCell" id="367623539">
|
||||
<int key="NSCellFlags">68288064</int>
|
||||
<int key="NSCellFlags2">71304192</int>
|
||||
<string key="NSContents">Count:</string>
|
||||
<reference key="NSSupport" ref="425774918"/>
|
||||
<reference key="NSControlView" ref="233758798"/>
|
||||
<reference key="NSBackgroundColor" ref="248768576"/>
|
||||
<reference key="NSTextColor" ref="880752474"/>
|
||||
<reference key="NSSupport" ref="705918169"/>
|
||||
<reference key="NSControlView" ref="708961076"/>
|
||||
<reference key="NSBackgroundColor" ref="133865741"/>
|
||||
<reference key="NSTextColor" ref="579144755"/>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
@ -274,35 +274,35 @@
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBBindingConnection" key="connection">
|
||||
<string key="label">value: countNumber</string>
|
||||
<reference key="source" ref="941864215"/>
|
||||
<string key="label">value: item.count</string>
|
||||
<reference key="source" ref="716645080"/>
|
||||
<reference key="destination" ref="1001"/>
|
||||
<object class="NSNibBindingConnector" key="connector">
|
||||
<reference key="NSSource" ref="941864215"/>
|
||||
<reference key="NSSource" ref="716645080"/>
|
||||
<reference key="NSDestination" ref="1001"/>
|
||||
<string key="NSLabel">value: countNumber</string>
|
||||
<string key="NSLabel">value: item.count</string>
|
||||
<string key="NSBinding">value</string>
|
||||
<string key="NSKeyPath">countNumber</string>
|
||||
<string key="NSKeyPath">item.count</string>
|
||||
<int key="NSNibBindingConnectorVersion">2</int>
|
||||
</object>
|
||||
</object>
|
||||
<int key="connectionID">13</int>
|
||||
<int key="connectionID">15</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBBindingConnection" key="connection">
|
||||
<string key="label">value: damageNumber</string>
|
||||
<reference key="source" ref="10727911"/>
|
||||
<string key="label">value: item.damage</string>
|
||||
<reference key="source" ref="182288573"/>
|
||||
<reference key="destination" ref="1001"/>
|
||||
<object class="NSNibBindingConnector" key="connector">
|
||||
<reference key="NSSource" ref="10727911"/>
|
||||
<reference key="NSSource" ref="182288573"/>
|
||||
<reference key="NSDestination" ref="1001"/>
|
||||
<string key="NSLabel">value: damageNumber</string>
|
||||
<string key="NSLabel">value: item.damage</string>
|
||||
<string key="NSBinding">value</string>
|
||||
<string key="NSKeyPath">damageNumber</string>
|
||||
<string key="NSKeyPath">item.damage</string>
|
||||
<int key="NSNibBindingConnectorVersion">2</int>
|
||||
</object>
|
||||
</object>
|
||||
<int key="connectionID">14</int>
|
||||
<int key="connectionID">16</int>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBMutableOrderedSet" key="objectRecords">
|
||||
@ -337,86 +337,86 @@
|
||||
<reference key="object" ref="1005"/>
|
||||
<object class="NSMutableArray" key="children">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<reference ref="233758798"/>
|
||||
<reference ref="1049197209"/>
|
||||
<reference ref="941864215"/>
|
||||
<reference ref="10727911"/>
|
||||
<reference ref="708961076"/>
|
||||
<reference ref="10217760"/>
|
||||
<reference ref="716645080"/>
|
||||
<reference ref="182288573"/>
|
||||
</object>
|
||||
<reference key="parent" ref="0"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">3</int>
|
||||
<reference key="object" ref="233758798"/>
|
||||
<reference key="object" ref="708961076"/>
|
||||
<object class="NSMutableArray" key="children">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<reference ref="549320844"/>
|
||||
<reference ref="367623539"/>
|
||||
</object>
|
||||
<reference key="parent" ref="1005"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">4</int>
|
||||
<reference key="object" ref="549320844"/>
|
||||
<reference key="parent" ref="233758798"/>
|
||||
<reference key="object" ref="367623539"/>
|
||||
<reference key="parent" ref="708961076"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">5</int>
|
||||
<reference key="object" ref="1049197209"/>
|
||||
<reference key="object" ref="10217760"/>
|
||||
<object class="NSMutableArray" key="children">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<reference ref="689917300"/>
|
||||
<reference ref="827912331"/>
|
||||
</object>
|
||||
<reference key="parent" ref="1005"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">6</int>
|
||||
<reference key="object" ref="689917300"/>
|
||||
<reference key="parent" ref="1049197209"/>
|
||||
<reference key="object" ref="827912331"/>
|
||||
<reference key="parent" ref="10217760"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">7</int>
|
||||
<reference key="object" ref="941864215"/>
|
||||
<reference key="object" ref="716645080"/>
|
||||
<object class="NSMutableArray" key="children">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<reference ref="689823842"/>
|
||||
<reference ref="252659595"/>
|
||||
</object>
|
||||
<reference key="parent" ref="1005"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">8</int>
|
||||
<reference key="object" ref="689823842"/>
|
||||
<reference key="object" ref="252659595"/>
|
||||
<object class="NSMutableArray" key="children">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<reference ref="1072479286"/>
|
||||
<reference ref="396294665"/>
|
||||
</object>
|
||||
<reference key="parent" ref="941864215"/>
|
||||
<reference key="parent" ref="716645080"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">9</int>
|
||||
<reference key="object" ref="1072479286"/>
|
||||
<reference key="parent" ref="689823842"/>
|
||||
<reference key="object" ref="396294665"/>
|
||||
<reference key="parent" ref="252659595"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">10</int>
|
||||
<reference key="object" ref="10727911"/>
|
||||
<reference key="object" ref="182288573"/>
|
||||
<object class="NSMutableArray" key="children">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<reference ref="412323995"/>
|
||||
<reference ref="303491351"/>
|
||||
</object>
|
||||
<reference key="parent" ref="1005"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">11</int>
|
||||
<reference key="object" ref="412323995"/>
|
||||
<reference key="object" ref="303491351"/>
|
||||
<object class="NSMutableArray" key="children">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<reference ref="509614708"/>
|
||||
<reference ref="942575896"/>
|
||||
</object>
|
||||
<reference key="parent" ref="10727911"/>
|
||||
<reference key="parent" ref="182288573"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">12</int>
|
||||
<reference key="object" ref="509614708"/>
|
||||
<reference key="parent" ref="412323995"/>
|
||||
<reference key="object" ref="942575896"/>
|
||||
<reference key="parent" ref="303491351"/>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
@ -497,7 +497,7 @@
|
||||
</object>
|
||||
</object>
|
||||
<nil key="sourceID"/>
|
||||
<int key="maxID">14</int>
|
||||
<int key="maxID">16</int>
|
||||
</object>
|
||||
<object class="IBClassDescriber" key="IBDocument.Classes">
|
||||
<object class="NSMutableArray" key="referencedPartialClassDescriptions">
|
||||
@ -524,21 +524,21 @@
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">NSApplication</string>
|
||||
<string key="superclassName">NSResponder</string>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier" id="564158232">
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier" id="12374684">
|
||||
<string key="majorKey">IBFrameworkSource</string>
|
||||
<string key="minorKey">AppKit.framework/Headers/NSApplication.h</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">NSApplication</string>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier" id="39221586">
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier" id="302226814">
|
||||
<string key="majorKey">IBFrameworkSource</string>
|
||||
<string key="minorKey">AppKit.framework/Headers/NSApplicationScripting.h</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">NSApplication</string>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier" id="216200168">
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier" id="281156068">
|
||||
<string key="majorKey">IBFrameworkSource</string>
|
||||
<string key="minorKey">AppKit.framework/Headers/NSColorPanel.h</string>
|
||||
</object>
|
||||
@ -575,7 +575,7 @@
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">NSControl</string>
|
||||
<string key="superclassName">NSView</string>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier" id="308912597">
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier" id="521988393">
|
||||
<string key="majorKey">IBFrameworkSource</string>
|
||||
<string key="minorKey">AppKit.framework/Headers/NSControl.h</string>
|
||||
</object>
|
||||
@ -591,7 +591,7 @@
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">NSMenu</string>
|
||||
<string key="superclassName">NSObject</string>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier" id="692724924">
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier" id="866384046">
|
||||
<string key="majorKey">IBFrameworkSource</string>
|
||||
<string key="minorKey">AppKit.framework/Headers/NSMenu.h</string>
|
||||
</object>
|
||||
@ -613,19 +613,19 @@
|
||||
</object>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">NSObject</string>
|
||||
<reference key="sourceIdentifier" ref="564158232"/>
|
||||
<reference key="sourceIdentifier" ref="12374684"/>
|
||||
</object>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">NSObject</string>
|
||||
<reference key="sourceIdentifier" ref="39221586"/>
|
||||
<reference key="sourceIdentifier" ref="302226814"/>
|
||||
</object>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">NSObject</string>
|
||||
<reference key="sourceIdentifier" ref="216200168"/>
|
||||
<reference key="sourceIdentifier" ref="281156068"/>
|
||||
</object>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">NSObject</string>
|
||||
<reference key="sourceIdentifier" ref="308912597"/>
|
||||
<reference key="sourceIdentifier" ref="521988393"/>
|
||||
</object>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">NSObject</string>
|
||||
@ -664,7 +664,7 @@
|
||||
</object>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">NSObject</string>
|
||||
<reference key="sourceIdentifier" ref="692724924"/>
|
||||
<reference key="sourceIdentifier" ref="866384046"/>
|
||||
</object>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">NSObject</string>
|
||||
@ -710,7 +710,7 @@
|
||||
</object>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">NSObject</string>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier" id="901875345">
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier" id="320376654">
|
||||
<string key="majorKey">IBFrameworkSource</string>
|
||||
<string key="minorKey">AppKit.framework/Headers/NSView.h</string>
|
||||
</object>
|
||||
@ -924,7 +924,7 @@
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">NSView</string>
|
||||
<string key="superclassName">NSResponder</string>
|
||||
<reference key="sourceIdentifier" ref="901875345"/>
|
||||
<reference key="sourceIdentifier" ref="320376654"/>
|
||||
</object>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">NSViewController</string>
|
||||
|
||||
16
NSColor+Additions.h
Normal file
16
NSColor+Additions.h
Normal file
@ -0,0 +1,16 @@
|
||||
//
|
||||
// NSColor+Additions.h
|
||||
// InsideJob
|
||||
//
|
||||
// Created by Adam Preble on 10/10/10.
|
||||
// Copyright 2010 Adam Preble. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Cocoa/Cocoa.h>
|
||||
|
||||
|
||||
@interface NSColor (Additions)
|
||||
|
||||
- (CGColorRef)CGColor;
|
||||
|
||||
@end
|
||||
27
NSColor+Additions.m
Normal file
27
NSColor+Additions.m
Normal file
@ -0,0 +1,27 @@
|
||||
//
|
||||
// NSColor+Additions.m
|
||||
// InsideJob
|
||||
//
|
||||
// Created by Adam Preble on 10/10/10.
|
||||
// Copyright 2010 Adam Preble. All rights reserved.
|
||||
//
|
||||
|
||||
#import "NSColor+Additions.h"
|
||||
|
||||
|
||||
@implementation NSColor (Additions)
|
||||
|
||||
- (CGColorRef)CGColor
|
||||
{
|
||||
CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB();
|
||||
NSColor *deviceColor = [self colorUsingColorSpaceName:NSDeviceRGBColorSpace];
|
||||
|
||||
CGFloat components[4];
|
||||
[deviceColor getRed: &components[0] green: &components[1] blue:&components[2] alpha: &components[3]];
|
||||
|
||||
CGColorRef output = CGColorCreate(colorSpace, components);
|
||||
CGColorSpaceRelease (colorSpace);
|
||||
return (CGColorRef)[(id)output autorelease];
|
||||
}
|
||||
|
||||
@end
|
||||
Loading…
x
Reference in New Issue
Block a user