SkullyFox
Apple Fan
Profile
Posts: 169
Reg: Jul 15, 2012
Armidale
12,190
08/03/12 10:04 PM (13 years ago)

Making menu width smaller - align to one side.

this will hopefully be an easier one. I have intergrated the "bt_screen_menuSimpleAdvanced" plugin into my project rather than the header image, however i would like to make the menu align to the left with a small border (5-10) and have the menu only 40-50 wide with short names, i know this is much like using the tabbed layout, however that allows for only 5 items, and i would like to make more than that, i t would also allow me to custom make a background and i plan on having an expanding menu from the right I have looked through the code, and i cannot find the place to modify this outside what you can modify in the BT control panel. any ideas? Dave
 
mrDavid
BTMods.com
Profile
Posts: 3936
Reg: May 21, 2011
San Diego, CA
51,910
like
08/04/12 12:03 AM (13 years ago)
Hi Dave, Thanks for using our plugin. awesome. I'm trying to visualize what you're asking, so my 5 year old *cough!* drew it up in paint. https://www.buzztouchmods.com/images/visualize.png Is that what your talking about? or did I visualize it wrong? Cheers, David buzztouchmods.com
 
SkullyFox
Apple Fan
Profile
Posts: 169
Reg: Jul 15, 2012
Armidale
12,190
like
08/04/12 12:09 AM (13 years ago)
Wow that's some 5 year old.. And yes that's pretty much what I'm after.. But with the menu rows a bit shorter (more image space) Cheers, Dave
 
mrDavid
BTMods.com
Profile
Posts: 3936
Reg: May 21, 2011
San Diego, CA
51,910
like
08/04/12 12:20 AM (13 years ago)
I won't pretend to know much about this, so take it as you will.. in BT_screen_menuListSimpleAdvanced.m at line 370 (search for //build screen) seems where the list gets "built". Maybe add some code like this to it: [thisMenuItemData setHeight(0)]; [thisMenuItemData setWidth(0)]; or possibly [myTableView setHeight(0)]; [myTableView setWidth(0)]; might need to mess around, since there's no specific code there (like for html tables, they would have generic "100%" tags, but this is different). Will subscribe and keep looking / stay updated and hopefully others will contribute, as I think this would be a good modification for scringo/socialize bars ;) Cheers, David buzztouchmods.com
 
SkullyFox
Apple Fan
Profile
Posts: 169
Reg: Jul 15, 2012
Armidale
12,190
like
08/04/12 12:38 AM (13 years ago)
That was exactly the reason for the question :) I'll have a play and keep this forum posted. Dave
 
SkullyFox
Apple Fan
Profile
Posts: 169
Reg: Jul 15, 2012
Armidale
12,190
like
08/05/12 01:34 AM (13 years ago)
I got it to work! under the "//build screen option" it did not work, the parent data overrid the data for some reason, so instead, under the "//build the table that holds the menu items" area (up the top) i "//" out the line "self.myTableView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;" and under that (before [self.myTableView setDataSource:self]; & [self.myTableView setDelegate:self];) i entered the line "[self.myTableView setFrame: CGRectMake (10, 10, 150, 480)];" So it should look something like this: //build the table that holds the menu items. self.myTableView = [BT_viewUtilities getTableViewForScreen:[self screenData]]; //self.myTableView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight; [self.myTableView setFrame: CGRectMake (10, 10, 150, 480)]; [self.myTableView setDataSource:self]; [self.myTableView setDelegate:self]; and it ended up looking like this: http://i1170.photobucket.com/albums/r530/David_Moulder/ScreenShot2012-08-05at62755PM.png (i havent set a background image or anything yet, and this was applied to the "bt_screen_menuSimple" class, not the advanced plugin. but i imagine it would work much the same way. If you see any foreseeable problems with this feel free to correct me (it has no errors or warnings so i think its OK, but im only fairly new to this, so im open to criticism) Cheers Dave
 
mrDavid
BTMods.com
Profile
Posts: 3936
Reg: May 21, 2011
San Diego, CA
51,910
like
08/05/12 08:09 AM (13 years ago)
Now that's what I call hacking code! Great job, I'll try to see if it works for the advanced plugin, since I would want to use that one for the app. and post the code here if it's any different. Super kudos to your success mate. Show us (me) the finished project once your done with the app, would be interesting to see ;) Cheers, David. buzztouchmods.com
 
SkullyFox
Apple Fan
Profile
Posts: 169
Reg: Jul 15, 2012
Armidale
12,190
like
08/05/12 02:04 PM (13 years ago)
Hey mate, I have done it on the advanced menu and added icons, works a treat ;) I will Definately post the finished product Cheers, Dave
 
mrDavid
BTMods.com
Profile
Posts: 3936
Reg: May 21, 2011
San Diego, CA
51,910
like
08/05/12 02:05 PM (13 years ago)
Hey! Was it any different to impliment? Cheers, David buzztouchmods.com
 
SkullyFox
Apple Fan
Profile
Posts: 169
Reg: Jul 15, 2012
Armidale
12,190
like
08/05/12 02:07 PM (13 years ago)
Nope, was pretty much exactly the same, the measurements do Change when implementing icons and it obviously depends on the length of the words you use, just got to taylor it to you. But it works great! Thanks For the suggestions. Cheers, Dave
 
mrDavid
BTMods.com
Profile
Posts: 3936
Reg: May 21, 2011
San Diego, CA
51,910
like
08/05/12 06:28 PM (13 years ago)
Gotcha :) Now to do this to the buttons menu, people use the buttons menu a ton as a home screen :) Cheers, David buzztouchmods.com
 
SkullyFox
Apple Fan
Profile
Posts: 169
Reg: Jul 15, 2012
Armidale
12,190
like
08/05/12 06:36 PM (13 years ago)
hmm, i can definately have a play with that - but it depends on what they would want as im pretty sure you already have the options to make the button menu vertical/horizontal anyway? Perhaps maybe having 2 rows of icons on the left instead of 3 - giving room for a side menu? all these ideas! all frustrating when you have a million of them but can only work on one at a time! Cheers, Dave
 
ATRAIN53
Code is Art
Profile
Posts: 1755
Reg: Nov 17, 2011
Chicago
26,450
like
08/06/12 07:42 AM (13 years ago)
Wow. Nice Work. Love this mod and appreciate the steps. I gotta play with this on a menu, great way to reclaim some valuable screen real estate!
 

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.