Finished supporting mouse buttons
authorFrank Huang <me@nongraphical.com>
Fri, 27 Jul 2012 19:12:38 +0000 (12:12 -0700)
committerFrank Huang <me@nongraphical.com>
Fri, 27 Jul 2012 19:12:38 +0000 (12:12 -0700)
English.lproj/MainMenu.xib
Enjoy.xcodeproj/TemplateIcon.icns [new file with mode: 0644]
Enjoy.xcodeproj/project.pbxproj [new file with mode: 0644]
TargetController.h
TargetController.m
TargetMouseBtn.h
TargetMouseBtn.m
TargetMouseMove.m

index a7843f11e1fd4d668fac72a2d58fb90df93be0f0..60d948f4a031b43803fe78b4c6678ec06c736326 100644 (file)
                                                                                                                        <int key="NSvFlags">256</int>
                                                                                                                        <string key="NSFrameSize">{242, 485}</string>
                                                                                                                        <reference key="NSSuperview" ref="698362889"/>
-                                                                                                                       <reference key="NSWindow"/>
                                                                                                                        <reference key="NSNextKeyView" ref="1036252745"/>
                                                                                                                        <bool key="NSEnabled">YES</bool>
                                                                                                                        <object class="_NSCornerView" key="NSCornerView">
                                                                                                        </object>
                                                                                                        <string key="NSFrame">{{1, 1}, {242, 485}}</string>
                                                                                                        <reference key="NSSuperview" ref="364857164"/>
-                                                                                                       <reference key="NSWindow"/>
                                                                                                        <reference key="NSNextKeyView" ref="365506042"/>
                                                                                                        <reference key="NSDocView" ref="365506042"/>
                                                                                                        <reference key="NSBGColor" ref="834857663"/>
                                                                                                        <int key="NSvFlags">-2147483392</int>
                                                                                                        <string key="NSFrame">{{1, 1}, {8, 298}}</string>
                                                                                                        <reference key="NSSuperview" ref="364857164"/>
-                                                                                                       <reference key="NSWindow"/>
                                                                                                        <reference key="NSNextKeyView" ref="606740242"/>
                                                                                                        <reference key="NSTarget" ref="364857164"/>
                                                                                                        <string key="NSAction">_doScroller:</string>
                                                                                                        <int key="NSvFlags">-2147483392</int>
                                                                                                        <string key="NSFrame">{{-100, -100}, {473, 15}}</string>
                                                                                                        <reference key="NSSuperview" ref="364857164"/>
-                                                                                                       <reference key="NSWindow"/>
                                                                                                        <reference key="NSNextKeyView" ref="698362889"/>
                                                                                                        <int key="NSsFlags">1</int>
                                                                                                        <reference key="NSTarget" ref="364857164"/>
                                                                                        </object>
                                                                                        <string key="NSFrameSize">{244, 487}</string>
                                                                                        <reference key="NSSuperview" ref="977242492"/>
-                                                                                       <reference key="NSWindow"/>
                                                                                        <reference key="NSNextKeyView" ref="892486973"/>
                                                                                        <int key="NSsFlags">133650</int>
                                                                                        <reference key="NSVScroller" ref="1036252745"/>
                                                                        </object>
                                                                        <string key="NSFrameSize">{244, 487}</string>
                                                                        <reference key="NSSuperview" ref="206489479"/>
-                                                                       <reference key="NSWindow"/>
                                                                        <reference key="NSNextKeyView" ref="364857164"/>
                                                                        <string key="NSClassName">NSView</string>
                                                                </object>
                                                                                        <int key="NSvFlags">268</int>
                                                                                        <string key="NSFrame">{{227, 57}, {180, 24}}</string>
                                                                                        <reference key="NSSuperview" ref="606740242"/>
-                                                                                       <reference key="NSWindow"/>
                                                                                        <reference key="NSNextKeyView"/>
                                                                                        <string key="NSReuseIdentifierKey">_NS:9</string>
                                                                                        <bool key="NSEnabled">YES</bool>
                                                                                        <int key="NSvFlags">268</int>
                                                                                        <string key="NSFrame">{{20, 39}, {201, 388}}</string>
                                                                                        <reference key="NSSuperview" ref="606740242"/>
-                                                                                       <reference key="NSWindow"/>
                                                                                        <reference key="NSNextKeyView" ref="719496628"/>
                                                                                        <int key="NSNumRows">6</int>
                                                                                        <int key="NSNumCols">1</int>
@@ -1421,7 +1413,6 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
                                                                                                                        <int key="NSvFlags">2322</int>
                                                                                                                        <string key="NSFrameSize">{172, 14}</string>
                                                                                                                        <reference key="NSSuperview" ref="912477807"/>
-                                                                                                                       <reference key="NSWindow"/>
                                                                                                                        <reference key="NSNextKeyView" ref="194275224"/>
                                                                                                                        <object class="NSTextContainer" key="NSTextContainer" id="964782117">
                                                                                                                                <object class="NSLayoutManager" key="NSLayoutManager">
@@ -1499,12 +1490,11 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
                                                                                                        </object>
                                                                                                        <string key="NSFrame">{{2, 2}, {172, 20}}</string>
                                                                                                        <reference key="NSSuperview" ref="719496628"/>
-                                                                                                       <reference key="NSWindow"/>
                                                                                                        <reference key="NSNextKeyView" ref="945527731"/>
                                                                                                        <reference key="NSDocView" ref="945527731"/>
                                                                                                        <reference key="NSBGColor" ref="214000480"/>
                                                                                                        <object class="NSCursor" key="NSCursor">
-                                                                                                               <string key="NSHotSpot">{5, 5}</string>
+                                                                                                               <string key="NSHotSpot">{1, -1}</string>
                                                                                                                <int key="NSCursorType">0</int>
                                                                                                        </object>
                                                                                                        <int key="NScvFlags">4</int>
@@ -1514,7 +1504,6 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
                                                                                                        <int key="NSvFlags">-2147483392</int>
                                                                                                        <string key="NSFrame">{{-100, -100}, {15, 133}}</string>
                                                                                                        <reference key="NSSuperview" ref="719496628"/>
-                                                                                                       <reference key="NSWindow"/>
                                                                                                        <reference key="NSNextKeyView" ref="725849905"/>
                                                                                                        <reference key="NSTarget" ref="719496628"/>
                                                                                                        <string key="NSAction">_doScroller:</string>
@@ -1525,7 +1514,6 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
                                                                                                        <int key="NSvFlags">-2147483392</int>
                                                                                                        <string key="NSFrame">{{-100, -100}, {87, 18}}</string>
                                                                                                        <reference key="NSSuperview" ref="719496628"/>
-                                                                                                       <reference key="NSWindow"/>
                                                                                                        <reference key="NSNextKeyView" ref="912477807"/>
                                                                                                        <int key="NSsFlags">1</int>
                                                                                                        <reference key="NSTarget" ref="719496628"/>
@@ -1536,7 +1524,6 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
                                                                                        </object>
                                                                                        <string key="NSFrame">{{229, 318}, {176, 24}}</string>
                                                                                        <reference key="NSSuperview" ref="606740242"/>
-                                                                                       <reference key="NSWindow"/>
                                                                                        <reference key="NSNextKeyView" ref="605541128"/>
                                                                                        <int key="NSsFlags">133123</int>
                                                                                        <reference key="NSVScroller" ref="605541128"/>
@@ -1548,7 +1535,6 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
                                                                                        <int key="NSvFlags">268</int>
                                                                                        <string key="NSFrame">{{226, 251}, {182, 26}}</string>
                                                                                        <reference key="NSSuperview" ref="606740242"/>
-                                                                                       <reference key="NSWindow"/>
                                                                                        <reference key="NSNextKeyView" ref="125828224"/>
                                                                                        <bool key="NSEnabled">YES</bool>
                                                                                        <object class="NSPopUpButtonCell" key="NSCell" id="74311158">
@@ -1582,7 +1568,6 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
                                                                                        <int key="NSvFlags">268</int>
                                                                                        <string key="NSFrame">{{5, 456}, {507, 17}}</string>
                                                                                        <reference key="NSSuperview" ref="606740242"/>
-                                                                                       <reference key="NSWindow"/>
                                                                                        <reference key="NSNextKeyView" ref="497528019"/>
                                                                                        <bool key="NSEnabled">YES</bool>
                                                                                        <object class="NSTextFieldCell" key="NSCell" id="853503577">
@@ -1605,7 +1590,6 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
                                                                                        <int key="NSvFlags">12</int>
                                                                                        <string key="NSFrame">{{12, 445}, {493, 5}}</string>
                                                                                        <reference key="NSSuperview" ref="606740242"/>
