From: Frank Huang Date: Fri, 27 Jul 2012 19:12:38 +0000 (-0700) Subject: Finished supporting mouse buttons X-Git-Tag: version-1.0~131 X-Git-Url: https://git.yukkurigames.com/?a=commitdiff_plain;h=a71f9eae29ac9df72aa15c2de80f6a82b5aca44e;p=enjoyable.git Finished supporting mouse buttons --- diff --git a/English.lproj/MainMenu.xib b/English.lproj/MainMenu.xib index a7843f1..60d948f 100644 --- a/English.lproj/MainMenu.xib +++ b/English.lproj/MainMenu.xib @@ -860,7 +860,6 @@ 256 {242, 485} - YES @@ -957,7 +956,6 @@ {{1, 1}, {242, 485}} - @@ -968,7 +966,6 @@ -2147483392 {{1, 1}, {8, 298}} - _doScroller: @@ -979,7 +976,6 @@ -2147483392 {{-100, -100}, {473, 15}} - 1 @@ -989,7 +985,6 @@ {244, 487} - 133650 @@ -1000,7 +995,6 @@ {244, 487} - NSView @@ -1014,7 +1008,6 @@ 268 {{227, 57}, {180, 24}} - _NS:9 YES @@ -1051,7 +1044,6 @@ 268 {{20, 39}, {201, 388}} - 6 1 @@ -1421,7 +1413,6 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA 2322 {172, 14} - @@ -1499,12 +1490,11 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA {{2, 2}, {172, 20}} - - {5, 5} + {1, -1} 0 4 @@ -1514,7 +1504,6 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA -2147483392 {{-100, -100}, {15, 133}} - _doScroller: @@ -1525,7 +1514,6 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA -2147483392 {{-100, -100}, {87, 18}} - 1 @@ -1536,7 +1524,6 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA {{229, 318}, {176, 24}} - 133123 @@ -1548,7 +1535,6 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA 268 {{226, 251}, {182, 26}} - YES @@ -1582,7 +1568,6 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA 268 {{5, 456}, {507, 17}} - YES @@ -1605,7 +1590,6 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA 12 {{12, 445}, {493, 5}} - {0, 0} @@ -1632,21 +1616,18 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA {{253, 0}, {517, 487}} - NSView {770, 487} - YES {770, 487} - {{0, 0}, {1920, 1178}} @@ -1673,7 +1654,6 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA 256 {320, 418} - YES @@ -1731,7 +1711,6 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA {{1, 1}, {320, 418}} - @@ -1742,7 +1721,6 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA -2147483392 {{306, 1}, {15, 403}} - _doScroller: @@ -1753,7 +1731,6 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA -2147483392 {{1, 404}, {305, 15}} - 1 @@ -1763,7 +1740,6 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA {{0, 34}, {322, 420}} - 133682 @@ -1776,7 +1752,6 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA 260 {{10, 4}, {39, 28}} - YES @@ -1802,7 +1777,6 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA 260 {{57, 4}, {39, 28}} - YES @@ -1826,7 +1800,6 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA {322, 454} - NSView @@ -1850,26 +1823,6 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA JoystickController - - 67239424 - 131072 - Check - - _NS:9 - 1211912703 - 2 - - NSImage - NSSwitch - - - NSSwitch - - - - 200 - 25 - TargetController @@ -2429,6 +2382,22 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA 731 + + + mouseBtnSelect + + + + 746 + + + + mbtnChanged: + + + + 747 + @@ -3289,11 +3258,6 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA - - 736 - - - 744 @@ -3434,7 +3398,6 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA 733.IBPluginDependency 734.IBPluginDependency 735.IBPluginDependency - 736.IBPluginDependency 744.IBPluginDependency 745.IBNSSegmentedControlInspectorSelectedSegmentMetadataKey 745.IBPluginDependency @@ -3565,7 +3528,6 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin @@ -3585,400 +3547,9 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA - 745 - - - - YES - - ApplicationController - NSObject - - toggleActivity: - id - - - toggleActivity: - - toggleActivity: - id - - - - YES - - YES - activeButton - activeMenuItem - configsController - dockMenuBase - drawer - jsController - mainWindow - targetController - - - YES - NSToolbarItem - NSMenuItem - ConfigsController - NSMenu - NSDrawer - JoystickController - NSWindow - TargetController - - - - YES - - YES - activeButton - activeMenuItem - configsController - dockMenuBase - drawer - jsController - mainWindow - targetController - - - YES - - activeButton - NSToolbarItem - - - activeMenuItem - NSMenuItem - - - configsController - ConfigsController - - - dockMenuBase - NSMenu - - - drawer - NSDrawer - - - jsController - JoystickController - - - mainWindow - NSWindow - - - targetController - TargetController - - - - - IBProjectSource - ./Classes/ApplicationController.h - - - - ConfigsController - NSObject - - YES - - YES - addPressed: - removePressed: - - - YES - id - id - - - - YES - - YES - addPressed: - removePressed: - - - YES - - addPressed: - id - - - removePressed: - id - - - - - YES - - YES - removeButton - tableView - targetController - - - YES - NSButton - NSTableView - TargetController - - - - YES - - YES - removeButton - tableView - targetController - - - YES - - removeButton - NSButton - - - tableView - NSTableView - - - targetController - TargetController - - - - - IBProjectSource - ./Classes/ConfigsController.h - - - - JoystickController - NSObject - - YES - - YES - configsController - outlineView - targetController - - - YES - ConfigsController - NSOutlineView - TargetController - - - - YES - - YES - configsController - outlineView - targetController - - - YES - - configsController - ConfigsController - - - outlineView - NSOutlineView - - - targetController - TargetController - - - - - IBProjectSource - ./Classes/JoystickController.h - - - - KeyInputTextView - NSTextView - - YES - - YES - targetController - window - - - YES - TargetController - NSWindow - - - - YES - - YES - targetController - window - - - YES - - targetController - TargetController - - - window - NSWindow - - - - - IBProjectSource - ./Classes/KeyInputTextView.h - - - - TargetController - NSObject - - YES - - YES - configChosen: - radioChanged: - - - YES - id - id - - - - YES - - YES - configChosen: - radioChanged: - - - YES - - configChosen: - id - - - radioChanged: - id - - - - - YES - - YES - configPopup - configsController - joystickController - keyInput - mouseBtnRadio - radioButtons - radioConfig - radioKey - radioNoAction - title - - - YES - NSPopUpButton - ConfigsController - JoystickController - KeyInputTextView - NSMatrix - NSMatrix - NSButtonCell - NSButtonCell - NSButtonCell - NSTextField - - - - YES - - YES - configPopup - configsController - joystickController - keyInput - mouseBtnRadio - radioButtons - radioConfig - radioKey - radioNoAction - title - - - YES - - configPopup - NSPopUpButton - - - configsController - ConfigsController - - - joystickController - JoystickController - - - keyInput - KeyInputTextView - - - mouseBtnRadio - NSMatrix - - - radioButtons - NSMatrix - - - radioConfig - NSButtonCell - - - radioKey - NSButtonCell - - - radioNoAction - NSButtonCell - - - title - NSTextField - - - - - IBProjectSource - ./Classes/TargetController.h - - - + 747 + 0 IBCocoaFramework @@ -4001,7 +3572,6 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA NSMenuMixedState NSMultipleDocuments NSRemoveTemplate - NSSwitch YES @@ -4011,7 +3581,6 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA {10, 3} {32, 32} {8, 8} - {15, 15} diff --git a/Enjoy.xcodeproj/TemplateIcon.icns b/Enjoy.xcodeproj/TemplateIcon.icns new file mode 100644 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 index 0000000..c615a5a --- /dev/null +++ b/Enjoy.xcodeproj/project.pbxproj @@ -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 = ""; }; + 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = ""; }; + 13E42FB307B3F0F600E4EEF1 /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = /System/Library/Frameworks/CoreData.framework; sourceTree = ""; }; + 1DDD58150DA1D0A300B32029 /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = English.lproj/MainMenu.xib; sourceTree = ""; }; + 29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; + 29B97324FDCFA39411CA2CEA /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = ""; }; + 29B97325FDCFA39411CA2CEA /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = ""; }; + 32CA4F630368D1EE00C91783 /* Enjoy_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Enjoy_Prefix.pch; sourceTree = ""; }; + 8B7E476A15C314A200C588FA /* TargetMouseBtn.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TargetMouseBtn.h; sourceTree = ""; }; + 8B7E476B15C314A200C588FA /* TargetMouseBtn.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TargetMouseBtn.m; sourceTree = ""; }; + 8BD9B54115C230FE00929C5D /* TargetMouseMove.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TargetMouseMove.h; sourceTree = ""; }; + 8BD9B54215C230FE00929C5D /* TargetMouseMove.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TargetMouseMove.m; sourceTree = ""; }; + 8D1107310486CEB800E47090 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 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 = ""; }; + D5617A080FAEAF8300928B3A /* icon.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; path = icon.icns; sourceTree = ""; }; + D5617A340FAEB74000928B3A /* ConfigsController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ConfigsController.h; sourceTree = ""; }; + D5617A350FAEB74000928B3A /* ConfigsController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ConfigsController.m; sourceTree = ""; }; + D5617A370FAEBA1800928B3A /* Config.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Config.h; sourceTree = ""; }; + D5617A380FAEBA1800928B3A /* Config.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Config.m; sourceTree = ""; }; + D5617D180FAF568100928B3A /* JSActionButton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSActionButton.h; sourceTree = ""; }; + D5617D190FAF568100928B3A /* JSActionButton.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JSActionButton.m; sourceTree = ""; }; + D5617D240FAF579300928B3A /* JSActionHat.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSActionHat.h; sourceTree = ""; }; + D5617D250FAF579300928B3A /* JSActionHat.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JSActionHat.m; sourceTree = ""; }; + D5617D290FAF579A00928B3A /* JSActionAnalog.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSActionAnalog.h; sourceTree = ""; }; + D5617D2A0FAF579A00928B3A /* JSActionAnalog.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JSActionAnalog.m; sourceTree = ""; }; + D5617DF00FAF636C00928B3A /* SubAction.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SubAction.h; sourceTree = ""; }; + D5617DF10FAF636C00928B3A /* SubAction.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SubAction.m; sourceTree = ""; }; + D5617FD40FAFD06000928B3A /* Target.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Target.h; sourceTree = ""; }; + D5617FD50FAFD06000928B3A /* Target.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Target.m; sourceTree = ""; }; + D5617FD70FAFD1E600928B3A /* TargetKeyboard.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TargetKeyboard.h; sourceTree = ""; }; + D5617FD80FAFD1E600928B3A /* TargetKeyboard.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TargetKeyboard.m; sourceTree = ""; }; + D5617FE20FAFD7B000928B3A /* TargetController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TargetController.h; sourceTree = ""; }; + D5617FE30FAFD7B000928B3A /* TargetController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TargetController.m; sourceTree = ""; }; + D5617FE50FAFDB5800928B3A /* KeyInputTextView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KeyInputTextView.h; sourceTree = ""; }; + D5617FE60FAFDB5800928B3A /* KeyInputTextView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = KeyInputTextView.m; sourceTree = ""; }; + D56180090FAFE8E400928B3A /* Carbon.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Carbon.framework; path = /System/Library/Frameworks/Carbon.framework; sourceTree = ""; }; + D594BE840FAE6219007A85F2 /* Joystick.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Joystick.h; sourceTree = ""; }; + D594BE850FAE6219007A85F2 /* Joystick.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Joystick.m; sourceTree = ""; }; + D594BE880FAE64AD007A85F2 /* JSAction.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSAction.h; sourceTree = ""; }; + D594BE890FAE64AD007A85F2 /* JSAction.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JSAction.m; sourceTree = ""; }; + D594BEF70FAE6FF2007A85F2 /* JoystickController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JoystickController.h; sourceTree = ""; }; + D594BEF80FAE6FF2007A85F2 /* JoystickController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JoystickController.m; sourceTree = ""; }; + D594BEFF0FAE7397007A85F2 /* IOKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = IOKit.framework; path = /System/Library/Frameworks/IOKit.framework; sourceTree = ""; }; + D594BF810FAE9661007A85F2 /* ApplicationController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ApplicationController.h; sourceTree = ""; }; + D594BF820FAE9661007A85F2 /* ApplicationController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ApplicationController.m; sourceTree = ""; }; + D5F8096F0FB093400006A4DE /* TargetConfig.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TargetConfig.h; sourceTree = ""; }; + D5F809700FB093400006A4DE /* TargetConfig.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TargetConfig.m; sourceTree = ""; }; +/* 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 = ""; + }; + 1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */ = { + isa = PBXGroup; + children = ( + D594BEFF0FAE7397007A85F2 /* IOKit.framework */, + 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */, + ); + name = "Linked Frameworks"; + sourceTree = ""; + }; + 1058C7A2FEA54F0111CA2CBB /* Other Frameworks */ = { + isa = PBXGroup; + children = ( + D56180090FAFE8E400928B3A /* Carbon.framework */, + 29B97324FDCFA39411CA2CEA /* AppKit.framework */, + 13E42FB307B3F0F600E4EEF1 /* CoreData.framework */, + 29B97325FDCFA39411CA2CEA /* Foundation.framework */, + ); + name = "Other Frameworks"; + sourceTree = ""; + }; + 19C28FACFE9D520D11CA2CBB /* Products */ = { + isa = PBXGroup; + children = ( + 8D1107320486CEB800E47090 /* Enjoy.app */, + ); + name = Products; + sourceTree = ""; + }; + 29B97314FDCFA39411CA2CEA /* Enjoy */ = { + isa = PBXGroup; + children = ( + 080E96DDFE201D6D7F000001 /* Classes */, + 29B97315FDCFA39411CA2CEA /* Other Sources */, + 29B97317FDCFA39411CA2CEA /* Resources */, + 29B97323FDCFA39411CA2CEA /* Frameworks */, + 19C28FACFE9D520D11CA2CBB /* Products */, + ); + name = Enjoy; + sourceTree = ""; + }; + 29B97315FDCFA39411CA2CEA /* Other Sources */ = { + isa = PBXGroup; + children = ( + 32CA4F630368D1EE00C91783 /* Enjoy_Prefix.pch */, + 29B97316FDCFA39411CA2CEA /* main.m */, + ); + name = "Other Sources"; + sourceTree = ""; + }; + 29B97317FDCFA39411CA2CEA /* Resources */ = { + isa = PBXGroup; + children = ( + D549CA4B0FBB441B00BC8203 /* Credits.rtf */, + D5617A080FAEAF8300928B3A /* icon.icns */, + 8D1107310486CEB800E47090 /* Info.plist */, + 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */, + 1DDD58140DA1D0A300B32029 /* MainMenu.xib */, + ); + name = Resources; + sourceTree = ""; + }; + 29B97323FDCFA39411CA2CEA /* Frameworks */ = { + isa = PBXGroup; + children = ( + 1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */, + 1058C7A2FEA54F0111CA2CBB /* Other Frameworks */, + ); + name = Frameworks; + sourceTree = ""; + }; +/* 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 = ""; + }; + 1DDD58140DA1D0A300B32029 /* MainMenu.xib */ = { + isa = PBXVariantGroup; + children = ( + 1DDD58150DA1D0A300B32029 /* English */, + ); + name = MainMenu.xib; + sourceTree = ""; + }; +/* 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 */; +} diff --git a/TargetController.h b/TargetController.h index f264210..f68a6da 100644 --- a/TargetController.h +++ b/TargetController.h @@ -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; diff --git a/TargetController.m b/TargetController.m index 70dc1e8..9b075a1 100644 --- a/TargetController.m +++ b/TargetController.m @@ -15,6 +15,11 @@ [[[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 { @@ -50,7 +55,12 @@ 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]; @@ -113,12 +125,20 @@ } 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"]; } } diff --git a/TargetMouseBtn.h b/TargetMouseBtn.h index 921f29c..29153d8 100644 --- a/TargetMouseBtn.h +++ b/TargetMouseBtn.h @@ -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; diff --git a/TargetMouseBtn.m b/TargetMouseBtn.m index 5137f2b..857de7b 100644 --- a/TargetMouseBtn.m +++ b/TargetMouseBtn.m @@ -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 { @@ -24,22 +24,26 @@ } -(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); diff --git a/TargetMouseMove.m b/TargetMouseMove.m index dd726e5..2bcbce3 100644 --- a/TargetMouseMove.m +++ b/TargetMouseMove.m @@ -11,13 +11,17 @@ @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); }