Discussion Forums  >  Plugins, Customizing, Source Code

Replies: 24    Views: 83

mrDavid
BTMods.com
Profile
Posts: 3936
Reg: May 21, 2011
San Diego, CA
51,910
02/06/13 12:37 PM (12 years ago)

Messing around with animated circle and..

I was messing around with the new Animated Menu Circle plugin, which has been awesome so far! I think I have a suggestion or two and a big report: Suggestion: 1. How hard would it be to add custom URL support for button images? I'ts a little tedious for me to add every single change I do to the button locally into the app, and I'm certain clients would like to change buttons via a URL as they won't have access to the app source code nor would we want to resubmit to apple every single time we change a button image. Again, I have no idea how hard something like this would be! 2. Since I'm only using star icons for the circle menu plugin, the user will not know what button goes where until he clicks the button and sees the text at the bottom, at which point he's too late to change his mind. Something like a title label of the button appearing under the button after it's exploded, or perhaps a second tap after the ui label is shown for that button? Right now my only choice is to make each button unique. 3. thinking like a user, the user might not know to tap the middle button as some buttons may not have "click here!" text on them, a option to have it pre-exploded and loaded with the menu buttons around the center button after the app launches would be great (so avoiding the first tap of the center button - digging through code for this. Bug report: When adding a tabbed bar at the bottom, the center button and stars indeed move up and center correctly - however, the explosion of the stars does not - when tapping the menu center button, the stars explode from the original location before the tabbed bar is added, and explodes outward from under the button, instead of the new position of the center button. I'm digging through code to manually move the explosion right now, but so far no luck :( Hope this thread is useful and thanks so much @chris! David https://buzztouchmods.com
 
chris1
Code is Art
Profile
Posts: 3862
Reg: Aug 10, 2012
Austin, TX
50,120
like
02/06/13 12:41 PM (12 years ago)
Thanks David - good catch on the bug report. Also, your first suggestion is one of my planned updates for the plugin. I'm also thinking of making the option to fade the center button in and out, which should help with making it look like something the user should click on. I could make both that and your idea about starting off expanded as options on the control panel. The label piece is a bit harder - I'll have to give that some thought.
 
mrDavid
BTMods.com
Profile
Posts: 3936
Reg: May 21, 2011
San Diego, CA
51,910
like
02/06/13 12:43 PM (12 years ago)
No sweat - super cool plugin, very excited working with it. Looking forward then to the next version, I'm going to hack it around for now and make it work that way. Yup, the label thing is a bit harder, both in code and concept, was scratching my head a while trying to figure out what to do. Thanks again, David https://buzztouchmods.com
 
chris1
Code is Art
Profile
Posts: 3862
Reg: Aug 10, 2012
Austin, TX
50,120
like
02/06/13 12:44 PM (12 years ago)
yea - labels weren't even part of the original concept
 
mrDavid
BTMods.com
Profile
Posts: 3936
Reg: May 21, 2011
San Diego, CA
51,910
like
02/06/13 12:55 PM (12 years ago)
That's what I figured yup ;P going to try and get creative. I added [self open]; after the viewWillAppear method in the .m file. This makes it auto open during launch of that screen, and doesn't seem to confuse the app if you try to close or open the main button again. Cheers, David https://buzztouchmods.com
 
chris1
Code is Art
Profile
Posts: 3862
Reg: Aug 10, 2012
Austin, TX
50,120
like
02/06/13 12:56 PM (12 years ago)
yup - that was the easy one to fix!
 
mrDavid
BTMods.com
Profile
Posts: 3936
Reg: May 21, 2011
San Diego, CA
51,910
like
02/06/13 01:00 PM (12 years ago)
Yup! Trying to find the code your using to move the frame up for the center button, and see if we can use that same code to move the frame for the "explosion" up as-well? Cheers, David https://buzztouchmods.com
 
chris1
Code is Art
Profile
Posts: 3862
Reg: Aug 10, 2012
Austin, TX
50,120
like
02/06/13 01:01 PM (12 years ago)
Someone else noticed today a similar problem - if you have one of your buttons go to another circle menu screen and then come back, the buttons are off-center.
 
mrDavid
BTMods.com
Profile
Posts: 3936
Reg: May 21, 2011
San Diego, CA
51,910
like
02/06/13 01:05 PM (12 years ago)
Interesting.. funny that someone is doing two screens, that's a lot of navigating! I'm looking at the 4 lines of code you have under: "//move label "up" a bit if app has tabs..." for any clues, and thinking the explosion occurs at: "// Open center menu view" so just need to connect those two in theory? Maybe I can help out with the similar bug your talking about too? Hope you don't mind? Cheers, David https://buzztouchmods.com
 
chris1
Code is Art
Profile
Posts: 3862
Reg: Aug 10, 2012
Austin, TX
50,120
like
02/06/13 01:09 PM (12 years ago)
not at all - love having the help! I know David made some last minute changes related to the label and tabs. That "//move label 'up' a bit if app has tabs...' is his code. Apparently the labels were being hidden by the tabbar before.
 
chris1
Code is Art
Profile
Posts: 3862
Reg: Aug 10, 2012
Austin, TX
50,120
like
02/06/13 01:58 PM (12 years ago)
solved the button issue when tabs are present. About a third of the way down in the code, you'll see this: // Buttons' origin frame CGFloat originX = (menuSize_ - centerButtonSize_) / 2; buttonOriginFrame_ = (CGRect){{originX, originX}, {centerButtonSize_, centerButtonSize_}}; replace it with this: // Buttons' origin frame //move frame "up" a bit if app has tabs... int moveUp = 0; if([appDelegate.rootApp.tabs count] > 0){ moveUp = 50; } CGFloat originX = (menuSize_ - centerButtonSize_) / 2; buttonOriginFrame_ = (CGRect){{originX, originX - moveUp}, {centerButtonSize_, centerButtonSize_}};
 
mrDavid
BTMods.com
Profile
Posts: 3936
Reg: May 21, 2011
San Diego, CA
51,910
like
02/06/13 02:38 PM (12 years ago)
@chris Sorry, I was taken away from my laptop by my angry girlfriend! David is funky, I love his little code surprises he does to make our stuff work even better then before - awesome. I just added your fixed code - works like a CHARM! super job. Now to mess around with labels, If I can get something decent, I'll send you a screenshot with the modified code to help you out in figuring what you would want to do (if anything?) regarding labels. Will post progress here... thanks @chris for the help. David https://buzztouchmods.com
 
mrDavid
BTMods.com
Profile
Posts: 3936
Reg: May 21, 2011
San Diego, CA
51,910
like
02/06/13 02:56 PM (12 years ago)
Okay so current goal is to get labels to show under buttons. begin: I took this code: "NSString *thisButtonLabel = [BT_strings getJsonPropertyValue:currentMenuItem.jsonVars :@"titleText" :@"ok"]; buttonLabel.text = thisButtonLabel;" and placed it under the code block from: "// Add buttons to |ballMenu_|, set it's origin frame to center". So what this does is "currentMenuItem" simply displays the current (in this case, the last menu item) text at the bottom of the screen as a constant until a menu item is tapped and is overwritten by the newer current label. Not even close to what I want to do. Looking for the code that displays the buttons, that's where we need to insert the label code, rather then having it display at the bottom again. and off we go! David https://buzztouchmods.com
 
chris1
Code is Art
Profile
Posts: 3862
Reg: Aug 10, 2012
Austin, TX
50,120
like
02/06/13 03:13 PM (12 years ago)
yeah - that would take a good deal of extra coding. You would need to add a UILabel in the for loop under viewDidLoad like so: // Add buttons to |ballMenu_|, set it's origin frame to center for (int i = 1; i <= buttonCount_; ++i) { ... NSString *thisButtonLabel = [BT_strings getJsonPropertyValue:currentMenuItem.jsonVars :@"titleText" :@"ok"]; //set UILabel buttonLabel = [[UILabel alloc]init]; int spaceBelowButton = 10; CGFloat windowWidth = [UIScreen mainScreen].bounds.size.width; buttonLabel.frame = CGRectMake(centerMenuFrame.origin.x + 50, centerMenuFrame.origin.y + buttonSize_/2 + spaceBelowButton, 100, 40); buttonLabel.textAlignment = UITextAlignmentCenter; buttonLabel.textColor = [UIColor whiteColor]; buttonLabel.backgroundColor = [UIColor clearColor]; buttonLabel.text = thisButtonLabel; [self.view addSubview:buttonLabel]; Then, you would need to hide those labels. Then you would need to add the code to change the frame on those labels under the updateButtonsLayoutWithTriangleHypotenuse method, and unhiding the labels under the open() method. It can be done, but I'm not sure how good it would even look, having labels fly around the screen with the buttons. I'd rather put my trust in the user to figure out what each button means by looking at it, and if not, by holding down the button to see the label appear, and then dragging their finger off the button if they don't want that one.
 
mrDavid
BTMods.com
Profile
Posts: 3936
Reg: May 21, 2011
San Diego, CA
51,910
like
02/06/13 03:23 PM (12 years ago)
Yup yup lots of work and even more with what you now mentioned. Like you said, and that's my main concern, that the labels may just not look good in the end, and all of that work for nothing? The finger hold method is what I'm doing to find out what each screen is, maybe, abandon the label idea and go forward with a new idea using that as the base.. What about ignoring the first tap, having the label show up there at the bottom, and then...... pause method.. 1. tap the label to continue OR 2. tap the button again to continue (but how would the user know this?) for #2, perhaps the button changes into a "GO" button that is like a confimation button (make sense?) so for example: You tap on the center button, it explodes, and the menu buttons show up. You tap on one of the menu buttons named "social" that has a bird icon. The bird icon disappears, the label shows up at the bottom, and where the bird icon disappeared a new button shows up that is green and has the word GO on it, tapping on the new button confirms the "social" screen and goes to that screen. The second button can be obviously customized. Now that might be as much coding as the first "solution", but I like the idea much more, keeps it the same design without labels flying all over the place like you said. What do you think of something like that? David https://buzztouchmods.com
 
chris1
Code is Art
Profile
Posts: 3862
Reg: Aug 10, 2012
Austin, TX
50,120
like
02/06/13 03:27 PM (12 years ago)
You could probably code it that way if you wanted - that's pretty far outside the scope of what the plugin is designed to do of course. What would happen if the user decided not to choose that menu option, though? You would need a 'cancel' button too I would imagine. Or have the background set to handle taps that acted as a cancel button. Lots of possibilities I suppose.
 
mrDavid
BTMods.com
Profile
Posts: 3936
Reg: May 21, 2011
San Diego, CA
51,910
like
02/06/13 03:37 PM (12 years ago)
Back in the day before plugins, there was this awesome dude that made a app for russian kids, he modded the buttons menu beyond it's initial scope too - people were stoked! Just funny I was reminded of that :) Yup I think this might be a little too much, but definitely something that would fit my needs better in this particular app. I'll try it for fun and it it fails then just to the next idea. Super thanks for the help, if I'm able to do anything else with the plugin I'll throw code at your face here in-case you want to see it :) Cheers mate! David https://buzztouchmods.com
 