-                                                                                       <reference key="NSWindow"/>
                                                                                        <reference key="NSNextKeyView" ref="120408205"/>
                                                                                        <string key="NSOffsets">{0, 0}</string>
                                                                                        <object class="NSTextFieldCell" key="NSTitleCell">
@@ -1632,21 +1616,18 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
                                                                        </object>
                                                                        <string key="NSFrame">{{253, 0}, {517, 487}}</string>
                                                                        <reference key="NSSuperview" ref="206489479"/>
-                                                                       <reference key="NSWindow"/>
                                                                        <reference key="NSNextKeyView" ref="1016088174"/>
                                                                        <string key="NSClassName">NSView</string>
                                                                </object>
                                                        </object>
                                                        <string key="NSFrameSize">{770, 487}</string>
                                                        <reference key="NSSuperview" ref="177223957"/>
-                                                       <reference key="NSWindow"/>
                                                        <reference key="NSNextKeyView" ref="977242492"/>
                                                        <bool key="NSIsVertical">YES</bool>
                                                </object>
                                        </object>
                                        <string key="NSFrameSize">{770, 487}</string>
                                        <reference key="NSSuperview"/>
-                                       <reference key="NSWindow"/>
                                        <reference key="NSNextKeyView" ref="206489479"/>
                                </object>
                                <string key="NSScreenRect">{{0, 0}, {1920, 1178}}</string>
@@ -1673,7 +1654,6 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
                                                                                <int key="NSvFlags">256</int>
                                                                                <string key="NSFrameSize">{320, 418}</string>
                                                                                <reference key="NSSuperview" ref="947403733"/>
-                                                                               <reference key="NSWindow"/>
                                                                                <reference key="NSNextKeyView" ref="968378655"/>
                                                                                <bool key="NSEnabled">YES</bool>
                                                                                <object class="_NSCornerView" key="NSCornerView">
@@ -1731,7 +1711,6 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
                                                                </object>
                                                                <string key="NSFrame">{{1, 1}, {320, 418}}</string>
                                                                <reference key="NSSuperview" ref="443618264"/>
-                                                               <reference key="NSWindow"/>
                                                                <reference key="NSNextKeyView" ref="762432499"/>
                                                                <reference key="NSDocView" ref="762432499"/>
                                                                <reference key="NSBGColor" ref="834857663"/>
@@ -1742,7 +1721,6 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
                                                                <int key="NSvFlags">-2147483392</int>
                                                                <string key="NSFrame">{{306, 1}, {15, 403}}</string>
                                                                <reference key="NSSuperview" ref="443618264"/>
-                                                               <reference key="NSWindow"/>
                                                                <reference key="NSNextKeyView" ref="553414014"/>
                                                                <reference key="NSTarget" ref="443618264"/>
                                                                <string key="NSAction">_doScroller:</string>
@@ -1753,7 +1731,6 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
                                                                <int key="NSvFlags">-2147483392</int>
                                                                <string key="NSFrame">{{1, 404}, {305, 15}}</string>
                                                                <reference key="NSSuperview" ref="443618264"/>
-                                                               <reference key="NSWindow"/>
                                                                <reference key="NSNextKeyView" ref="861276216"/>
                                                                <int key="NSsFlags">1</int>
                                                                <reference key="NSTarget" ref="443618264"/>
@@ -1763,7 +1740,6 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
                                                </object>
                                                <string key="NSFrame">{{0, 34}, {322, 420}}</string>
                                                <reference key="NSSuperview" ref="671181514"/>
-                                               <reference key="NSWindow"/>
                                                <reference key="NSNextKeyView" ref="947403733"/>
                                                <int key="NSsFlags">133682</int>
                                                <reference key="NSVScroller" ref="968378655"/>
@@ -1776,7 +1752,6 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
                                                <int key="NSvFlags">260</int>
                                                <string key="NSFrame">{{10, 4}, {39, 28}}</string>
                                                <reference key="NSSuperview" ref="671181514"/>
-                                               <reference key="NSWindow"/>
                                                <reference key="NSNextKeyView" ref="456935010"/>
                                                <bool key="NSEnabled">YES</bool>
                                                <object class="NSButtonCell" key="NSCell" id="867532725">
@@ -1802,7 +1777,6 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
                                                <int key="NSvFlags">260</int>
                                                <string key="NSFrame">{{57, 4}, {39, 28}}</string>
                                                <reference key="NSSuperview" ref="671181514"/>
-                                               <reference key="NSWindow"/>
                                                <reference key="NSNextKeyView"/>
                                                <bool key="NSEnabled">YES</bool>
                                                <object class="NSButtonCell" key="NSCell" id="1008023024">
@@ -1826,7 +1800,6 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
                                </object>
                                <string key="NSFrameSize">{322, 454}</string>
                                <reference key="NSSuperview"/>
-                               <reference key="NSWindow"/>
                                <reference key="NSNextKeyView" ref="443618264"/>
                                <string key="NSClassName">NSView</string>
                        </object>
@@ -1850,26 +1823,6 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
                        <object class="NSCustomObject" id="1007832501">
                                <string key="NSClassName">JoystickController</string>
                        </object>
-                       <object class="NSButtonCell" id="377623075">
-                               <int key="NSCellFlags">67239424</int>
-                               <int key="NSCellFlags2">131072</int>
-                               <string key="NSContents">Check</string>
-                               <reference key="NSSupport" ref="26"/>
-                               <string key="NSCellIdentifier">_NS:9</string>
-                               <int key="NSButtonFlags">1211912703</int>
-                               <int key="NSButtonFlags2">2</int>
-                               <object class="NSCustomResource" key="NSNormalImage">
-                                       <string key="NSClassName">NSImage</string>
-                                       <string key="NSResourceName">NSSwitch</string>
-                               </object>
-                               <object class="NSButtonImageSource" key="NSAlternateImage">
-                                       <string key="NSImageName">NSSwitch</string>
-                               </object>
-                               <string key="NSAlternateContents"/>
-                               <string key="NSKeyEquivalent"/>
-                               <int key="NSPeriodicDelay">200</int>
-                               <int key="NSPeriodicInterval">25</int>
-                       </object>
                        <object class="NSCustomObject" id="801536542">
                                <string key="NSClassName">TargetController</string>
                        </object>
@@ -2429,6 +2382,22 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
                                        </object>
                                        <int key="connectionID">731</int>
                                </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">mouseBtnSelect</string>
+                                               <reference key="source" ref="801536542"/>
+                                               <reference key="destination" ref="125828224"/>
+                                       </object>
+                                       <int key="connectionID">746</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBActionConnection" key="connection">
+                                               <string key="label">mbtnChanged:</string>
+                                               <reference key="source" ref="801536542"/>
+                                               <reference key="destination" ref="125828224"/>
+                                       </object>
+                                       <int key="connectionID">747</int>
+                               </object>
                        </object>
                        <object class="IBMutableOrderedSet" key="objectRecords">
                                <object class="NSArray" key="orderedObjects">
@@ -3289,11 +3258,6 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
                                                <reference key="object" ref="632642090"/>
                                                <reference key="parent" ref="120408205"/>
                                        </object>
-                                       <object class="IBObjectRecord">
-                                               <int key="objectID">736</int>
-                                               <reference key="object" ref="377623075"/>
-                                               <reference key="parent" ref="0"/>
-                                       </object>
                                        <object class="IBObjectRecord">
                                                <int key="objectID">744</int>
                                                <reference key="object" ref="125828224"/>
@@ -3434,7 +3398,6 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
                                        <string>733.IBPluginDependency</string>
                                        <string>734.IBPluginDependency</string>
                                        <string>735.IBPluginDependency</string>
-                                       <string>736.IBPluginDependency</string>
                                        <string>744.IBPluginDependency</string>
                                        <string>745.IBNSSegmentedControlInspectorSelectedSegmentMetadataKey</string>
                                        <string>745.IBPluginDependency</string>
@@ -3565,7 +3528,6 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
                                        <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
                                        <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
                                        <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
-                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
                                        <integer value="0"/>
                                        <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
                                        <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
@@ -3585,400 +3547,9 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
                                <reference key="dict.values" ref="0"/>
                        </object>
                        <nil key="sourceID"/>
