diff options
Diffstat (limited to 'gui')
-rw-r--r-- | gui/action.cpp | 2 | ||||
-rw-r--r-- | gui/button.cpp | 2 | ||||
-rwxr-xr-x | gui/devices/1024x600/res/ui.xml | 67 | ||||
-rw-r--r-- | gui/devices/1024x768/res/ui.xml | 67 | ||||
-rw-r--r-- | gui/devices/1080x1920/res/ui.xml | 20 | ||||
-rw-r--r-- | gui/devices/1200x1920/res/ui.xml | 57 | ||||
-rw-r--r-- | gui/devices/1280x800/res/ui.xml | 67 | ||||
-rw-r--r-- | gui/devices/1920x1200/res/ui.xml | 67 | ||||
-rw-r--r-- | gui/devices/2560x1600/res/ui.xml | 67 | ||||
-rw-r--r-- | gui/devices/320x480/res/ui.xml | 57 | ||||
-rw-r--r-- | gui/devices/480x800/res/ui.xml | 57 | ||||
-rw-r--r-- | gui/devices/480x854/res/ui.xml | 57 | ||||
-rw-r--r-- | gui/devices/540x960/res/ui.xml | 57 | ||||
-rw-r--r-- | gui/devices/720x1280/res/ui.xml | 57 | ||||
-rwxr-xr-x | gui/devices/800x1280/res/ui.xml | 57 | ||||
-rwxr-xr-x | gui/devices/800x480/res/ui.xml | 67 | ||||
-rw-r--r-- | gui/keyboard.cpp | 4 | ||||
-rw-r--r-- | gui/slider.cpp | 5 |
18 files changed, 783 insertions, 51 deletions
diff --git a/gui/action.cpp b/gui/action.cpp index 8539386a0..9c785d169 100644 --- a/gui/action.cpp +++ b/gui/action.cpp @@ -348,7 +348,7 @@ void GUIAction::operation_end(const int operation_status, const int simulate) #endif time(&Stop); if ((int) difftime(Stop, Start) > 10) - DataManager::Vibrate("tw_vibrate"); + DataManager::Vibrate("tw_action_vibrate"); } int GUIAction::doAction(Action action, int isThreaded /* = 0 */) diff --git a/gui/button.cpp b/gui/button.cpp index ca386beed..b14e6754c 100644 --- a/gui/button.cpp +++ b/gui/button.cpp @@ -281,7 +281,7 @@ int GUIButton::NotifyTouch(TOUCH_STATE state, int x, int y) } else { if (last_state == 0) { last_state = 1; - DataManager::Vibrate("tw_vibrate"); + DataManager::Vibrate("tw_button_vibrate"); if (mButtonLabel != NULL) mButtonLabel->isHighlighted = true; if (mButtonImg != NULL) diff --git a/gui/devices/1024x600/res/ui.xml b/gui/devices/1024x600/res/ui.xml index 569a5bd1f..f1ec1443e 100755 --- a/gui/devices/1024x600/res/ui.xml +++ b/gui/devices/1024x600/res/ui.xml @@ -2430,20 +2430,29 @@ <object type="button"> <highlight color="%highlight_color%" /> - <placement x="%col4_x%" y="%row2_y%" /> + <placement x="%col2_x%" y="%row2_y%" /> <font resource="font" color="%button_text_color%" /> - <text>Screen</text> + <text>Restore Defaults</text> <image resource="main_button" /> - <action function="page">screen</action> + <action function="restoredefaultsettings"></action> </object> <object type="button"> <highlight color="%highlight_color%" /> - <placement x="%col_center_x%" y="%slider_y%" /> + <placement x="%col3_x%" y="%row2_y%" /> <font resource="font" color="%button_text_color%" /> - <text>Restore Defaults</text> + <text>Vibration Duration</text> <image resource="main_button" /> - <action function="restoredefaultsettings"></action> + <action function="page">Vibrate</action> + </object> + + <object type="button"> + <highlight color="%highlight_color%" /> + <placement x="%col4_x%" y="%row2_y%" /> + <font resource="font" color="%button_text_color%" /> + <text>Screen</text> + <image resource="main_button" /> + <action function="page">screen</action> </object> <object type="action"> @@ -2652,6 +2661,52 @@ <object type="template" name="footer" /> </page> + <page name="Vibrate"> + <object type="template" name="header" /> + + <object type="text" color="%text_color%"> + <font resource="font" /> + <placement x="%center_x%" y="%row1_text_y%" placement="5" /> + <text>Vibration Settings :</text> + </object> + + <object type="slidervalue"> + <placement x="slidervalue_x" y="%row3_text_y%" w="%slidervalue_w%" /> + <font resource="font" color="%text_color%" /> + <text>Button Vibration:</text> + <data variable="tw_button_vibrate" min="0" max="300" /> + <colors line="%slidervalue_line_clr%" slider="%slidervalue_slider_clr%" /> + </object> + + <object type="slidervalue"> + <placement x="slidervalue_x" y="%row7_text_y%" w="%slidervalue_w%" /> + <font resource="font" color="%text_color%" /> + <text>Keyboard Vibration:</text> + <data variable="tw_keyboard_vibrate" min="0" max="300" /> + <colors line="%slidervalue_line_clr%" slider="%slidervalue_slider_clr%" /> + </object> + + <object type="slidervalue"> + <placement x="slidervalue_x" y="%row11_text_y%" w="%slidervalue_w%" /> + <font resource="font" color="%text_color%" /> + <text>Action Vibration:</text> + <data variable="tw_action_vibrate" min="0" max="500" /> + <colors line="%slidervalue_line_clr%" slider="%slidervalue_slider_clr%" /> + </object> + + <object type="action"> + <touch key="home" /> + <action function="page">main</action> + </object> + + <object type="action"> + <touch key="back" /> + <action function="page">settings</action> + </object> + + <object type="template" name="footer" /> + </page> + <page name="advanced"> <object type="template" name="header" /> diff --git a/gui/devices/1024x768/res/ui.xml b/gui/devices/1024x768/res/ui.xml index 6f8797a74..73b531b4e 100644 --- a/gui/devices/1024x768/res/ui.xml +++ b/gui/devices/1024x768/res/ui.xml @@ -2430,20 +2430,29 @@ <object type="button"> <highlight color="%highlight_color%" /> - <placement x="%col4_x%" y="%row2_y%" /> + <placement x="%col2_x%" y="%row2_y%" /> <font resource="font" color="%button_text_color%" /> - <text>Screen</text> + <text>Restore Defaults</text> <image resource="main_button" /> - <action function="page">screen</action> + <action function="restoredefaultsettings"></action> </object> <object type="button"> <highlight color="%highlight_color%" /> - <placement x="%col_center_x%" y="%slider_y%" /> + <placement x="%col3_x%" y="%row2_y%" /> <font resource="font" color="%button_text_color%" /> - <text>Restore Defaults</text> + <text>Vibration Duration</text> <image resource="main_button" /> - <action function="restoredefaultsettings"></action> + <action function="page">Vibrate</action> + </object> + + <object type="button"> + <highlight color="%highlight_color%" /> + <placement x="%col4_x%" y="%row2_y%" /> + <font resource="font" color="%button_text_color%" /> + <text>Screen</text> + <image resource="main_button" /> + <action function="page">screen</action> </object> <object type="action"> @@ -2652,6 +2661,52 @@ <object type="template" name="footer" /> </page> + <page name="Vibrate"> + <object type="template" name="header" /> + + <object type="text" color="%text_color%"> + <font resource="font" /> + <placement x="%center_x%" y="%row1_text_y%" placement="5" /> + <text>Vibration Settings :</text> + </object> + + <object type="slidervalue"> + <placement x="slidervalue_x" y="%row3_text_y%" w="%slidervalue_w%" /> + <font resource="font" color="%text_color%" /> + <text>Button Vibration:</text> + <data variable="tw_button_vibrate" min="0" max="300" /> + <colors line="%slidervalue_line_clr%" slider="%slidervalue_slider_clr%" /> + </object> + + <object type="slidervalue"> + <placement x="slidervalue_x" y="%row7_text_y%" w="%slidervalue_w%" /> + <font resource="font" color="%text_color%" /> + <text>Keyboard Vibration:</text> + <data variable="tw_keyboard_vibrate" min="0" max="300" /> + <colors line="%slidervalue_line_clr%" slider="%slidervalue_slider_clr%" /> + </object> + + <object type="slidervalue"> + <placement x="slidervalue_x" y="%row11_text_y%" w="%slidervalue_w%" /> + <font resource="font" color="%text_color%" /> + <text>Action Vibration:</text> + <data variable="tw_action_vibrate" min="0" max="500" /> + <colors line="%slidervalue_line_clr%" slider="%slidervalue_slider_clr%" /> + </object> + + <object type="action"> + <touch key="home" /> + <action function="page">main</action> + </object> + + <object type="action"> + <touch key="back" /> + <action function="page">settings</action> + </object> + + <object type="template" name="footer" /> + </page> + <page name="advanced"> <object type="template" name="header" /> diff --git a/gui/devices/1080x1920/res/ui.xml b/gui/devices/1080x1920/res/ui.xml index 0f61faca7..15b98787b 100644 --- a/gui/devices/1080x1920/res/ui.xml +++ b/gui/devices/1080x1920/res/ui.xml @@ -2684,8 +2684,24 @@ <object type="slidervalue"> <placement x="col1_x" y="%row4_text_y%" w="%slidervalue_w%" /> <font resource="font" color="%text_color%" /> - <text>Vibration Value : </text> - <data variable="tw_vibrate" min="0" max="300" /> + <text>Button Vibration:</text> + <data variable="tw_button_vibrate" min="0" max="300" /> + <colors line="%slidervalue_line_clr%" slider="%slidervalue_slider_clr%" /> + </object> + + <object type="slidervalue"> + <placement x="col1_x" y="%row8_text_y%" w="%slidervalue_w%" /> + <font resource="font" color="%text_color%" /> + <text>Keyboard Vibration:</text> + <data variable="tw_keyboard_vibrate" min="0" max="300" /> + <colors line="%slidervalue_line_clr%" slider="%slidervalue_slider_clr%" /> + </object> + + <object type="slidervalue"> + <placement x="col1_x" y="%row12_text_y%" w="%slidervalue_w%" /> + <font resource="font" color="%text_color%" /> + <text>Action Vibration:</text> + <data variable="tw_action_vibrate" min="0" max="500" /> <colors line="%slidervalue_line_clr%" slider="%slidervalue_slider_clr%" /> </object> diff --git a/gui/devices/1200x1920/res/ui.xml b/gui/devices/1200x1920/res/ui.xml index a83c30bb7..c77c3414d 100644 --- a/gui/devices/1200x1920/res/ui.xml +++ b/gui/devices/1200x1920/res/ui.xml @@ -2459,7 +2459,16 @@ </object> <object type="button"> - <placement x="%col_center_x%" y="%row4_y%" /> + <highlight color="%highlight_color%" /> + <placement x="%col2_x%" y="%row4_y%" /> + <font resource="font" color="%button_text_color%" /> + <text>Vibration Duration</text> + <image resource="main_button" /> + <action function="page">Vibrate</action> + </object> + + <object type="button"> + <placement x="%col_x%" y="%row4_y%" /> <font resource="font" color="%button_text_color%" /> <text>Restore Defaults</text> <image resource="main_button" /> @@ -2666,6 +2675,52 @@ <object type="template" name="footer" /> </page> + <page name="Vibrate"> + <object type="template" name="header" /> + + <object type="text" color="%text_color%"> + <font resource="font" /> + <placement x="%center_x%" y="%row1_header_y%" placement="5" /> + <text>Vibration Settings :</text> + </object> + + <object type="slidervalue"> + <placement x="col1_x" y="%row4_text_y%" w="%slidervalue_w%" /> + <font resource="font" color="%text_color%" /> + <text>Button Vibration:</text> + <data variable="tw_button_vibrate" min="0" max="300" /> + <colors line="%slidervalue_line_clr%" slider="%slidervalue_slider_clr%" /> + </object> + + <object type="slidervalue"> + <placement x="col1_x" y="%row8_text_y%" w="%slidervalue_w%" /> + <font resource="font" color="%text_color%" /> + <text>Keyboard Vibration:</text> + <data variable="tw_keyboard_vibrate" min="0" max="300" /> + <colors line="%slidervalue_line_clr%" slider="%slidervalue_slider_clr%" /> + </object> + + <object type="slidervalue"> + <placement x="col1_x" y="%row12_text_y%" w="%slidervalue_w%" /> + <font resource="font" color="%text_color%" /> + <text>Action Vibration:</text> + <data variable="tw_action_vibrate" min="0" max="500" /> + <colors line="%slidervalue_line_clr%" slider="%slidervalue_slider_clr%" /> + </object> + + <object type="action"> + <touch key="home" /> + <action function="page">main</action> + </object> + + <object type="action"> + <touch key="back" /> + <action function="page">settings</action> + </object> + + <object type="template" name="footer" /> + </page> + <page name="advanced"> <object type="template" name="header" /> diff --git a/gui/devices/1280x800/res/ui.xml b/gui/devices/1280x800/res/ui.xml index 115a391eb..dbfcd60ca 100644 --- a/gui/devices/1280x800/res/ui.xml +++ b/gui/devices/1280x800/res/ui.xml @@ -2430,20 +2430,29 @@ <object type="button"> <highlight color="%highlight_color%" /> - <placement x="%col4_x%" y="%row2_y%" /> + <placement x="%col2_x%" y="%row2_y%" /> <font resource="font" color="%button_text_color%" /> - <text>Screen</text> + <text>Restore Defaults</text> <image resource="main_button" /> - <action function="page">screen</action> + <action function="restoredefaultsettings"></action> </object> <object type="button"> <highlight color="%highlight_color%" /> - <placement x="%col_center_x%" y="%slider_y%" /> + <placement x="%col3_x%" y="%row2_y%" /> <font resource="font" color="%button_text_color%" /> - <text>Restore Defaults</text> + <text>Vibration Duration</text> <image resource="main_button" /> - <action function="restoredefaultsettings"></action> + <action function="page">Vibrate</action> + </object> + + <object type="button"> + <highlight color="%highlight_color%" /> + <placement x="%col4_x%" y="%row2_y%" /> + <font resource="font" color="%button_text_color%" /> + <text>Screen</text> + <image resource="main_button" /> + <action function="page">screen</action> </object> <object type="action"> @@ -2652,6 +2661,52 @@ <object type="template" name="footer" /> </page> + <page name="Vibrate"> + <object type="template" name="header" /> + + <object type="text" color="%text_color%"> + <font resource="font" /> + <placement x="%center_x%" y="%row1_text_y%" placement="5" /> + <text>Vibration Settings :</text> + </object> + + <object type="slidervalue"> + <placement x="slidervalue_x" y="%row3_text_y%" w="%slidervalue_w%" /> + <font resource="font" color="%text_color%" /> + <text>Button Vibration:</text> + <data variable="tw_button_vibrate" min="0" max="300" /> + <colors line="%slidervalue_line_clr%" slider="%slidervalue_slider_clr%" /> + </object> + + <object type="slidervalue"> + <placement x="slidervalue_x" y="%row7_text_y%" w="%slidervalue_w%" /> + <font resource="font" color="%text_color%" /> + <text>Keyboard Vibration:</text> + <data variable="tw_keyboard_vibrate" min="0" max="300" /> + <colors line="%slidervalue_line_clr%" slider="%slidervalue_slider_clr%" /> + </object> + + <object type="slidervalue"> + <placement x="slidervalue_x" y="%row11_text_y%" w="%slidervalue_w%" /> + <font resource="font" color="%text_color%" /> + <text>Action Vibration:</text> + <data variable="tw_action_vibrate" min="0" max="500" /> + <colors line="%slidervalue_line_clr%" slider="%slidervalue_slider_clr%" /> + </object> + + <object type="action"> + <touch key="home" /> + <action function="page">main</action> + </object> + + <object type="action"> + <touch key="back" /> + <action function="page">settings</action> + </object> + + <object type="template" name="footer" /> + </page> + <page name="advanced"> <object type="template" name="header" /> diff --git a/gui/devices/1920x1200/res/ui.xml b/gui/devices/1920x1200/res/ui.xml index fb615c135..e4bfd6928 100644 --- a/gui/devices/1920x1200/res/ui.xml +++ b/gui/devices/1920x1200/res/ui.xml @@ -2430,20 +2430,29 @@ <object type="button"> <highlight color="%highlight_color%" /> - <placement x="%col4_x%" y="%row2_y%" /> + <placement x="%col2_x%" y="%row2_y%" /> <font resource="font" color="%button_text_color%" /> - <text>Screen</text> + <text>Restore Defaults</text> <image resource="main_button" /> - <action function="page">screen</action> + <action function="restoredefaultsettings"></action> </object> <object type="button"> <highlight color="%highlight_color%" /> - <placement x="%col_center_x%" y="%slider_y%" /> + <placement x="%col3_x%" y="%row2_y%" /> <font resource="font" color="%button_text_color%" /> - <text>Restore Defaults</text> + <text>Vibration Duration</text> <image resource="main_button" /> - <action function="restoredefaultsettings"></action> + <action function="page">Vibrate</action> + </object> + + <object type="button"> + <highlight color="%highlight_color%" /> + <placement x="%col4_x%" y="%row2_y%" /> + <font resource="font" color="%button_text_color%" /> + <text>Screen</text> + <image resource="main_button" /> + <action function="page">screen</action> </object> <object type="action"> @@ -2652,6 +2661,52 @@ <object type="template" name="footer" /> </page> + <page name="Vibrate"> + <object type="template" name="header" /> + + <object type="text" color="%text_color%"> + <font resource="font" /> + <placement x="%center_x%" y="%row1_text_y%" placement="5" /> + <text>Vibration Settings :</text> + </object> + + <object type="slidervalue"> + <placement x="slidervalue_x" y="%row3_text_y%" w="%slidervalue_w%" /> + <font resource="font" color="%text_color%" /> + <text>Button Vibration:</text> + <data variable="tw_button_vibrate" min="0" max="300" /> + <colors line="%slidervalue_line_clr%" slider="%slidervalue_slider_clr%" /> + </object> + + <object type="slidervalue"> + <placement x="slidervalue_x" y="%row7_text_y%" w="%slidervalue_w%" /> + <font resource="font" color="%text_color%" /> + <text>Keyboard Vibration:</text> + <data variable="tw_keyboard_vibrate" min="0" max="300" /> + <colors line="%slidervalue_line_clr%" slider="%slidervalue_slider_clr%" /> + </object> + + <object type="slidervalue"> + <placement x="slidervalue_x" y="%row11_text_y%" w="%slidervalue_w%" /> + <font resource="font" color="%text_color%" /> + <text>Action Vibration:</text> + <data variable="tw_action_vibrate" min="0" max="500" /> + <colors line="%slidervalue_line_clr%" slider="%slidervalue_slider_clr%" /> + </object> + + <object type="action"> + <touch key="home" /> + <action function="page">main</action> + </object> + + <object type="action"> + <touch key="back" /> + <action function="page">settings</action> + </object> + + <object type="template" name="footer" /> + </page> + <page name="advanced"> <object type="template" name="header" /> diff --git a/gui/devices/2560x1600/res/ui.xml b/gui/devices/2560x1600/res/ui.xml index 9ce330a44..f53f7b412 100644 --- a/gui/devices/2560x1600/res/ui.xml +++ b/gui/devices/2560x1600/res/ui.xml @@ -2430,20 +2430,29 @@ <object type="button"> <highlight color="%highlight_color%" /> - <placement x="%col4_x%" y="%row2_y%" /> + <placement x="%col2_x%" y="%row2_y%" /> <font resource="font" color="%button_text_color%" /> - <text>Screen</text> + <text>Restore Defaults</text> <image resource="main_button" /> - <action function="page">screen</action> + <action function="restoredefaultsettings"></action> </object> <object type="button"> <highlight color="%highlight_color%" /> - <placement x="%col_center_x%" y="%slider_y%" /> + <placement x="%col3_x%" y="%row2_y%" /> <font resource="font" color="%button_text_color%" /> - <text>Restore Defaults</text> + <text>Vibration Duration</text> <image resource="main_button" /> - <action function="restoredefaultsettings"></action> + <action function="page">Vibrate</action> + </object> + + <object type="button"> + <highlight color="%highlight_color%" /> + <placement x="%col4_x%" y="%row2_y%" /> + <font resource="font" color="%button_text_color%" /> + <text>Screen</text> + <image resource="main_button" /> + <action function="page">screen</action> </object> <object type="action"> @@ -2652,6 +2661,52 @@ <object type="template" name="footer" /> </page> + <page name="Vibrate"> + <object type="template" name="header" /> + + <object type="text" color="%text_color%"> + <font resource="font" /> + <placement x="%center_x%" y="%row1_text_y%" placement="5" /> + <text>Vibration Settings :</text> + </object> + + <object type="slidervalue"> + <placement x="slidervalue_x" y="%row3_text_y%" w="%slidervalue_w%" /> + <font resource="font" color="%text_color%" /> + <text>Button Vibration:</text> + <data variable="tw_button_vibrate" min="0" max="300" /> + <colors line="%slidervalue_line_clr%" slider="%slidervalue_slider_clr%" /> + </object> + + <object type="slidervalue"> + <placement x="slidervalue_x" y="%row7_text_y%" w="%slidervalue_w%" /> + <font resource="font" color="%text_color%" /> + <text>Keyboard Vibration:</text> + <data variable="tw_keyboard_vibrate" min="0" max="300" /> + <colors line="%slidervalue_line_clr%" slider="%slidervalue_slider_clr%" /> + </object> + + <object type="slidervalue"> + <placement x="slidervalue_x" y="%row11_text_y%" w="%slidervalue_w%" /> + <font resource="font" color="%text_color%" /> + <text>Action Vibration:</text> + <data variable="tw_action_vibrate" min="0" max="500" /> + <colors line="%slidervalue_line_clr%" slider="%slidervalue_slider_clr%" /> + </object> + + <object type="action"> + <touch key="home" /> + <action function="page">main</action> + </object> + + <object type="action"> + <touch key="back" /> + <action function="page">settings</action> + </object> + + <object type="template" name="footer" /> + </page> + <page name="advanced"> <object type="template" name="header" /> diff --git a/gui/devices/320x480/res/ui.xml b/gui/devices/320x480/res/ui.xml index dbee885a7..9f0d5a391 100644 --- a/gui/devices/320x480/res/ui.xml +++ b/gui/devices/320x480/res/ui.xml @@ -2443,7 +2443,16 @@ </object> <object type="button"> - <placement x="%col_center_x%" y="%row4_y%" /> + <highlight color="%highlight_color%" /> + <placement x="%col2_x%" y="%row4_y%" /> + <font resource="font" color="%button_text_color%" /> + <text>Vibration Duration</text> + <image resource="main_button" /> + <action function="page">Vibrate</action> + </object> + + <object type="button"> + <placement x="%col_x%" y="%row4_y%" /> <font resource="font" color="%button_text_color%" /> <text>Restore Defaults</text> <image resource="main_button" /> @@ -2650,6 +2659,52 @@ <object type="template" name="footer" /> </page> + <page name="Vibrate"> + <object type="template" name="header" /> + + <object type="text" color="%text_color%"> + <font resource="font" /> + <placement x="%center_x%" y="%row1_header_y%" placement="5" /> + <text>Vibration Settings :</text> + </object> + + <object type="slidervalue"> + <placement x="col1_x" y="%row4_text_y%" w="%slidervalue_w%" /> + <font resource="font" color="%text_color%" /> + <text>Button Vibration:</text> + <data variable="tw_button_vibrate" min="0" max="300" /> + <colors line="%slidervalue_line_clr%" slider="%slidervalue_slider_clr%" /> + </object> + + <object type="slidervalue"> + <placement x="col1_x" y="%row8_text_y%" w="%slidervalue_w%" /> + <font resource="font" color="%text_color%" /> + <text>Keyboard Vibration:</text> + <data variable="tw_keyboard_vibrate" min="0" max="300" /> + <colors line="%slidervalue_line_clr%" slider="%slidervalue_slider_clr%" /> + </object> + + <object type="slidervalue"> + <placement x="col1_x" y="%row12_text_y%" w="%slidervalue_w%" /> + <font resource="font" color="%text_color%" /> + <text>Action Vibration:</text> + <data variable="tw_action_vibrate" min="0" max="500" /> + <colors line="%slidervalue_line_clr%" slider="%slidervalue_slider_clr%" /> + </object> + + <object type="action"> + <touch key="home" /> + <action function="page">main</action> + </object> + + <object type="action"> + <touch key="back" /> + <action function="page">settings</action> + </object> + + <object type="template" name="footer" /> + </page> + <page name="advanced"> <object type="template" name="header" /> diff --git a/gui/devices/480x800/res/ui.xml b/gui/devices/480x800/res/ui.xml index bb90e70b4..416f6b941 100644 --- a/gui/devices/480x800/res/ui.xml +++ b/gui/devices/480x800/res/ui.xml @@ -2443,7 +2443,16 @@ </object> <object type="button"> - <placement x="%col_center_x%" y="%row4_y%" /> + <highlight color="%highlight_color%" /> + <placement x="%col2_x%" y="%row4_y%" /> + <font resource="font" color="%button_text_color%" /> + <text>Vibration Duration</text> + <image resource="main_button" /> + <action function="page">Vibrate</action> + </object> + + <object type="button"> + <placement x="%col_x%" y="%row4_y%" /> <font resource="font" color="%button_text_color%" /> <text>Restore Defaults</text> <image resource="main_button" /> @@ -2650,6 +2659,52 @@ <object type="template" name="footer" /> </page> + <page name="Vibrate"> + <object type="template" name="header" /> + + <object type="text" color="%text_color%"> + <font resource="font" /> + <placement x="%center_x%" y="%row1_header_y%" placement="5" /> + <text>Vibration Settings :</text> + </object> + + <object type="slidervalue"> + <placement x="col1_x" y="%row4_text_y%" w="%slidervalue_w%" /> + <font resource="font" color="%text_color%" /> + <text>Button Vibration:</text> + <data variable="tw_button_vibrate" min="0" max="300" /> + <colors line="%slidervalue_line_clr%" slider="%slidervalue_slider_clr%" /> + </object> + + <object type="slidervalue"> + <placement x="col1_x" y="%row8_text_y%" w="%slidervalue_w%" /> + <font resource="font" color="%text_color%" /> + <text>Keyboard Vibration:</text> + <data variable="tw_keyboard_vibrate" min="0" max="300" /> + <colors line="%slidervalue_line_clr%" slider="%slidervalue_slider_clr%" /> + </object> + + <object type="slidervalue"> + <placement x="col1_x" y="%row12_text_y%" w="%slidervalue_w%" /> + <font resource="font" color="%text_color%" /> + <text>Action Vibration:</text> + <data variable="tw_action_vibrate" min="0" max="500" /> + <colors line="%slidervalue_line_clr%" slider="%slidervalue_slider_clr%" /> + </object> + + <object type="action"> + <touch key="home" /> + <action function="page">main</action> + </object> + + <object type="action"> + <touch key="back" /> + <action function="page">settings</action> + </object> + + <object type="template" name="footer" /> + </page> + <page name="advanced"> <object type="template" name="header" /> diff --git a/gui/devices/480x854/res/ui.xml b/gui/devices/480x854/res/ui.xml index 08c3ddcfe..687300ab2 100644 --- a/gui/devices/480x854/res/ui.xml +++ b/gui/devices/480x854/res/ui.xml @@ -2442,7 +2442,16 @@ </object> <object type="button"> - <placement x="%col_center_x%" y="%row4_y%" /> + <highlight color="%highlight_color%" /> + <placement x="%col2_x%" y="%row4_y%" /> + <font resource="font" color="%button_text_color%" /> + <text>Vibration Duration</text> + <image resource="main_button" /> + <action function="page">Vibrate</action> + </object> + + <object type="button"> + <placement x="%col_x%" y="%row4_y%" /> <font resource="font" color="%button_text_color%" /> <text>Restore Defaults</text> <image resource="main_button" /> @@ -2649,6 +2658,52 @@ <object type="template" name="footer" /> </page> + <page name="Vibrate"> + <object type="template" name="header" /> + + <object type="text" color="%text_color%"> + <font resource="font" /> + <placement x="%center_x%" y="%row1_header_y%" placement="5" /> + <text>Vibration Settings :</text> + </object> + + <object type="slidervalue"> + <placement x="col1_x" y="%row4_text_y%" w="%slidervalue_w%" /> + <font resource="font" color="%text_color%" /> + <text>Button Vibration:</text> + <data variable="tw_button_vibrate" min="0" max="300" /> + <colors line="%slidervalue_line_clr%" slider="%slidervalue_slider_clr%" /> + </object> + + <object type="slidervalue"> + <placement x="col1_x" y="%row8_text_y%" w="%slidervalue_w%" /> + <font resource="font" color="%text_color%" /> + <text>Keyboard Vibration:</text> + <data variable="tw_keyboard_vibrate" min="0" max="300" /> + <colors line="%slidervalue_line_clr%" slider="%slidervalue_slider_clr%" /> + </object> + + <object type="slidervalue"> + <placement x="col1_x" y="%row12_text_y%" w="%slidervalue_w%" /> + <font resource="font" color="%text_color%" /> + <text>Action Vibration:</text> + <data variable="tw_action_vibrate" min="0" max="500" /> + <colors line="%slidervalue_line_clr%" slider="%slidervalue_slider_clr%" /> + </object> + + <object type="action"> + <touch key="home" /> + <action function="page">main</action> + </object> + + <object type="action"> + <touch key="back" /> + <action function="page">settings</action> + </object> + + <object type="template" name="footer" /> + </page> + <page name="advanced"> <object type="template" name="header" /> diff --git a/gui/devices/540x960/res/ui.xml b/gui/devices/540x960/res/ui.xml index e03704eef..b11c3dc13 100644 --- a/gui/devices/540x960/res/ui.xml +++ b/gui/devices/540x960/res/ui.xml @@ -2443,7 +2443,16 @@ </object> <object type="button"> - <placement x="%col_center_x%" y="%row4_y%" /> + <highlight color="%highlight_color%" /> + <placement x="%col2_x%" y="%row4_y%" /> + <font resource="font" color="%button_text_color%" /> + <text>Vibration Duration</text> + <image resource="main_button" /> + <action function="page">Vibrate</action> + </object> + + <object type="button"> + <placement x="%col_x%" y="%row4_y%" /> <font resource="font" color="%button_text_color%" /> <text>Restore Defaults</text> <image resource="main_button" /> @@ -2650,6 +2659,52 @@ <object type="template" name="footer" /> </page> + <page name="Vibrate"> + <object type="template" name="header" /> + + <object type="text" color="%text_color%"> + <font resource="font" /> + <placement x="%center_x%" y="%row1_header_y%" placement="5" /> + <text>Vibration Settings :</text> + </object> + + <object type="slidervalue"> + <placement x="col1_x" y="%row4_text_y%" w="%slidervalue_w%" /> + <font resource="font" color="%text_color%" /> + <text>Button Vibration:</text> + <data variable="tw_button_vibrate" min="0" max="300" /> + <colors line="%slidervalue_line_clr%" slider="%slidervalue_slider_clr%" /> + </object> + + <object type="slidervalue"> + <placement x="col1_x" y="%row8_text_y%" w="%slidervalue_w%" /> + <font resource="font" color="%text_color%" /> + <text>Keyboard Vibration:</text> + <data variable="tw_keyboard_vibrate" min="0" max="300" /> + <colors line="%slidervalue_line_clr%" slider="%slidervalue_slider_clr%" /> + </object> + + <object type="slidervalue"> + <placement x="col1_x" y="%row12_text_y%" w="%slidervalue_w%" /> + <font resource="font" color="%text_color%" /> + <text>Action Vibration:</text> + <data variable="tw_action_vibrate" min="0" max="500" /> + <colors line="%slidervalue_line_clr%" slider="%slidervalue_slider_clr%" /> + </object> + + <object type="action"> + <touch key="home" /> + <action function="page">main</action> + </object> + + <object type="action"> + <touch key="back" /> + <action function="page">settings</action> + </object> + + <object type="template" name="footer" /> + </page> + <page name="advanced"> <object type="template" name="header" /> diff --git a/gui/devices/720x1280/res/ui.xml b/gui/devices/720x1280/res/ui.xml index c9a4c0a69..573bebde6 100644 --- a/gui/devices/720x1280/res/ui.xml +++ b/gui/devices/720x1280/res/ui.xml @@ -2456,7 +2456,16 @@ </object> <object type="button"> - <placement x="%col_center_x%" y="%row4_y%" /> + <highlight color="%highlight_color%" /> + <placement x="%col2_x%" y="%row4_y%" /> + <font resource="font" color="%button_text_color%" /> + <text>Vibration Duration</text> + <image resource="main_button" /> + <action function="page">Vibrate</action> + </object> + + <object type="button"> + <placement x="%col_x%" y="%row4_y%" /> <font resource="font" color="%button_text_color%" /> <text>Restore Defaults</text> <image resource="main_button" /> @@ -2663,6 +2672,52 @@ <object type="template" name="footer" /> </page> + <page name="Vibrate"> + <object type="template" name="header" /> + + <object type="text" color="%text_color%"> + <font resource="font" /> + <placement x="%center_x%" y="%row1_header_y%" placement="5" /> + <text>Vibration Settings :</text> + </object> + + <object type="slidervalue"> + <placement x="col1_x" y="%row4_text_y%" w="%slidervalue_w%" /> + <font resource="font" color="%text_color%" /> + <text>Button Vibration:</text> + <data variable="tw_button_vibrate" min="0" max="300" /> + <colors line="%slidervalue_line_clr%" slider="%slidervalue_slider_clr%" /> + </object> + + <object type="slidervalue"> + <placement x="col1_x" y="%row8_text_y%" w="%slidervalue_w%" /> + <font resource="font" color="%text_color%" /> + <text>Keyboard Vibration:</text> + <data variable="tw_keyboard_vibrate" min="0" max="300" /> + <colors line="%slidervalue_line_clr%" slider="%slidervalue_slider_clr%" /> + </object> + + <object type="slidervalue"> + <placement x="col1_x" y="%row12_text_y%" w="%slidervalue_w%" /> + <font resource="font" color="%text_color%" /> + <text>Action Vibration:</text> + <data variable="tw_action_vibrate" min="0" max="500" /> + <colors line="%slidervalue_line_clr%" slider="%slidervalue_slider_clr%" /> + </object> + + <object type="action"> + <touch key="home" /> + <action function="page">main</action> + </object> + + <object type="action"> + <touch key="back" /> + <action function="page">settings</action> + </object> + + <object type="template" name="footer" /> + </page> + <page name="advanced"> <object type="template" name="header" /> diff --git a/gui/devices/800x1280/res/ui.xml b/gui/devices/800x1280/res/ui.xml index 9b7a06315..fd63d9015 100755 --- a/gui/devices/800x1280/res/ui.xml +++ b/gui/devices/800x1280/res/ui.xml @@ -2444,7 +2444,16 @@ </object> <object type="button"> - <placement x="%col_center_x%" y="%row4_y%" /> + <highlight color="%highlight_color%" /> + <placement x="%col2_x%" y="%row4_y%" /> + <font resource="font" color="%button_text_color%" /> + <text>Vibration Duration</text> + <image resource="main_button" /> + <action function="page">Vibrate</action> + </object> + + <object type="button"> + <placement x="%col_x%" y="%row4_y%" /> <font resource="font" color="%button_text_color%" /> <text>Restore Defaults</text> <image resource="main_button" /> @@ -2651,6 +2660,52 @@ <object type="template" name="footer" /> </page> + <page name="Vibrate"> + <object type="template" name="header" /> + + <object type="text" color="%text_color%"> + <font resource="font" /> + <placement x="%center_x%" y="%row1_header_y%" placement="5" /> + <text>Vibration Settings :</text> + </object> + + <object type="slidervalue"> + <placement x="col1_x" y="%row4_text_y%" w="%slidervalue_w%" /> + <font resource="font" color="%text_color%" /> + <text>Button Vibration:</text> + <data variable="tw_button_vibrate" min="0" max="300" /> + <colors line="%slidervalue_line_clr%" slider="%slidervalue_slider_clr%" /> + </object> + + <object type="slidervalue"> + <placement x="col1_x" y="%row8_text_y%" w="%slidervalue_w%" /> + <font resource="font" color="%text_color%" /> + <text>Keyboard Vibration:</text> + <data variable="tw_keyboard_vibrate" min="0" max="300" /> + <colors line="%slidervalue_line_clr%" slider="%slidervalue_slider_clr%" /> + </object> + + <object type="slidervalue"> + <placement x="col1_x" y="%row12_text_y%" w="%slidervalue_w%" /> + <font resource="font" color="%text_color%" /> + <text>Action Vibration:</text> + <data variable="tw_action_vibrate" min="0" max="500" /> + <colors line="%slidervalue_line_clr%" slider="%slidervalue_slider_clr%" /> + </object> + + <object type="action"> + <touch key="home" /> + <action function="page">main</action> + </object> + + <object type="action"> + <touch key="back" /> + <action function="page">settings</action> + </object> + + <object type="template" name="footer" /> + </page> + <page name="advanced"> <object type="template" name="header" /> diff --git a/gui/devices/800x480/res/ui.xml b/gui/devices/800x480/res/ui.xml index 9c391b33e..87a354389 100755 --- a/gui/devices/800x480/res/ui.xml +++ b/gui/devices/800x480/res/ui.xml @@ -2438,20 +2438,29 @@ <object type="button"> <highlight color="%highlight_color%" /> - <placement x="%col4_x%" y="%row2_y%" /> + <placement x="%col2_x%" y="%row2_y%" /> <font resource="font" color="%button_text_color%" /> - <text>Screen</text> + <text>Restore Defaults</text> <image resource="main_button" /> - <action function="page">screen</action> + <action function="restoredefaultsettings"></action> </object> <object type="button"> <highlight color="%highlight_color%" /> - <placement x="%col_center_x%" y="%slider_y%" /> + <placement x="%col3_x%" y="%row2_y%" /> <font resource="font" color="%button_text_color%" /> - <text>Restore Defaults</text> + <text>Vibration Duration</text> <image resource="main_button" /> - <action function="restoredefaultsettings"></action> + <action function="page">Vibrate</action> + </object> + + <object type="button"> + <highlight color="%highlight_color%" /> + <placement x="%col4_x%" y="%row2_y%" /> + <font resource="font" color="%button_text_color%" /> + <text>Screen</text> + <image resource="main_button" /> + <action function="page">screen</action> </object> <object type="action"> @@ -2660,6 +2669,52 @@ <object type="template" name="footer" /> </page> + <page name="Vibrate"> + <object type="template" name="header" /> + + <object type="text" color="%text_color%"> + <font resource="font" /> + <placement x="%center_x%" y="%row1_text_y%" placement="5" /> + <text>Vibration Settings :</text> + </object> + + <object type="slidervalue"> + <placement x="slidervalue_x" y="%row3_text_y%" w="%slidervalue_w%" /> + <font resource="font" color="%text_color%" /> + <text>Button Vibration:</text> + <data variable="tw_button_vibrate" min="0" max="300" /> + <colors line="%slidervalue_line_clr%" slider="%slidervalue_slider_clr%" /> + </object> + + <object type="slidervalue"> + <placement x="slidervalue_x" y="%row7_text_y%" w="%slidervalue_w%" /> + <font resource="font" color="%text_color%" /> + <text>Keyboard Vibration:</text> + <data variable="tw_keyboard_vibrate" min="0" max="300" /> + <colors line="%slidervalue_line_clr%" slider="%slidervalue_slider_clr%" /> + </object> + + <object type="slidervalue"> + <placement x="slidervalue_x" y="%row11_text_y%" w="%slidervalue_w%" /> + <font resource="font" color="%text_color%" /> + <text>Action Vibration:</text> + <data variable="tw_action_vibrate" min="0" max="500" /> + <colors line="%slidervalue_line_clr%" slider="%slidervalue_slider_clr%" /> + </object> + + <object type="action"> + <touch key="home" /> + <action function="page">main</action> + </object> + + <object type="action"> + <touch key="back" /> + <action function="page">settings</action> + </object> + + <object type="template" name="footer" /> + </page> + <page name="advanced"> <object type="template" name="header" /> diff --git a/gui/keyboard.cpp b/gui/keyboard.cpp index 97a980a4e..36106c7c1 100644 --- a/gui/keyboard.cpp +++ b/gui/keyboard.cpp @@ -389,7 +389,6 @@ int GUIKeyboard::NotifyTouch(TOUCH_STATE state, int x, int y) switch (state) { case TOUCH_START: - DataManager::Vibrate("tw_vibrate"); if (GetSelection(x, y) == 0) { startSelection = -1; was_held = 0; @@ -421,7 +420,6 @@ int GUIKeyboard::NotifyTouch(TOUCH_STATE state, int x, int y) if (highlightRenderCount != 0) mRendered = false; highlightRenderCount = 0; - DataManager::Vibrate("tw_vibrate"); startSelection = 0; } break; @@ -478,6 +476,7 @@ int GUIKeyboard::NotifyTouch(TOUCH_STATE state, int x, int y) startSelection = 0; break; } else if (state == TOUCH_RELEASE && was_held == 0) { + DataManager::Vibrate("tw_keyboard_vibrate"); if ((int)keyboard_keys[currentLayout - 1][rowIndex][indexx].key < KEYBOARD_SPECIAL_KEYS && (int)keyboard_keys[currentLayout - 1][rowIndex][indexx].key > 0) { // Regular key PageManager::NotifyKeyboard(keyboard_keys[currentLayout - 1][rowIndex][indexx].key); @@ -503,6 +502,7 @@ int GUIKeyboard::NotifyTouch(TOUCH_STATE state, int x, int y) PageManager::NotifyKeyboard(keyboard_keys[currentLayout - 1][rowIndex][indexx].key); } else if ((int)keyboard_keys[currentLayout - 1][rowIndex][indexx].longpresskey < KEYBOARD_SPECIAL_KEYS && (int)keyboard_keys[currentLayout - 1][rowIndex][indexx].longpresskey > 0) { // Long Press Key + DataManager::Vibrate("tw_keyboard_vibrate"); PageManager::NotifyKeyboard(keyboard_keys[currentLayout - 1][rowIndex][indexx].longpresskey); } } else if (state == TOUCH_REPEAT) { diff --git a/gui/slider.cpp b/gui/slider.cpp index 3908b82ab..af0c542de 100644 --- a/gui/slider.cpp +++ b/gui/slider.cpp @@ -154,12 +154,13 @@ int GUISlider::NotifyTouch(TOUCH_STATE state, int x, int y) break; case TOUCH_RELEASE: - DataManager::Vibrate("tw_button_vibrate"); if (!dragging) return 0; - if (sCurTouchX >= mRenderX + mRenderW - sTouchW) + if (sCurTouchX >= mRenderX + mRenderW - sTouchW) { + DataManager::Vibrate("tw_button_vibrate"); sAction->doActions(); + } sCurTouchX = mRenderX; dragging = false; |