Discussion Forums  >  Uncategorized

Replies: 5    Views: 364

mosaicgc
I hate code!
Profile
Posts: 5
Reg: Jun 02, 2011
Ocean Springs, ...
50
06/05/11 10:25 AM (14 years ago)

Grid Button Padding

Is there any way to push the top button start point down to account for an image built into my background?
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
06/05/11 11:47 PM (14 years ago)
Sure, this should be an 'easy' fix. Find BT_Screens > BT_screen_menuButtons.m, scroll down to about line 474 where the comment reads //add each menuItem (button) This 'for loop' processes each button and adds it to the scroll view. Each button is in it's own 'box.' The box contains the label, button background, icon etc. Each box is added to a scroll-view either vertically or horizontally, depending on your layout. So, in this for-loop, you'll see: UIView *buttonBox = [[UIView alloc] initWithFrame:CGRectMake(left, top, boxWidth, boxHeight)]; This is where a buttonBox is created for each button. The 'top' property is what we are interested in. We need to move the top value 'down' the screen for the first row of buttons. Buttons that follow should magically move down as they are added to the screen. To do this, we need to manually set the value of 'top' before the for loop. Add something like this: top = 100; ABOVE the //add each menuItem comment. Just before the for-loop starts. Adjust the top value as needed. 100 is '100 pixels below the navigation bar' 200, 300, etc. See what happens? Should work. Re-post if you get stuck.
 
mosaicgc
I hate code!
Profile
Posts: 5
Reg: Jun 02, 2011
Ocean Springs, ...
50
like
06/06/11 07:23 PM (14 years ago)
Worked like a charm. You guys are amazing.
 
Stefan
buzztouch Evangelist
Profile
Posts: 558
Reg: Dec 21, 2010
Sweden
14,780
like
08/09/11 12:21 PM (14 years ago)
@David - Thanks for this tip. Helped me out :)
 
GoNorthWest
buzztouch Evangelist
Profile
Posts: 8197
Reg: Jun 24, 2011
Oro Valley, AZ
1,000,000
like
09/17/11 10:54 PM (14 years ago)
So I should point out, if I'm correct here, that the only way this works for your app in the long run is if you host the BT_Config.txt file somewhere other than the BT servers, correct? Since you are making adjustments to this file outside of what can be done in the Control Panel, they won't be reflected in the master copy of the file. @David/@Parker : Another stab here at the eventual ability to make manual changes to BT_Config.txt (or, upload a changed copy) on the BT servers! Thanks! Mark
 
chadh0130
Apple Fan
Profile
Posts: 352
Reg: Nov 05, 2011
Rhode Island
4,020
like
01/12/12 07:23 PM (14 years ago)
I know that this is an old post but im having the same sort of problem with the top = code. i have designed my app for the iphone and ipad my question is for instance i have top set to equal 25 on the iphone but the ipad needs to be top=150 how can i have both??
 

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.