-                       <int key="maxID">745</int>
-               </object>
-               <object class="IBClassDescriber" key="IBDocument.Classes">
-                       <object class="NSMutableArray" key="referencedPartialClassDescriptions">
-                               <bool key="EncodedWithXMLCoder">YES</bool>
-                               <object class="IBPartialClassDescription">
-                                       <string key="className">ApplicationController</string>
-                                       <string key="superclassName">NSObject</string>
-                                       <object class="NSMutableDictionary" key="actions">
-                                               <string key="NS.key.0">toggleActivity:</string>
-                                               <string key="NS.object.0">id</string>
-                                       </object>
-                                       <object class="NSMutableDictionary" key="actionInfosByName">
-                                               <string key="NS.key.0">toggleActivity:</string>
-                                               <object class="IBActionInfo" key="NS.object.0">
-                                                       <string key="name">toggleActivity:</string>
-                                                       <string key="candidateClassName">id</string>
-                                               </object>
-                                       </object>
-                                       <object class="NSMutableDictionary" key="outlets">
-                                               <bool key="EncodedWithXMLCoder">YES</bool>
-                                               <object class="NSArray" key="dict.sortedKeys">
-                                                       <bool key="EncodedWithXMLCoder">YES</bool>
-                                                       <string>activeButton</string>
-                                                       <string>activeMenuItem</string>
-                                                       <string>configsController</string>
-                                                       <string>dockMenuBase</string>
-                                                       <string>drawer</string>
-                                                       <string>jsController</string>
-                                                       <string>mainWindow</string>
-                                                       <string>targetController</string>
-                                               </object>
-                                               <object class="NSArray" key="dict.values">
-                                                       <bool key="EncodedWithXMLCoder">YES</bool>
-                                                       <string>NSToolbarItem</string>
-                                                       <string>NSMenuItem</string>
-                                                       <string>ConfigsController</string>
-                                                       <string>NSMenu</string>
-                                                       <string>NSDrawer</string>
-                                                       <string>JoystickController</string>
-                                                       <string>NSWindow</string>
-                                                       <string>TargetController</string>
-                                               </object>
-                                       </object>
-                                       <object class="NSMutableDictionary" key="toOneOutletInfosByName">
-                                               <bool key="EncodedWithXMLCoder">YES</bool>
-                                               <object class="NSArray" key="dict.sortedKeys">
-                                                       <bool key="EncodedWithXMLCoder">YES</bool>
-                                                       <string>activeButton</string>
-                                                       <string>activeMenuItem</string>
-                                                       <string>configsController</string>
-                                                       <string>dockMenuBase</string>
-                                                       <string>drawer</string>
-                                                       <string>jsController</string>
-                                                       <string>mainWindow</string>
-                                                       <string>targetController</string>
-                                               </object>
-                                               <object class="NSArray" key="dict.values">
-                                                       <bool key="EncodedWithXMLCoder">YES</bool>
-                                                       <object class="IBToOneOutletInfo">
-                                                               <string key="name">activeButton</string>
-                                                               <string key="candidateClassName">NSToolbarItem</string>
-                                                       </object>
-                                                       <object class="IBToOneOutletInfo">
-                                                               <string key="name">activeMenuItem</string>
-                                                               <string key="candidateClassName">NSMenuItem</string>
-                                                       </object>
-                                                       <object class="IBToOneOutletInfo">
-                                                               <string key="name">configsController</string>
-                                                               <string key="candidateClassName">ConfigsController</string>
-                                                       </object>
-                                                       <object class="IBToOneOutletInfo">
-                                                               <string key="name">dockMenuBase</string>
-                                                               <string key="candidateClassName">NSMenu</string>
-                                                       </object>
-                                                       <object class="IBToOneOutletInfo">
-                                                               <string key="name">drawer</string>
-                                                               <string key="candidateClassName">NSDrawer</string>
-                                                       </object>
-                                                       <object class="IBToOneOutletInfo">
-                                                               <string key="name">jsController</string>
-                                                               <string key="candidateClassName">JoystickController</string>
-                                                       </object>
-                                                       <object class="IBToOneOutletInfo">
-                                                               <string key="name">mainWindow</string>
-                                                               <string key="candidateClassName">NSWindow</string>
-                                                       </object>
-                                                       <object class="IBToOneOutletInfo">
-                                                               <string key="name">targetController</string>
-                                                               <string key="candidateClassName">TargetController</string>
-                                                       </object>
-                                               </object>
-                                       </object>
-                                       <object class="IBClassDescriptionSource" key="sourceIdentifier">
-                                               <string key="majorKey">IBProjectSource</string>
-                                               <string key="minorKey">./Classes/ApplicationController.h</string>
-                                       </object>
-                               </object>
-                               <object class="IBPartialClassDescription">
-                                       <string key="className">ConfigsController</string>
-                                       <string key="superclassName">NSObject</string>
-                                       <object class="NSMutableDictionary" key="actions">
-                                               <bool key="EncodedWithXMLCoder">YES</bool>
-                                               <object class="NSArray" key="dict.sortedKeys">
-                                                       <bool key="EncodedWithXMLCoder">YES</bool>
-                                                       <string>addPressed:</string>
-                                                       <string>removePressed:</string>
-                                               </object>
-                                               <object class="NSArray" key="dict.values">
-                                                       <bool key="EncodedWithXMLCoder">YES</bool>
-                                                       <string>id</string>
-                                                       <string>id</string>
-                                               </object>
-                                       </object>
-                                       <object class="NSMutableDictionary" key="actionInfosByName">
-                                               <bool key="EncodedWithXMLCoder">YES</bool>
-                                               <object class="NSArray" key="dict.sortedKeys">
-                                                       <bool key="EncodedWithXMLCoder">YES</bool>
-                                                       <string>addPressed:</string>
-                                                       <string>removePressed:</string>
-                                               </object>
-                                               <object class="NSArray" key="dict.values">
-                                                       <bool key="EncodedWithXMLCoder">YES</bool>
-                                                       <object class="IBActionInfo">
-                                                               <string key="name">addPressed:</string>
-                                                               <string key="candidateClassName">id</string>
-                                                       </object>
-                                                       <object class="IBActionInfo">
-                                                               <string key="name">removePressed:</string>
-                                                               <string key="candidateClassName">id</string>
-                                                       </object>
-                                               </object>
-                                       </object>
-                                       <object class="NSMutableDictionary" key="outlets">
-                                               <bool key="EncodedWithXMLCoder">YES</bool>
-                                               <object class="NSArray" key="dict.sortedKeys">
-                                                       <bool key="EncodedWithXMLCoder">YES</bool>
-                                                       <string>removeButton</string>
-                                                       <string>tableView</string>
-                                                       <string>targetController</string>
-                                               </object>
-                                               <object class="NSArray" key="dict.values">
-                                                       <bool key="EncodedWithXMLCoder">YES</bool>
-                                                       <string>NSButton</string>
-                                                       <string>NSTableView</string>
-                                                       <string>TargetController</string>
-                                               </object>
-                                       </object>
-                                       <object class="NSMutableDictionary" key="toOneOutletInfosByName">
-                                               <bool key="EncodedWithXMLCoder">YES</bool>
-                                               <object class="NSArray" key="dict.sortedKeys">
-                                                       <bool key="EncodedWithXMLCoder">YES</bool>
-                                                       <string>removeButton</string>
-                                                       <string>tableView</string>
-                                                       <string>targetController</string>
-                                               </object>
-                                               <object class="NSArray" key="dict.values">
-                                                       <bool key="EncodedWithXMLCoder">YES</bool>
-                                                       <object class="IBToOneOutletInfo">
-                                                               <string key="name">removeButton</string>
-                                                               <string key="candidateClassName">NSButton</string>
-                                                       </object>
-                                                       <object class="IBToOneOutletInfo">
-                                                               <string key="name">tableView</string>
-                                                               <string key="candidateClassName">NSTableView</string>
-                                                       </object>
-                                                       <object class="IBToOneOutletInfo">
-                                                               <string key="name">targetController</string>
-                                                               <string key="candidateClassName">TargetController</string>
-                                                       </object>
-                                               </object>
-                                       </object>
-                                       <object class="IBClassDescriptionSource" key="sourceIdentifier">
-                                               <string key="majorKey">IBProjectSource</string>
-                                               <string key="minorKey">./Classes/ConfigsController.h</string>
-                                       </object>
-                               </object>
-                               <object class="IBPartialClassDescription">
-                                       <string key="className">JoystickController</string>
-                                       <string key="superclassName">NSObject</string>
-                                       <object class="NSMutableDictionary" key="outlets">
-                                               <bool key="EncodedWithXMLCoder">YES</bool>
-                                               <object class="NSArray" key="dict.sortedKeys">
-                                                       <bool key="EncodedWithXMLCoder">YES</bool>
-                                                       <string>configsController</string>
-                                                       <string>outlineView</string>
-                                                       <string>targetController</string>
-                                               </object>
-                                               <object class="NSArray" key="dict.values">
-                                                       <bool key="EncodedWithXMLCoder">YES</bool>
-                                                       <string>ConfigsController</string>
-                                                       <string>NSOutlineView</string>
-                                                       <string>TargetController</string>
-                                               </object>
-                                       </object>
-                                       <object class="NSMutableDictionary" key="toOneOutletInfosByName">
-                                               <bool key="EncodedWithXMLCoder">YES</bool>
-                                               <object class="NSArray" key="dict.sortedKeys">
-                                                       <bool key="EncodedWithXMLCoder">YES</bool>
-                                                       <string>configsController</string>
-                                                       <string>outlineView</string>
-                                                       <string>targetController</string>
-                                               </object>
-                                               <object class="NSArray" key="dict.values">
-                                                       <bool key="EncodedWithXMLCoder">YES</bool>
-                                                       <object class="IBToOneOutletInfo">
-                                                               <string key="name">configsController</string>
-                                                               <string key="candidateClassName">ConfigsController</string>
-                                                       </object>
-                                                       <object class="IBToOneOutletInfo">
-                                                               <string key="name">outlineView</string>
-                                                               <string key="candidateClassName">NSOutlineView</string>
-                                                       </object>
-                                                       <object class="IBToOneOutletInfo">
-                                                               <string key="name">targetController</string>
-                                                               <string key="candidateClassName">TargetController</string>
-                                                       </object>
-                                               </object>
-                                       </object>
-                                       <object class="IBClassDescriptionSource" key="sourceIdentifier">
-                                               <string key="majorKey">IBProjectSource</string>
-                                               <string key="minorKey">./Classes/JoystickController.h</string>
-                                       </object>
-                               </object>
-                               <object class="IBPartialClassDescription">
-                                       <string key="className">KeyInputTextView</string>
-                                       <string key="superclassName">NSTextView</string>
-                                       <object class="NSMutableDictionary" key="outlets">
-                                               <bool key="EncodedWithXMLCoder">YES</bool>
-                                               <object class="NSArray" key="dict.sortedKeys">
-                                                       <bool key="EncodedWithXMLCoder">YES</bool>
-                                                       <string>targetController</string>
-                                                       <string>window</string>
-                                               </object>
-                                               <object class="NSArray" key="dict.values">
-                                                       <bool key="EncodedWithXMLCoder">YES</bool>
-                                                       <string>TargetController</string>
-                                                       <string>NSWindow</string>
-                                               </object>
-                                       </object>
-                                       <object class="NSMutableDictionary" key="toOneOutletInfosByName">
-                                               <bool key="EncodedWithXMLCoder">YES</bool>
-                                               <object class="NSArray" key="dict.sortedKeys">
-                                                       <bool key="EncodedWithXMLCoder">YES</bool>
-                                                       <string>targetController</string>
-                                                       <string>window</string>
-                                               </object>
-                                               <object class="NSArray" key="dict.values">
-                                                       <bool key="EncodedWithXMLCoder">YES</bool>
-                                                       <object class="IBToOneOutletInfo">
-                                                               <string key="name">targetController</string>
-                                                               <string key="candidateClassName">TargetController</string>
-                                                       </object>
-                                                       <object class="IBToOneOutletInfo">
-                                                               <string key="name">window</string>
-                                                               <string key="candidateClassName">NSWindow</string>
-                                                       </object>
-                                               </object>
-                                       </object>
-                                       <object class="IBClassDescriptionSource" key="sourceIdentifier">
-                                               <string key="majorKey">IBProjectSource</string>
-                                               <string key="minorKey">./Classes/KeyInputTextView.h</string>
-                                       </object>
-                               </object>
-                               <object class="IBPartialClassDescription">
-                                       <string key="className">TargetController</string>
-                                       <string key="superclassName">NSObject</string>
-                                       <object class="NSMutableDictionary" key="actions">
-                                               <bool key="EncodedWithXMLCoder">YES</bool>
-                                               <object class="NSArray" key="dict.sortedKeys">
-                                                       <bool key="EncodedWithXMLCoder">YES</bool>
-                                                       <string>configChosen:</string>
-                                                       <string>radioChanged:</string>
-                                               </object>
-                                               <object class="NSArray" key="dict.values">
-                                                       <bool key="EncodedWithXMLCoder">YES</bool>
-                                                       <string>id</string>
-                                                       <string>id</string>
-                                               </object>
-                                       </object>
-                                       <object class="NSMutableDictionary" key="actionInfosByName">
-                                               <bool key="EncodedWithXMLCoder">YES</bool>
-                                               <object class="NSArray" key="dict.sortedKeys">
-                                                       <bool key="EncodedWithXMLCoder">YES</bool>
-                                                       <string>configChosen:</string>
-                                                       <string>radioChanged:</string>
-                                               </object>
-                                               <object class="NSArray" key="dict.values">
-                                                       <bool key="EncodedWithXMLCoder">YES</bool>
-                                                       <object class="IBActionInfo">
-                                                               <string key="name">configChosen:</string>
-                                                               <string key="candidateClassName">id</string>
-                                                       </object>
-                                                       <object class="IBActionInfo">
-                                                               <string key="name">radioChanged:</string>
-                                                               <string key="candidateClassName">id</string>
-                                                       </object>
-                                               </object>
-                                       </object>
-                                       <object class="NSMutableDictionary" key="outlets">
-                                               <bool key="EncodedWithXMLCoder">YES</bool>
-                                               <object class="NSArray" key="dict.sortedKeys">
-                                                       <bool key="EncodedWithXMLCoder">YES</bool>
-                                                       <string>configPopup</string>
-                                                       <string>configsController</string>
-                                                       <string>joystickController</string>
-                                                       <string>keyInput</string>
-                                                       <string>mouseBtnRadio</string>
-                                                       <string>radioButtons</string>
-                                                       <string>radioConfig</string>
-                                                       <string>radioKey</string>
-                                                       <string>radioNoAction</string>
-                                                       <string>title</string>
-                                               </object>
-                                               <object class="NSArray" key="dict.values">
-                                                       <bool key="EncodedWithXMLCoder">YES</bool>
-                                                       <string>NSPopUpButton</string>
-                                                       <string>ConfigsController</string>
-                                                       <string>JoystickController</string>
-                                                       <string>KeyInputTextView</string>
-                                                       <string>NSMatrix</string>
-                                                       <string>NSMatrix</string>
-                                                       <string>NSButtonCell</string>
-                                                       <string>NSButtonCell</string>
-                                                       <string>NSButtonCell</string>
-                                                       <string>NSTextField</string>
-                                               </object>
-                                       </object>
-                                       <object class="NSMutableDictionary" key="toOneOutletInfosByName">
-                                               <bool key="EncodedWithXMLCoder">YES</bool>
-                                               <object class="NSArray" key="dict.sortedKeys">
-                                                       <bool key="EncodedWithXMLCoder">YES</bool>
-                                                       <string>configPopup</string>
-                                                       <string>configsController</string>
-                                                       <string>joystickController</string>
-                                                       <string>keyInput</string>
-                                                       <string>mouseBtnRadio</string>
-                                                       <string>radioButtons</string>
-                                                       <string>radioConfig</string>
-                                                       <string>radioKey</string>
-                                                       <string>radioNoAction</string>
-                                                       <string>title</string>
-                                               </object>
-                                               <object class="NSArray" key="dict.values">
-                                                       <bool key="EncodedWithXMLCoder">YES</bool>
-                                                       <object class="IBToOneOutletInfo">
-                                                               <string key="name">configPopup</string>
-                                                               <string key="candidateClassName">NSPopUpButton</string>
-                                                       </object>
-                                                       <object class="IBToOneOutletInfo">
-                                                               <string key="name">configsController</string>
-                                                               <string key="candidateClassName">ConfigsController</string>
-                                                       </object>
-                                                       <object class="IBToOneOutletInfo">
-                                                               <string key="name">joystickController</string>
-                                                               <string key="candidateClassName">JoystickController</string>
-                                                       </object>
-                                                       <object class="IBToOneOutletInfo">
-                                                               <string key="name">keyInput</string>
-                                                               <string key="candidateClassName">KeyInputTextView</string>
-                                                       </object>
-                                                       <object class="IBToOneOutletInfo">
-                                                               <string key="name">mouseBtnRadio</string>
-                                                               <string key="candidateClassName">NSMatrix</string>
-                                                       </object>
-                                                       <object class="IBToOneOutletInfo">
-                                                               <string key="name">radioButtons</string>
-                                                               <string key="candidateClassName">NSMatrix</string>
-                                                       </object>
-                                                       <object class="IBToOneOutletInfo">
-                                                               <string key="name">radioConfig</string>
-                                                               <string key="candidateClassName">NSButtonCell</string>
-                                                       </object>
-                                                       <object class="IBToOneOutletInfo">
-                                                               <string key="name">radioKey</string>
-                                                               <string key="candidateClassName">NSButtonCell</string>
-                                                       </object>
-                                                       <object class="IBToOneOutletInfo">
-                                                               <string key="name">radioNoAction</string>
-                                                               <string key="candidateClassName">NSButtonCell</string>
-                                                       </object>
-                                                       <object class="IBToOneOutletInfo">
-                                                               <string key="name">title</string>
-                                                               <string key="candidateClassName">NSTextField</string>
-                                                       </object>
-                                               </object>
-                                       </object>
-                                       <object class="IBClassDescriptionSource" key="sourceIdentifier">
-                                               <string key="majorKey">IBProjectSource</string>
-                                               <string key="minorKey">./Classes/TargetController.h</string>
-                                       </object>
-                               </object>
-                       </object>
+                       <int key="maxID">747</int>
                </object>
