[dasher] Add circle start as "iPhone-specific" param with NSUserDefaults obsvr => SetBool



commit 8f8e4fb96122df4b9d4ff16b53197d5e75a0a36e
Author: Alan Lawrence <acl33 inf phy cam ac uk>
Date:   Mon Nov 29 18:09:43 2010 +0000

    Add circle start as "iPhone-specific" param with NSUserDefaults obsvr => SetBool

 Src/iPhone/Classes/IPhoneFilters.mm       |    4 +++-
 Src/iPhone/Classes/InputMethodSelector.mm |    2 +-
 2 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/Src/iPhone/Classes/IPhoneFilters.mm b/Src/iPhone/Classes/IPhoneFilters.mm
index be386e9..a0da456 100644
--- a/Src/iPhone/Classes/IPhoneFilters.mm
+++ b/Src/iPhone/Classes/IPhoneFilters.mm
@@ -66,7 +66,7 @@ IPhonePrefsObserver::~IPhonePrefsObserver() {
 
 CIPhoneTiltFilter::CIPhoneTiltFilter(Dasher::CEventHandler * pEventHandler, CSettingsStore *pSettingsStore, CDasherInterfaceBase *pInterface, ModuleID_t iID, CDasherInput *pTouch)
 : COneDimensionalFilter(pEventHandler, pSettingsStore, pInterface, iID, TILT_FILTER), m_pTouch(pTouch) {
-  ObserveKeys(HOLD_TO_GO, TILT_USE_TOUCH_X, TILT_1D, nil);
+  ObserveKeys(HOLD_TO_GO, TILT_USE_TOUCH_X, TILT_1D, @"CircleStart", nil);
 };
 			
 void CIPhoneTiltFilter::ApplyTransform(myint &iDasherX, myint &iDasherY, CDasherView *pView) {
@@ -118,6 +118,8 @@ void CIPhoneTiltFilter::iPhonePrefsChanged(NSString *key) {
     bUseTouchX = val;
   else if ([key isEqualToString:TILT_1D])
     bTilt1D = val;
+  else if ([key isEqualToString:@"CircleStart"])
+    SetBoolParameter(BP_CIRCLE_START, val);
   //Hmmm, do we need to do anything _now_?
 }
 
diff --git a/Src/iPhone/Classes/InputMethodSelector.mm b/Src/iPhone/Classes/InputMethodSelector.mm
index b9b86a6..efccfb6 100644
--- a/Src/iPhone/Classes/InputMethodSelector.mm
+++ b/Src/iPhone/Classes/InputMethodSelector.mm
@@ -25,7 +25,7 @@ typedef struct __FILTER_DESC__ {
 } SFilterDesc;
 
 NSString *touchSettings[] = {TOUCH_USE_TILT_X, NULL};
-NSString *tiltSettings[] = {HOLD_TO_GO, TILT_USE_TOUCH_X, TILT_1D, NULL};
+NSString *tiltSettings[] = {HOLD_TO_GO, TILT_USE_TOUCH_X, TILT_1D, @"CircleStart", NULL};
 
 NSString *calibBtn=@"Calibrate...";//pointer equality used to mark cell for special-casing in cellForRowAtIndexPath: below
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]