mrDavid
BTMods.com
Profile
Posts: 3936
Reg: May 21, 2011
San Diego, CA
51,910
like
02/06/13 05:18 PM (12 years ago)
FYI: as far as I can see screen transitions are not customizable via this screen/plugin, so that option should be removed from the plugin :-) Cheers, David https://buzztouchmods.com
 
chris1
Code is Art
Profile
Posts: 3862
Reg: Aug 10, 2012
Austin, TX
50,120
like
02/06/13 05:20 PM (12 years ago)
They are. I think the fade transition looks best, though. Transitions are handled by the core BT classes.
 
mrDavid
BTMods.com
Profile
Posts: 3936
Reg: May 21, 2011
San Diego, CA
51,910
like
02/06/13 05:29 PM (12 years ago)
Your kidding me? Won't work here, will debug! David https://buzztouchmods.com
 
MadRod
Aspiring developer
Profile
Posts: 1853
Reg: Apr 12, 2012
Lisbon
27,930
like
02/06/13 05:34 PM (12 years ago)
Hey, David, since you're around here, a quick question. Any update on your paint plugin update? Sorry about the non related topic Chris. Cheers. Miguel
 
mrDavid
BTMods.com
Profile
Posts: 3936
Reg: May 21, 2011
San Diego, CA
51,910
like
02/06/13 06:31 PM (12 years ago)
@MadRod - no problem! I'm waiting for all of my plugins to go through the market before updates roll out, the paint plugin I believe was at the top of the list, and I might release a fast guide for the image upload (which is more of a hack) Thanks, David https://buzztouchmods.com
 