+               <object class="IBClassDescriber" key="IBDocument.Classes"/>
                <int key="IBDocument.localizationMode">0</int>
                <string key="IBDocument.TargetRuntimeIdentifier">IBCocoaFramework</string>
                <object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDependencies">
@@ -4001,7 +3572,6 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
                                <string>NSMenuMixedState</string>
                                <string>NSMultipleDocuments</string>
                                <string>NSRemoveTemplate</string>
-                               <string>NSSwitch</string>
                        </object>
                        <object class="NSArray" key="dict.values">
                                <bool key="EncodedWithXMLCoder">YES</bool>
@@ -4011,7 +3581,6 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
                                <string>{10, 3}</string>
                                <string>{32, 32}</string>
                                <string>{8, 8}</string>
-                               <string>{15, 15}</string>
                        </object>
                </object>
        </data>
diff --git a/Enjoy.xcodeproj/TemplateIcon.icns b/Enjoy.xcodeproj/TemplateIcon.icns
new file mode 100644 (file)
index 0000000..62cb701
Binary files /dev/null and b/Enjoy.xcodeproj/TemplateIcon.icns differ
diff --git a/Enjoy.xcodeproj/project.pbxproj b/Enjoy.xcodeproj/project.pbxproj
new file mode 100644 (file)
index 0000000..c615a5a
--- /dev/null
@@ -0,0 +1,409 @@
+// !$*UTF8*$!
+{
+       archiveVersion = 1;
+       classes = {
+       };
+       objectVersion = 45;
+       objects = {
+
+/* Begin PBXBuildFile section */
+               1DDD58160DA1D0A300B32029 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 1DDD58140DA1D0A300B32029 /* MainMenu.xib */; };
+               8B7E476C15C314A200C588FA /* TargetMouseBtn.m in Sources */ = {isa = PBXBuildFile; fileRef = 8B7E476B15C314A200C588FA /* TargetMouseBtn.m */; };
+               8BD9B54315C230FF00929C5D /* TargetMouseMove.m in Sources */ = {isa = PBXBuildFile; fileRef = 8BD9B54215C230FE00929C5D /* TargetMouseMove.m */; };
+               8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */; };
+               8D11072D0486CEB800E47090 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; settings = {ATTRIBUTES = (); }; };
+               8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */; };
+               D549CA4C0FBB441B00BC8203 /* Credits.rtf in Resources */ = {isa = PBXBuildFile; fileRef = D549CA4B0FBB441B00BC8203 /* Credits.rtf */; };
+               D5617A360FAEB74000928B3A /* ConfigsController.m in Sources */ = {isa = PBXBuildFile; fileRef = D5617A350FAEB74000928B3A /* ConfigsController.m */; };
+               D5617A390FAEBA1800928B3A /* Config.m in Sources */ = {isa = PBXBuildFile; fileRef = D5617A380FAEBA1800928B3A /* Config.m */; };
+               D5617D1A0FAF568100928B3A /* JSActionButton.m in Sources */ = {isa = PBXBuildFile; fileRef = D5617D190FAF568100928B3A /* JSActionButton.m */; };
+               D5617D260FAF579300928B3A /* JSActionHat.m in Sources */ = {isa = PBXBuildFile; fileRef = D5617D250FAF579300928B3A /* JSActionHat.m */; };
+               D5617D2B0FAF579A00928B3A /* JSActionAnalog.m in Sources */ = {isa = PBXBuildFile; fileRef = D5617D2A0FAF579A00928B3A /* JSActionAnalog.m */; };
+               D5617DF20FAF636C00928B3A /* SubAction.m in Sources */ = {isa = PBXBuildFile; fileRef = D5617DF10FAF636C00928B3A /* SubAction.m */; };
+               D5617FD60FAFD06000928B3A /* Target.m in Sources */ = {isa = PBXBuildFile; fileRef = D5617FD50FAFD06000928B3A /* Target.m */; };
+               D5617FD90FAFD1E600928B3A /* TargetKeyboard.m in Sources */ = {isa = PBXBuildFile; fileRef = D5617FD80FAFD1E600928B3A /* TargetKeyboard.m */; };
+               D5617FE40FAFD7B000928B3A /* TargetController.m in Sources */ = {isa = PBXBuildFile; fileRef = D5617FE30FAFD7B000928B3A /* TargetController.m */; };
+               D5617FE70FAFDB5800928B3A /* KeyInputTextView.m in Sources */ = {isa = PBXBuildFile; fileRef = D5617FE60FAFDB5800928B3A /* KeyInputTextView.m */; };
+               D561800A0FAFE8E400928B3A /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D56180090FAFE8E400928B3A /* Carbon.framework */; };
+               D594BE860FAE6219007A85F2 /* Joystick.m in Sources */ = {isa = PBXBuildFile; fileRef = D594BE850FAE6219007A85F2 /* Joystick.m */; };
+               D594BE8A0FAE64AD007A85F2 /* JSAction.m in Sources */ = {isa = PBXBuildFile; fileRef = D594BE890FAE64AD007A85F2 /* JSAction.m */; };
+               D594BEF90FAE6FF2007A85F2 /* JoystickController.m in Sources */ = {isa = PBXBuildFile; fileRef = D594BEF80FAE6FF2007A85F2 /* JoystickController.m */; };
+               D594BF000FAE7397007A85F2 /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D594BEFF0FAE7397007A85F2 /* IOKit.framework */; };
+               D594BF830FAE9661007A85F2 /* ApplicationController.m in Sources */ = {isa = PBXBuildFile; fileRef = D594BF820FAE9661007A85F2 /* ApplicationController.m */; };
+               D5F809710FB093400006A4DE /* TargetConfig.m in Sources */ = {isa = PBXBuildFile; fileRef = D5F809700FB093400006A4DE /* TargetConfig.m */; };
+               D5F80A9D0FB0A2FF0006A4DE /* icon.icns in Resources */ = {isa = PBXBuildFile; fileRef = D5617A080FAEAF8300928B3A /* icon.icns */; };
+/* End PBXBuildFile section */
+
+/* Begin PBXFileReference section */
+               089C165DFE840E0CC02AAC07 /* English */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = "<group>"; };
+               1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = "<absolute>"; };
+               13E42FB307B3F0F600E4EEF1 /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = /System/Library/Frameworks/CoreData.framework; sourceTree = "<absolute>"; };
+               1DDD58150DA1D0A300B32029 /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = English.lproj/MainMenu.xib; sourceTree = "<group>"; };
+               29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
+               29B97324FDCFA39411CA2CEA /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = "<absolute>"; };
+               29B97325FDCFA39411CA2CEA /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = "<absolute>"; };
+               32CA4F630368D1EE00C91783 /* Enjoy_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Enjoy_Prefix.pch; sourceTree = "<group>"; };
+               8B7E476A15C314A200C588FA /* TargetMouseBtn.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TargetMouseBtn.h; sourceTree = "<group>"; };
+               8B7E476B15C314A200C588FA /* TargetMouseBtn.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TargetMouseBtn.m; sourceTree = "<group>"; };
+               8BD9B54115C230FE00929C5D /* TargetMouseMove.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TargetMouseMove.h; sourceTree = "<group>"; };
+               8BD9B54215C230FE00929C5D /* TargetMouseMove.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TargetMouseMove.m; sourceTree = "<group>"; };
+               8D1107310486CEB800E47090 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
+               8D1107320486CEB800E47090 /* Enjoy.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Enjoy.app; sourceTree = BUILT_PRODUCTS_DIR; };
+               D549CA4B0FBB441B00BC8203 /* Credits.rtf */ = {isa = PBXFileReference; lastKnownFileType = text.rtf; path = Credits.rtf; sourceTree = "<group>"; };
+               D5617A080FAEAF8300928B3A /* icon.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; path = icon.icns; sourceTree = "<group>"; };
+               D5617A340FAEB74000928B3A /* ConfigsController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ConfigsController.h; sourceTree = "<group>"; };
+               D5617A350FAEB74000928B3A /* ConfigsController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ConfigsController.m; sourceTree = "<group>"; };
+               D5617A370FAEBA1800928B3A /* Config.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Config.h; sourceTree = "<group>"; };
+               D5617A380FAEBA1800928B3A /* Config.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Config.m; sourceTree = "<group>"; };
+               D5617D180FAF568100928B3A /* JSActionButton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSActionButton.h; sourceTree = "<group>"; };
+               D5617D190FAF568100928B3A /* JSActionButton.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JSActionButton.m; sourceTree = "<group>"; };
+               D5617D240FAF579300928B3A /* JSActionHat.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSActionHat.h; sourceTree = "<group>"; };
+               D5617D250FAF579300928B3A /* JSActionHat.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JSActionHat.m; sourceTree = "<group>"; };
+               D5617D290FAF579A00928B3A /* JSActionAnalog.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSActionAnalog.h; sourceTree = "<group>"; };
+               D5617D2A0FAF579A00928B3A /* JSActionAnalog.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JSActionAnalog.m; sourceTree = "<group>"; };
+               D5617DF00FAF636C00928B3A /* SubAction.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SubAction.h; sourceTree = "<group>"; };
+               D5617DF10FAF636C00928B3A /* SubAction.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SubAction.m; sourceTree = "<group>"; };
+               D5617FD40FAFD06000928B3A /* Target.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Target.h; sourceTree = "<group>"; };
+               D5617FD50FAFD06000928B3A /* Target.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Target.m; sourceTree = "<group>"; };
+               D5617FD70FAFD1E600928B3A /* TargetKeyboard.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TargetKeyboard.h; sourceTree = "<group>"; };
+               D5617FD80FAFD1E600928B3A /* TargetKeyboard.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TargetKeyboard.m; sourceTree = "<group>"; };
+               D5617FE20FAFD7B000928B3A /* TargetController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TargetController.h; sourceTree = "<group>"; };
+               D5617FE30FAFD7B000928B3A /* TargetController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TargetController.m; sourceTree = "<group>"; };
+               D5617FE50FAFDB5800928B3A /* KeyInputTextView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KeyInputTextView.h; sourceTree = "<group>"; };
+               D5617FE60FAFDB5800928B3A /* KeyInputTextView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = KeyInputTextView.m; sourceTree = "<group>"; };
+               D56180090FAFE8E400928B3A /* Carbon.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Carbon.framework; path = /System/Library/Frameworks/Carbon.framework; sourceTree = "<absolute>"; };
+               D594BE840FAE6219007A85F2 /* Joystick.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Joystick.h; sourceTree = "<group>"; };
+               D594BE850FAE6219007A85F2 /* Joystick.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Joystick.m; sourceTree = "<group>"; };
+               D594BE880FAE64AD007A85F2 /* JSAction.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSAction.h; sourceTree = "<group>"; };
+               D594BE890FAE64AD007A85F2 /* JSAction.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JSAction.m; sourceTree = "<group>"; };
+               D594BEF70FAE6FF2007A85F2 /* JoystickController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JoystickController.h; sourceTree = "<group>"; };
+               D594BEF80FAE6FF2007A85F2 /* JoystickController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JoystickController.m; sourceTree = "<group>"; };
+               D594BEFF0FAE7397007A85F2 /* IOKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = IOKit.framework; path = /System/Library/Frameworks/IOKit.framework; sourceTree = "<absolute>"; };
+               D594BF810FAE9661007A85F2 /* ApplicationController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ApplicationController.h; sourceTree = "<group>"; };
+               D594BF820FAE9661007A85F2 /* ApplicationController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ApplicationController.m; sourceTree = "<group>"; };
+               D5F8096F0FB093400006A4DE /* TargetConfig.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TargetConfig.h; sourceTree = "<group>"; };
+               D5F809700FB093400006A4DE /* TargetConfig.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TargetConfig.m; sourceTree = "<group>"; };
+/* End PBXFileReference section */
+
+/* Begin PBXFrameworksBuildPhase section */
+               8D11072E0486CEB800E47090 /* Frameworks */ = {
+                       isa = PBXFrameworksBuildPhase;
+                       buildActionMask = 2147483647;
+                       files = (
+                               8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */,
+                               D594BF000FAE7397007A85F2 /* IOKit.framework in Frameworks */,
+                               D561800A0FAFE8E400928B3A /* Carbon.framework in Frameworks */,
+                       );
+                       runOnlyForDeploymentPostprocessing = 0;
+               };
+/* End PBXFrameworksBuildPhase section */
+
+/* Begin PBXGroup section */
+               080E96DDFE201D6D7F000001 /* Classes */ = {
+                       isa = PBXGroup;
+                       children = (
+                               D5617D290FAF579A00928B3A /* JSActionAnalog.h */,
+                               D5617D2A0FAF579A00928B3A /* JSActionAnalog.m */,
+                               D594BE840FAE6219007A85F2 /* Joystick.h */,
+                               D594BE850FAE6219007A85F2 /* Joystick.m */,
+                               D594BE880FAE64AD007A85F2 /* JSAction.h */,
+                               D594BE890FAE64AD007A85F2 /* JSAction.m */,
+                               D5617D240FAF579300928B3A /* JSActionHat.h */,
+                               D5617D250FAF579300928B3A /* JSActionHat.m */,
+                               D5617D180FAF568100928B3A /* JSActionButton.h */,
+                               D5617D190FAF568100928B3A /* JSActionButton.m */,
+                               D594BEF70FAE6FF2007A85F2 /* JoystickController.h */,
+                               D594BEF80FAE6FF2007A85F2 /* JoystickController.m */,
+                               D594BF810FAE9661007A85F2 /* ApplicationController.h */,
+                               D594BF820FAE9661007A85F2 /* ApplicationController.m */,
+                               D5617A340FAEB74000928B3A /* ConfigsController.h */,
+                               D5617A350FAEB74000928B3A /* ConfigsController.m */,
+                               D5617A370FAEBA1800928B3A /* Config.h */,
+                               D5617A380FAEBA1800928B3A /* Config.m */,
+                               D5617DF00FAF636C00928B3A /* SubAction.h */,
+                               D5617DF10FAF636C00928B3A /* SubAction.m */,
+                               D5F8096F0FB093400006A4DE /* TargetConfig.h */,
+                               D5F809700FB093400006A4DE /* TargetConfig.m */,
+                               D5617FD40FAFD06000928B3A /* Target.h */,
+                               D5617FD50FAFD06000928B3A /* Target.m */,
+                               D5617FD70FAFD1E600928B3A /* TargetKeyboard.h */,
+                               D5617FD80FAFD1E600928B3A /* TargetKeyboard.m */,
+                               D5617FE20FAFD7B000928B3A /* TargetController.h */,
+                               D5617FE30FAFD7B000928B3A /* TargetController.m */,
+                               D5617FE50FAFDB5800928B3A /* KeyInputTextView.h */,
+                               D5617FE60FAFDB5800928B3A /* KeyInputTextView.m */,
+                               8BD9B54115C230FE00929C5D /* TargetMouseMove.h */,
+                               8BD9B54215C230FE00929C5D /* TargetMouseMove.m */,
+                               8B7E476A15C314A200C588FA /* TargetMouseBtn.h */,
+                               8B7E476B15C314A200C588FA /* TargetMouseBtn.m */,
+                       );
+                       name = Classes;
+                       sourceTree = "<group>";
+               };
+               1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */ = {
+                       isa = PBXGroup;
+                       children = (
+                               D594BEFF0FAE7397007A85F2 /* IOKit.framework */,
+                               1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */,
+                       );
+                       name = "Linked Frameworks";
+                       sourceTree = "<group>";
+               };
+               1058C7A2FEA54F0111CA2CBB /* Other Frameworks */ = {
+                       isa = PBXGroup;
+                       children = (
+                               D56180090FAFE8E400928B3A /* Carbon.framework */,
+                               29B97324FDCFA39411CA2CEA /* AppKit.framework */,
+                               13E42FB307B3F0F600E4EEF1 /* CoreData.framework */,
+                               29B97325FDCFA39411CA2CEA /* Foundation.framework */,
+                       );
+                       name = "Other Frameworks";
+                       sourceTree = "<group>";
+               };
+               19C28FACFE9D520D11CA2CBB /* Products */ = {
+                       isa = PBXGroup;
+                       children = (
+                               8D1107320486CEB800E47090 /* Enjoy.app */,
+                       );
+                       name = Products;
+                       sourceTree = "<group>";
+               };
+               29B97314FDCFA39411CA2CEA /* Enjoy */ = {
+                       isa = PBXGroup;
+                       children = (
+                               080E96DDFE201D6D7F000001 /* Classes */,
+                               29B97315FDCFA39411CA2CEA /* Other Sources */,
+                               29B97317FDCFA39411CA2CEA /* Resources */,
+                               29B97323FDCFA39411CA2CEA /* Frameworks */,
+                               19C28FACFE9D520D11CA2CBB /* Products */,
+                       );
+                       name = Enjoy;
+                       sourceTree = "<group>";
+               };
+               29B97315FDCFA39411CA2CEA /* Other Sources */ = {
+                       isa = PBXGroup;
+                       children = (
+                               32CA4F630368D1EE00C91783 /* Enjoy_Prefix.pch */,
+                               29B97316FDCFA39411CA2CEA /* main.m */,
+                       );
+                       name = "Other Sources";
+                       sourceTree = "<group>";
+               };
+               29B97317FDCFA39411CA2CEA /* Resources */ = {
+                       isa = PBXGroup;
+                       children = (
+                               D549CA4B0FBB441B00BC8203 /* Credits.rtf */,
+                               D5617A080FAEAF8300928B3A /* icon.icns */,
+                               8D1107310486CEB800E47090 /* Info.plist */,
+                               089C165CFE840E0CC02AAC07 /* InfoPlist.strings */,
+                               1DDD58140DA1D0A300B32029 /* MainMenu.xib */,
+                       );
+                       name = Resources;
+                       sourceTree = "<group>";
+               };
+               29B97323FDCFA39411CA2CEA /* Frameworks */ = {
+                       isa = PBXGroup;
+                       children = (
+                               1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */,
+                               1058C7A2FEA54F0111CA2CBB /* Other Frameworks */,
+                       );
+                       name = Frameworks;
+                       sourceTree = "<group>";
+               };
+/* End PBXGroup section */
+
+/* Begin PBXNativeTarget section */
+               8D1107260486CEB800E47090 /* Enjoy */ = {
+                       isa = PBXNativeTarget;
+                       buildConfigurationList = C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "Enjoy" */;
+                       buildPhases = (
+                               8D1107290486CEB800E47090 /* Resources */,
+                               8D11072C0486CEB800E47090 /* Sources */,
+                               8D11072E0486CEB800E47090 /* Frameworks */,
+                       );
+                       buildRules = (
+                       );
+                       dependencies = (
+                       );
+                       name = Enjoy;
+                       productInstallPath = "$(HOME)/Applications";
+                       productName = Enjoy;
+                       productReference = 8D1107320486CEB800E47090 /* Enjoy.app */;
+                       productType = "com.apple.product-type.application";
+               };
+/* End PBXNativeTarget section */
+
+/* Begin PBXProject section */
+               29B97313FDCFA39411CA2CEA /* Project object */ = {
+                       isa = PBXProject;
+                       buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "Enjoy" */;
+                       compatibilityVersion = "Xcode 3.1";
+                       developmentRegion = English;
+                       hasScannedForEncodings = 1;
+                       knownRegions = (
+                               English,
+                               Japanese,
+                               French,
+                               German,
+                       );
+                       mainGroup = 29B97314FDCFA39411CA2CEA /* Enjoy */;
+                       projectDirPath = "";
+                       projectRoot = "";
+                       targets = (
+                               8D1107260486CEB800E47090 /* Enjoy */,
+                       );
+               };
+/* End PBXProject section */
+
+/* Begin PBXResourcesBuildPhase section */
+               8D1107290486CEB800E47090 /* Resources */ = {
+                       isa = PBXResourcesBuildPhase;
+                       buildActionMask = 2147483647;
+                       files = (
+                               8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */,
+                               1DDD58160DA1D0A300B32029 /* MainMenu.xib in Resources */,
+                               D5F80A9D0FB0A2FF0006A4DE /* icon.icns in Resources */,
+                               D549CA4C0FBB441B00BC8203 /* Credits.rtf in Resources */,
+                       );
+                       runOnlyForDeploymentPostprocessing = 0;
+               };
+/* End PBXResourcesBuildPhase section */
+
+/* Begin PBXSourcesBuildPhase section */
+               8D11072C0486CEB800E47090 /* Sources */ = {
+                       isa = PBXSourcesBuildPhase;
+                       buildActionMask = 2147483647;
+                       files = (
+                               8D11072D0486CEB800E47090 /* main.m in Sources */,
+                               D594BE860FAE6219007A85F2 /* Joystick.m in Sources */,
+                               D594BE8A0FAE64AD007A85F2 /* JSAction.m in Sources */,
+                               D594BEF90FAE6FF2007A85F2 /* JoystickController.m in Sources */,
+                               D594BF830FAE9661007A85F2 /* ApplicationController.m in Sources */,
+                               D5617A360FAEB74000928B3A /* ConfigsController.m in Sources */,
+                               D5617A390FAEBA1800928B3A /* Config.m in Sources */,
+                               D5617D1A0FAF568100928B3A /* JSActionButton.m in Sources */,
+                               D5617D260FAF579300928B3A /* JSActionHat.m in Sources */,
+                               D5617D2B0FAF579A00928B3A /* JSActionAnalog.m in Sources */,
+                               D5617DF20FAF636C00928B3A /* SubAction.m in Sources */,
+                               D5617FD60FAFD06000928B3A /* Target.m in Sources */,
+                               D5617FD90FAFD1E600928B3A /* TargetKeyboard.m in Sources */,
+                               D5617FE40FAFD7B000928B3A /* TargetController.m in Sources */,
+                               D5617FE70FAFDB5800928B3A /* KeyInputTextView.m in Sources */,
+                               D5F809710FB093400006A4DE /* TargetConfig.m in Sources */,
+                               8BD9B54315C230FF00929C5D /* TargetMouseMove.m in Sources */,
+                               8B7E476C15C314A200C588FA /* TargetMouseBtn.m in Sources */,
+                       );
+                       runOnlyForDeploymentPostprocessing = 0;
+               };
+/* End PBXSourcesBuildPhase section */
+
+/* Begin PBXVariantGroup section */
+               089C165CFE840E0CC02AAC07 /* InfoPlist.strings */ = {
+                       isa = PBXVariantGroup;
+                       children = (
+                               089C165DFE840E0CC02AAC07 /* English */,
+                       );
+                       name = InfoPlist.strings;
+                       sourceTree = "<group>";
+               };
+               1DDD58140DA1D0A300B32029 /* MainMenu.xib */ = {
+                       isa = PBXVariantGroup;
+                       children = (
+                               1DDD58150DA1D0A300B32029 /* English */,
+                       );
+                       name = MainMenu.xib;
+                       sourceTree = "<group>";
+               };
+/* End PBXVariantGroup section */
+
+/* Begin XCBuildConfiguration section */
+               C01FCF4B08A954540054247B /* Debug */ = {
+                       isa = XCBuildConfiguration;
+                       buildSettings = {
+                               ALWAYS_SEARCH_USER_PATHS = NO;
+                               COPY_PHASE_STRIP = NO;
+                               FRAMEWORK_SEARCH_PATHS = (
+                                       "$(inherited)",
+                                       "\"$(SYSTEM_LIBRARY_DIR)/Frameworks/Carbon.framework/Frameworks\"",
+                               );
+                               GCC_DYNAMIC_NO_PIC = NO;
+                               GCC_ENABLE_FIX_AND_CONTINUE = YES;
+                               GCC_MODEL_TUNING = G5;
+                               GCC_OPTIMIZATION_LEVEL = 0;
+                               GCC_PRECOMPILE_PREFIX_HEADER = YES;
+                               GCC_PREFIX_HEADER = Enjoy_Prefix.pch;
+                               INFOPLIST_FILE = Info.plist;
+                               INSTALL_PATH = "$(HOME)/Applications";
+                               PRODUCT_NAME = Enjoy;
+                       };
+                       name = Debug;
+               };
+               C01FCF4C08A954540054247B /* Release */ = {
+                       isa = XCBuildConfiguration;
+                       buildSettings = {
+                               ALWAYS_SEARCH_USER_PATHS = NO;
+                               DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+                               FRAMEWORK_SEARCH_PATHS = (
+                                       "$(inherited)",
+                                       "\"$(SYSTEM_LIBRARY_DIR)/Frameworks/Carbon.framework/Frameworks\"",
+                               );
+                               GCC_MODEL_TUNING = G5;
+                               GCC_PRECOMPILE_PREFIX_HEADER = YES;
+                               GCC_PREFIX_HEADER = Enjoy_Prefix.pch;
+                               INFOPLIST_FILE = Info.plist;
+                               INSTALL_PATH = "$(HOME)/Applications";
+                               PRODUCT_NAME = Enjoy;
+                       };
+                       name = Release;
+               };
+               C01FCF4F08A954540054247B /* Debug */ = {
+                       isa = XCBuildConfiguration;
+                       buildSettings = {
+                               ARCHS = "$(ARCHS_STANDARD_32_BIT)";
+                               GCC_C_LANGUAGE_STANDARD = c99;
+                               GCC_OPTIMIZATION_LEVEL = 0;
+                               GCC_WARN_ABOUT_RETURN_TYPE = YES;
+                               GCC_WARN_UNUSED_VARIABLE = YES;
+                               ONLY_ACTIVE_ARCH = YES;
+                               PREBINDING = NO;
+                               SDKROOT = macosx;
+                       };
+                       name = Debug;
+               };
+               C01FCF5008A954540054247B /* Release */ = {
+                       isa = XCBuildConfiguration;
+                       buildSettings = {
+                               ARCHS = "$(ARCHS_STANDARD_32_BIT)";
+                               GCC_C_LANGUAGE_STANDARD = c99;
+                               GCC_WARN_ABOUT_RETURN_TYPE = YES;
+                               GCC_WARN_UNUSED_VARIABLE = YES;
+                               PREBINDING = NO;
+                               SDKROOT = macosx;
+                       };
+                       name = Release;
+               };
+/* End XCBuildConfiguration section */
+
+/* Begin XCConfigurationList section */
+               C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "Enjoy" */ = {
+                       isa = XCConfigurationList;
+                       buildConfigurations = (
+                               C01FCF4B08A954540054247B /* Debug */,
+                               C01FCF4C08A954540054247B /* Release */,
+                       );
+                       defaultConfigurationIsVisible = 0;
+                       defaultConfigurationName = Release;
+               };
+               C01FCF4E08A954540054247B /* Build configuration list for PBXProject "Enjoy" */ = {
+                       isa = XCConfigurationList;
+                       buildConfigurations = (
+                               C01FCF4F08A954540054247B /* Debug */,
+                               C01FCF5008A954540054247B /* Release */,
+                       );
+                       defaultConfigurationIsVisible = 0;
+                       defaultConfigurationName = Release;
+               };
+/* End XCConfigurationList section */
+       };
+       rootObject = 29B97313FDCFA39411CA2CEA /* Project object */;
+}
index f26421057db9507615f48e2fa600e84884844fd9..f68a6da5d001188ae646958727f4d24f8b24cc6b 100644 (file)
@@ -18,7 +18,7 @@
        IBOutlet KeyInputTextView* keyInput;
        IBOutlet NSButtonCell *radioNoAction, *radioKey, *radioConfig;
        IBOutlet NSMatrix* radioButtons;
