How make a menu and have sliding gestures..
ok I (Turborepu) posted on modaco, a detailed way to edit the menubar to get 3 or more buttons on the screen.. I will now finish that write up here since I see that it is being cataloged here..
Make the menubar have multiple buttons and slide gestures between them
Ok a few pages back i wrote something about this..
http://xdaforums.com/showpost.php?p=3687565&postcount=236 But now that the themeing(?) is really taking off, pehaps people will start being able to make/incorporate custom layout/pages into the shell.. I had at one time, 4 menu buttons on my proscreen, but reverted to the original since then. Mainly because i had just done it as a test to add swiping motions to the professional Screen..
OK.. this is for those who are willing to tinker with the xml and understand more or less what they are doing... Thanks to Windows Mobile, I learned how to tweak some xml.. I may never have tried this if it had not been for that. I had never had a reason/urge to try it.
Like my other post describing how to add three buttons, or more.. you will be able to do that here, BUT you will also be able to slide left or right between the items on your menu just like on the call log/favcontacts/spbcontacts menu.
You need to look at the menubarcontacts.xml file and the menubar.xml file..
as with the previous write up on modaco, you can save your new menu file as what ever you like.. maybe menubarslide.xml. or xdaftw.xml.. it doesnt matter, what is important is that you then edit any page that needs to use that menu, by changing the value at the top to be "<Layer Name="Menu" Dialog="
MenuBarslide" />" or whatever you named your new menu file.. this will allow you to keep the original files in place incase you need to revert to them if there is a problem.. and it will make it easy to share your mod with the community.
As an example lets say you wanted to make the menu on the bottom of the screen like i had on my omnia in this pic.
Just the layout from left to right, (my icons do not represent the actual pages because i did not skin them, so just because it looks like the call log icon on that pic does mean it went to the call log page.. I had from left to right, time, home, fave contacts, weather) not the part where it has no background behind the buttons.
Basically what i did, was rename the menubarcontacts.xml file to my liking, and worked on that. Here is the important thing to notice on that file.
"- <Plugin Class="Spb.LSP.MenuBar" Name="CallLog" ID="10">
<String Name="Open" Value=":CALLLOG" />
<String Name="OpenL" Value=":CONTACTS" />
<String Name="OpenR" Value=":FAVORITES" />
<Int Name="isActive" Value="1" />
<Int Name="Replace" Value="1" />
<String Name="Backgrd" Value="MenuBackgrd" />
<String Name="Icons" Value="Icons" />
<Rect Name="SrcIcon" X="0" Y="0" Width="48" Height="50" />
</Plugin>
- <Plugin Class="Spb.LSP.MenuBar" Name="Favorites" ID="11">
<String Name="Open" Value=":FAVORITES" />
<String Name="OpenL" Value=":CALLLOG" />
<String Name="OpenR" Value=":CONTACTS" />
<Int Name="isActive" Value="1" />
<Int Name="Replace" Value="1" />
<String Name="Backgrd" Value="MenuBackgrd" />
<String Name="Icons" Value="Icons" />
<Rect Name="SrcIcon" X="0" Y="50" Width="48" Height="50" />
</Plugin>
- <Plugin Class="Spb.LSP.MenuBar" Name="Contacts" ID="12">
<String Name="Open" Value=":CONTACTS" />
<String Name="OpenL" Value=":FAVORITES" />
<String Name="OpenR" Value=":CALLLOG" />
<Int Name="isActive" Value="1" />
<Int Name="Replace" Value="1" />
<String Name="Backgrd" Value="MenuBackgrd" />
<String Name="Icons" Value="Icons" />
<Rect Name="SrcIcon" X="0" Y="100" Width="48" Height="50" />
</Plugin>"
This refers to the buttons on the existing spb call log/favcontacts/spbcontacts pages. If you notice, for the button called calllog, you will see the values open and openl openr. so that basically means that when you press that button, you get call log, and when you are on calllog, and you swipe left(openl) or swipe right(openr) you get that page to show. in this case contacts for left , favorites for right.
So the first order of business was to add/edit these for however many menu pages i want. the same rules apply it like the other write up.. any plugin you add to the bottom of this list will be on top of previous buttons if they happen to overlap. For my menu I was removing the calllog and contacts from this list, so you can delete those entries.(note: that if you remove these from this menu, and you want them to be independant pages, like times and weather are normally, you will need to make the calllog.xml and spbcontacts.xml files use menubar2 instead of menubarcontacts. Then you can get to them from the panels/carousel page and they will have the close button.) Then you need to add the entries for the pages you want on your menu. For this example I added Home, time and weather.
like this:
"- <Plugin Class="Spb.LSP.MenuBar"
Name="Home" ID="
13">
<String Name="Open" Value=":HOME" />
<String Name="OpenL" Value=":CONTACTS" />
<String Name="OpenR" Value=":FAVORITES" />
<Int Name="isActive" Value="1" />
<Int Name="Replace" Value="1" />
<String Name="Backgrd" Value="MenuBackgrd" />
<String Name="Icons" Value="Icons" />
<Rect Name="SrcIcon" X="0" Y="0" Width="48" Height="50" />
</Plugin>"
.. do this for the other 2 pages too..
once you have all the items on the list you need to figure out the order you want them to show on your screen, and edit the values to reflect that layout.
"- <Plugin Class="Spb.LSP.MenuBar"
Name="Home" ID="
13">
<String Name="Open" Value=":HOME" />
<String Name="OpenL" Value=":TIME" />
<String Name="OpenR" Value=":FAVORITES" />
<Int Name="isActive" Value="1" />
<Int Name="Replace" Value="1" />
<String Name="Backgrd" Value="MenuBackgrd" />
<String Name="Icons" Value="Icons" />
<Rect Name="SrcIcon" X="0" Y="0" Width="48" Height="50" />
</Plugin>"
Do that for all the buttons, you can draw out the pages on a piece of paper or something to keep track of how you need to edit that order.
Then you are ready to play with the actual layouts. BUT if you want to skin the buttons you will find the images in "qa_misc_now.dat" or their respective equivalents for the other resolutions.
" <String Name="Icons"
Value="Icons" />
<Rect Name="SrcIcon"
X="0" Y="0" Width="48" Height="50" />"
seems to refer to the name/place in the icons image file that your icon is located on. So technically you could edit the existing file, or make a new one in the qa_misc_now.dat, and adjust the values here. The y value is the location down on the bitmap that this particular icon is on. since the icons in that image file are 50 pixels tall, if you need the 3rd one down on that image, you would put Y="100", the fourth would be 150.. the little house icon is 300..