mrDavid
BTMods.com
Profile
Posts: 3936
Reg: May 21, 2011
San Diego, CA
51,910
like
02/06/13 10:15 PM (12 years ago)
@chris1 got a bug to report again :( Seems like the top button (the first menu item button after you press the center button) is not aligned. you have to tap under it for it to work. This is with the tabbed view, and with your small code change for the explosion - could you check this out and get back to me? Feeling iffy releasing the app with that :-( Cheers, David https://buzztouchmods.com
 
chris1
Code is Art
Profile
Posts: 3862
Reg: Aug 10, 2012
Austin, TX
50,120
like
02/07/13 01:28 PM (12 years ago)
Okay - after scratching my head for a while, I figured out the problem with the top button. It's not an alignment problem - it's a problem with the height of the menu view. Unfortunately, it takes a few changes to make it work: 1) Return the code change I mentioned above to what it was originally: // Buttons' origin frame CGFloat originX = (menuSize_ - centerButtonSize_) / 2; buttonOriginFrame_ = (CGRect){{originX, originX}, {centerButtonSize_, centerButtonSize_}}; 2) Just a few lines below that section, find this: //move label "up" a bit if app has tabs... if([appDelegate.rootApp.tabs count] > 0){ viewHeight -= 70; NSLog(@"viewHeight is:%f",viewHeight); } That needs to be moved up to right after the "viewHeight" variable is declared. So it should look like this: CGFloat viewHeight = (self.navigationController.isNavigationBarHidden ? kKYCircleMenuViewHeight : kKYCircleMenuViewHeight - kKYCircleMenuNavigationBarHeight); //move label "up" a bit if app has tabs... if([appDelegate.rootApp.tabs count] > 0){ viewHeight -= 70; NSLog(@"viewHeight is:%f",viewHeight); } CGRect frame = CGRectMake(0.f, 0.f, kKYCircleMenuViewWidth, viewHeight); UIView * view = [[UIView alloc] initWithFrame:frame]; self.view = view; [view release]; 3) In the "_updateButtonsLayoutWithTriangleHypotenuse" method at the bottom of the file, find this section of code: //move frame "up" a bit if app has tabs... int moveUp = 0; if([appDelegate.rootApp.tabs count] > 0){ moveUp = 50; } Immediately after it, add this line: moveUp = 0;
 
chris1
Code is Art
Profile
Posts: 3862
Reg: Aug 10, 2012
Austin, TX
50,120
like
02/07/13 01:29 PM (12 years ago)
Hopefully that solves it. I was changing stuff back and forth trying to figure out what was going on.
 

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.