-    IBOutlet NSMatrix* mouseBtnRadio;
+    IBOutlet NSSegmentedControl* mouseBtnSelect;
        IBOutlet NSTextField* title;
        IBOutlet NSPopUpButton* configPopup;
        IBOutlet ConfigsController* configsController;
@@ -34,6 +34,7 @@
 -(void) refreshConfigsPreservingSelection: (BOOL) preserve;
 -(IBAction)configChosen:(id)sender;
 -(IBAction)radioChanged:(id)sender;
+-(IBAction)mbtnChanged:(id)sender;
 -(void) focusKey;
 
 @property(readwrite) BOOL enabled;
index 70dc1e804de13c35800501cb2862faafc0495a05..9b075a15945ca851b8f5aa679d42952738cbd7ac 100644 (file)
        [[[NSApplication sharedApplication] mainWindow] makeFirstResponder: sender];
        [self commit];
 }
+-(IBAction)mbtnChanged:(id)sender {
+    [radioButtons setState: 1 atRow: 5 column: 0];
+       [[[NSApplication sharedApplication] mainWindow] makeFirstResponder: sender];
+       [self commit];
+}
 
 
 -(Target*) state {
         case 5: {
             // mouse button
             TargetMouseBtn *mb = [[TargetMouseBtn alloc] init];
-            [mb setWhich: [mouseBtnRadio selectedCol]];
+            if ([mouseBtnSelect selectedSegment] == 0) {
+                [mb setWhich: kCGMouseButtonLeft];
+            }
+            else {
+                [mb setWhich: kCGMouseButtonRight];
+            }
             return mb;
         }
        }
