Discussion Forums  >  Plugins, Customizing, Source Code

Replies: 7    Views: 40

NCbuzz
Code is Art
Profile
Posts: 575
Reg: Sep 11, 2013
Lillington, NC
11,100
10/12/14 09:34 AM (9 years ago)

Cubbyhole Image Question

I was wondering how you could use the Cubbyholes Plugin to create two-state buttons. (Image an image of a key on your keyboard, and the second state is the same key depressed. Another might be a light switch.) It would be cool to change the image and a variable after the tap on the image. (The variable could be based upon which image state button is currently displayed.
 
Niraj
buzztouch Evangelist
Profile
Posts: 2943
Reg: Jul 11, 2012
Cerritos
37,930
like
10/12/14 09:53 AM (9 years ago)
Currently, the images auto-darken upon a press to give feedback of "you are tapping me". How long would the 2nd state image be visible? Would it be like the Shift Lock key on an iOS keyboard? That one remains in 2nd state until something else happens. BuzzTouch has (or use to have) a property that lets us know which item was tapped on the previous screen that took us to this current screen. Since your variables are binary (I assume), then I would just use that itemTappedOnPreviousScreen property (I made up that name just now). I will have to research and refresh my memory on the availability of that property. The loadNextScreen method dropped a parameter on the way to v3 of BuzzTouch. Perhaps that was the property that has been removed. Researching ... But breakfast comes first :-) -- Niraj
 
Niraj
buzztouch Evangelist
Profile
Posts: 2943
Reg: Jul 11, 2012
Cerritos
37,930
like
10/12/14 10:56 AM (9 years ago)
Read the entire thread on "How to pass tapped menu item to next screen?" (Ignore my particular use case of using email as the next screen) http://www.buzztouch.com/forum/thread.php?fid=64A97C87E9AD0EABAAE26EA&tid=64A97C87E9AD0EABAAE26EA
 
Niraj
buzztouch Evangelist
Profile
Posts: 2943
Reg: Jul 11, 2012
Cerritos
37,930
like
10/12/14 10:59 AM (9 years ago)
In BT v3, the handleTapToLoadScreen lost a parameter BuzzTouch v2 was this: [self handleTapToLoadScreen:thisScreen theMenuItemData:thisMenuItem theScreenData:screenObjectToLoad]; BuzzTouch v3 uses this: [self handleTapToLoadScreen:thisScreen theMenuItemData:tmpBTItem]; Not sure if I have this exactly right, not in front of a Mac.
 
NCbuzz
Code is Art
Profile
Posts: 575
Reg: Sep 11, 2013
Lillington, NC
11,100
like
10/16/14 07:01 AM (9 years ago)
Thanks for the replies. Actually the idea was more for an on-screen UI effect rather than directing to another screen. A single tap: a) Changes image (button image changed to other image- primary=normal or secondary=selected) b) Change image to secondary, and then after brief delay set back to primary image
 
Niraj
buzztouch Evangelist
Profile
Posts: 2943
Reg: Jul 11, 2012
Cerritos
37,930
like
10/16/14 10:00 AM (9 years ago)
That implies a change of state that gets recorded somewhere and used elsewhere -- Which is that Variable. Can definitely save it to a Variable by using NSUserPrefrences as the "database". Wonder how and where you will make use of that Variable ... Has to be your own Custom code.
 
NCbuzz
Code is Art
Profile
Posts: 575
Reg: Sep 11, 2013
Lillington, NC
11,100
like
10/16/14 06:07 PM (9 years ago)
Have used NSUserPrefrences before to set a light and dark theme for an app that was referenced for all of the menus, backgrounds and icons. Worked well- did require custom code throughout the plugins. However it is starting to sound like way too much for some buttons, so I am thinking the current cubbyholes darkening effect is just what the Dr ordered for now;)
 
Niraj
buzztouch Evangelist
Profile
Posts: 2943
Reg: Jul 11, 2012
Cerritos
37,930
like
10/16/14 07:14 PM (9 years ago)
Yeehaw! :-)
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.