Here's what I did in my additional skin option for battery widget.. I'll try to explain what I've done in my own understanding..
Note:
%INSTALLDIR% is where you've install the SPB Mobile Shell..
Make sure you have a backup of your reg file before trying anything so if anything happens you can revert it back..
1. Copy the SpbShellBackup.reg in %INSTALLDIR%\Private\20028b16 to PC..
2. Open SpbShellBackup.reg with a notepad(right-click -> Edit)..
3. Search this line "[\Software\Spb Software House\Shared\Spb Menu\WidgetPackages\Spb.Widgets\Battery]".. This is the registry entry for the Battery Widget.. It consists of keys(Class,PluginClass,Index etc..) and values..
4. Added this line below that registry entry..
Code:
[\Software\Spb Software House\Shared\Spb Menu\WidgetPackages\Spb.Widgets\Battery.Android]
Class=s42006100740074006500720079002E0041006E00640072006F00690064003A005700690064006700650074007300
Index=4
PluginClass=s5300700062002E004C00530050002E004200610074007400650072007900
Size=s41006E00640072006F0069006400
Explanation of code above:
Quote
The first line indicates the registry key of the new skin widget.. The last part of the line Battery.Android is like Widget.SkinName.. So you can do the same in other widget like Link.Text..
The second line indicates the Plugin Name to be used..
The value "s42006100740074006500720079002E0041006E00640072006F00690064003A005700690064006700650074007300"
s means String??
the numbers next to it is in Hexadecimal Format so if we convert it to String the value is "Battery.Android:Widgets"
Battery.Android is the Plugin Name and the Widgets is the xml file where we can found the Battery.Android plugin..
The third line indicates the index of the widget skin..
The fourth line indicates the Class File to be used..
The value is also in Hexadecimal Format.. in String --> "Spb.LSP.Battery"
If we look at the plugin entry in Widgets.xml
<Plugin Name="Battery.Android" Extends="Battery"
Our plugin Battery.Android extends the Battery plugin and the Battery plugin uses the class "Spb.LSP.Battery"
<Plugin Name="Battery" Class="Spb.LSP.Battery"
That's why the value of the PluginClass is "Spb.LSP.Battery"..
The last line indicates the skin name to be displayed..
Same as the other entry, it is in Hexadecimal Format.. the equivalent String value is "Android"
So if you're going to create your own skin options..
make sure the value of the keys(except the Index key) begins with letter s then hexadecimal value of the value you will use.. (When I converted my string value to hexadecimal, i did not get the two zeros just like the format of other registry entry.. so what I did is insert two zeros every two digits)
5. Open the Widgets.xml in qa_layouts.dat
6. Added this line in <Layout Name="Default">
<Plugins>
Code:
<Plugin Name="Battery.Android" Extends="Battery" DoubleSkin="va_battery_android" BoldFont="n">
<BoundRect X="0" Y="0" Width="60" Height="70"/>
<Rect Name="IconRect" X="6" Y="4" Width="48" Height="44"/>
<Rect Name="TextRect" X="2" Y="51" Width="60" Height="12"/>
</Plugin>
the DoubleSkin is the .dat file where the images to be used..
the other values are self explanatory.. same like modding the other skins of spbshell..
7. Added this line in <Layout Name="360x640">
<Plugins Extends="Default">
Code:
<Plugin Name="Battery.Android">
<BoundRect X="0" Y="0" Width="90" Height="90"/>
<Rect Name="IconRect" X="9" Y="5" Width="72" Height="60"/>
<Rect Name="TextRect" X="3" Y="71" Width="84" Height="15"/>
</Plugin>
8. Delete the spbshell reg(SpbShell_20028b16.reg) found in C:\system\apps..
9. Replace the SpbShellBackup.reg in %INSTALLDIR%\Private\20028b1 with your edited SpbShellBackup.reg..
10. Copy the qa_layouts.dat(with modified Widgets.xml) and va_battery_android.dat(see attached file) to %INSTALLDIR%\data\others\SPBShell
11. Restart SPB Mobile Shell..
You can now see the new skin option when you change the skin of the Battery Widget..
Enjoy! Wink
Kindly send me a PM if you have questions, suggestions, comments or requests..
Thank you for reading! Cheesy
regards,
Kkodai