@@ -73,6 +83,7 @@
 -(void) reset {
        [keyInput clear];
        [radioButtons setState: 1 atRow: 0 column: 0];
+    [mouseBtnSelect setSelectedSegment: 0];
        [self refreshConfigsPreservingSelection: NO];
 }
 
@@ -80,6 +91,7 @@
        [radioButtons setEnabled: enabled];
        [keyInput setEnabled: enabled];
        [configPopup setEnabled: enabled];
+    [mouseBtnSelect setEnabled: enabled];
 }
 -(BOOL) enabled {
        return [radioButtons isEnabled];
        } else if([target isKindOfClass: [TargetConfig class]]) {
                [radioButtons setState:1 atRow: 2 column: 0];
                [configPopup selectItemAtIndex: [[configsController configs] indexOfObject: [(TargetConfig*)target config]]];
-    } else if ([target isKindOfClass: [TargetMouseMove class]]) {
+    }
+    else if ([target isKindOfClass: [TargetMouseMove class]]) {
         if ([(TargetMouseMove *)target dir] == 0)
             [radioButtons setState:1 atRow: 3 column: 0];
         else
             [radioButtons setState:1 atRow: 4 column: 0];
-       } else {
+       }
+    else if ([target isKindOfClass: [TargetMouseBtn class]]) {
+        [radioButtons setState: 1 atRow: 5 column: 0];
+        if ([(TargetMouseBtn *)target which] == kCGMouseButtonLeft)
+            [mouseBtnSelect setSelectedSegment: 0];
+        else
+            [mouseBtnSelect setSelectedSegment: 1];
+    } else {
                [NSException raise:@"Unknown target subclass" format:@"Unknown target subclass"];
        }
 }
index 921f29c2afeaf903f88bcf51aed10c36624817be..29153d8ceddaf57a7cc0409c27beda15a7776f0e 100644 (file)
@@ -9,10 +9,10 @@
 #import "Target.h"
 
 @interface TargetMouseBtn : Target {
-    int which;
+    CGMouseButton which;
 }
 
-@property(readwrite) int which;
+@property(readwrite) CGMouseButton which;
 
 +(TargetMouseBtn*) unstringifyImpl: (NSArray*) comps;
 
index 5137f2be5cf4001f92ff1494c683090ff2f5de34..857de7b090647cc0d3234054143c832b50af1e62 100644 (file)
@@ -13,7 +13,7 @@
 @synthesize which;
 
 -(NSString*) stringify {
-       return [[NSString alloc] initWithFormat: @"mbtn~%d", which];
+       return [[NSString alloc] initWithFormat: @"mbtn~%u", which];
 }
 
 +(TargetMouseBtn*) unstringifyImpl: (NSArray*) comps {
 }
 
 -(void) trigger {
+    NSRect screenRect = [[NSScreen mainScreen] frame];
+    NSInteger height = screenRect.size.height;
     NSPoint mouseLoc = [NSEvent mouseLocation];
     CGEventType eventType = (which == kCGMouseButtonLeft) ? kCGEventLeftMouseDown : kCGEventRightMouseDown;
     CGEventRef click = CGEventCreateMouseEvent(NULL,
                                                eventType,
-                                               CGPointMake(mouseLoc.x, mouseLoc.y),
+                                               CGPointMake(mouseLoc.x, height - mouseLoc.y),
                                                which);
     CGEventPost(kCGHIDEventTap, click);
     CFRelease(click);
 }
 
 -(void) untrigger {
+    NSRect screenRect = [[NSScreen mainScreen] frame];
+    NSInteger height = screenRect.size.height;
     NSPoint mouseLoc = [NSEvent mouseLocation];
     CGEventType eventType = (which == kCGMouseButtonLeft) ? kCGEventLeftMouseUp : kCGEventRightMouseUp;
     CGEventRef click = CGEventCreateMouseEvent(NULL,
                                                eventType,
-                                               CGPointMake(mouseLoc.x, mouseLoc.y),
+                                               CGPointMake(mouseLoc.x, height - mouseLoc.y),
                                                which);
     CGEventPost(kCGHIDEventTap, click);
     CFRelease(click);
index dd726e526bfa80aeb0a434dd3894b081809dc8b3..2bcbce378a194557116cdb6e9618a81fb4fe9f50 100644 (file)
 @implementation TargetMouseMove
 
 -(void) setInputValue: (int) newIV {
+    NSRect screenRect = [[NSScreen mainScreen] frame];
+    NSInteger height = screenRect.size.height;
     NSPoint mouseLoc = [NSEvent mouseLocation];
     if (dir == 0)
         mouseLoc.x += newIV;
     else
         mouseLoc.y += newIV;
     
-    CGEventRef move = CGEventCreateMouseEvent(NULL, kCGEventMouseMoved, CGPointMake(mouseLoc.x, mouseLoc.y), kCGMouseButtonLeft);
+    CGEventRef move = CGEventCreateMouseEvent(NULL, kCGEventMouseMoved,
+                                              CGPointMake(mouseLoc.x, height - mouseLoc.y),
+                                              kCGMouseButtonLeft);
     CGEventPost(kCGHIDEventTap, move);
     CFRelease(move);
 }