diff --git a/data.cpp b/data.cpp
index 0d490a97..230ac73e 100644
--- a/data.cpp
+++ b/data.cpp
@@ -583,7 +583,9 @@ void DataManager::SetDefaultValues()
mConstValues.insert(make_pair(TW_VERSION_VAR, TW_VERSION_STR));
mValues.insert(make_pair("tw_storage_path", make_pair("/", 1)));
- mValues.insert(make_pair("tw_vibrate", make_pair("80", 1)));
+ mValues.insert(make_pair("tw_button_vibrate", make_pair("80", 1)));
+ mValues.insert(make_pair("tw_keyboard_vibrate", make_pair("40", 1)));
+ mValues.insert(make_pair("tw_action_vibrate", make_pair("160", 1)));
#ifdef TW_FORCE_CPUINFO_FOR_DEVICE_ID
printf("TW_FORCE_CPUINFO_FOR_DEVICE_ID := true\n");
diff --git a/gui/action.cpp b/gui/action.cpp
index 8539386a..9c785d16 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 ca386bee..b14e6754 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 569a5bd1..f1ec1443 100755
--- a/gui/devices/1024x600/res/ui.xml
+++ b/gui/devices/1024x600/res/ui.xml
@@ -2428,6 +2428,24 @@
timezone
+
+
+
+
-
-
+
+
+
+
+ Restore Defaults
+
+
+
+
+
+
+
+
+ Vibration Duration
+
+ Vibrate
+
+
@@ -2437,15 +2455,6 @@
screen
-
-
-
-
- Restore Defaults
-
-
-
-
main
@@ -2652,6 +2661,52 @@
+
+
+
+
+
+
+ Vibration Settings :
+
+
+
+
+
+ Button Vibration:
+
+
+
+
+
+
+
+ Keyboard Vibration:
+
+
+
+
+
+
+
+ Action Vibration:
+
+
+
+
+
+
+ main
+
+
+
+
+ settings
+
+
+
+
+
diff --git a/gui/devices/1080x1920/res/ui.xml b/gui/devices/1080x1920/res/ui.xml
index 0f61faca..15b98787 100644
--- a/gui/devices/1080x1920/res/ui.xml
+++ b/gui/devices/1080x1920/res/ui.xml
@@ -2684,8 +2684,24 @@
- Vibration Value :
-
+ Button Vibration:
+
+
+
+
+
+
+
+ Keyboard Vibration:
+
+
+
+
+
+
+
+ Action Vibration:
+
diff --git a/gui/devices/1200x1920/res/ui.xml b/gui/devices/1200x1920/res/ui.xml
index a83c30bb..c77c3414 100644
--- a/gui/devices/1200x1920/res/ui.xml
+++ b/gui/devices/1200x1920/res/ui.xml
@@ -2459,7 +2459,16 @@
-
+
+
+
+ Vibration Duration
+
+ Vibrate
+
+
+
+
Restore Defaults
@@ -2666,6 +2675,52 @@
+
+
+
+
+
+
+ Vibration Settings :
+
+
+
+
+
+ Button Vibration:
+
+
+
+
+
+
+
+ Keyboard Vibration:
+
+
+
+
+
+
+
+ Action Vibration:
+
+
+
+
+
+
+ main
+
+
+
+
+ settings
+
+
+
+
+
diff --git a/gui/devices/1280x800/res/ui.xml b/gui/devices/1280x800/res/ui.xml
index 115a391e..dbfcd60c 100644
--- a/gui/devices/1280x800/res/ui.xml
+++ b/gui/devices/1280x800/res/ui.xml
@@ -2428,6 +2428,24 @@
timezone
+
+
+
+
+ Restore Defaults
+
+
+
+
+
+
+
+
+ Vibration Duration
+
+ Vibrate
+
+
@@ -2437,15 +2455,6 @@
screen
-
-
-
-
- Restore Defaults
-
-
-
-
main
@@ -2652,6 +2661,52 @@
+
+
+
+
+
+
+ Vibration Settings :
+
+
+
+
+
+ Button Vibration:
+
+
+
+
+
+
+
+ Keyboard Vibration:
+
+
+
+
+
+
+
+ Action Vibration:
+
+
+
+
+
+
+ main
+
+
+
+
+ settings
+
+
+
+
+
diff --git a/gui/devices/1920x1200/res/ui.xml b/gui/devices/1920x1200/res/ui.xml
index fb615c13..e4bfd692 100644
--- a/gui/devices/1920x1200/res/ui.xml
+++ b/gui/devices/1920x1200/res/ui.xml
@@ -2428,6 +2428,24 @@
timezone
+
+
+
+
+ Restore Defaults
+
+
+
+
+
+
+
+
+ Vibration Duration
+
+ Vibrate
+
+
@@ -2437,15 +2455,6 @@
screen
-
-
-
-
- Restore Defaults
-
-
-
-
main
@@ -2652,6 +2661,52 @@
+
+
+
+
+
+
+ Vibration Settings :
+
+
+
+
+
+ Button Vibration:
+
+
+
+
+
+
+
+ Keyboard Vibration:
+
+
+
+
+
+
+
+ Action Vibration:
+
+
+
+
+
+
+ main
+
+
+
+
+ settings
+
+
+
+
+
diff --git a/gui/devices/2560x1600/res/ui.xml b/gui/devices/2560x1600/res/ui.xml
index 9ce330a4..f53f7b41 100644
--- a/gui/devices/2560x1600/res/ui.xml
+++ b/gui/devices/2560x1600/res/ui.xml
@@ -2428,6 +2428,24 @@
timezone
+
+
+
+
+ Restore Defaults
+
+
+
+
+
+
+
+
+ Vibration Duration
+
+ Vibrate
+
+
@@ -2437,15 +2455,6 @@
screen
-
-
-
-
- Restore Defaults
-
-
-
-
main
@@ -2652,6 +2661,52 @@
+
+
+
+
+
+
+ Vibration Settings :
+
+
+
+
+
+ Button Vibration:
+
+
+
+
+
+
+
+ Keyboard Vibration:
+
+
+
+
+
+
+
+ Action Vibration:
+
+
+
+
+
+
+ main
+
+
+
+
+ settings
+
+
+
+
+
diff --git a/gui/devices/320x480/res/ui.xml b/gui/devices/320x480/res/ui.xml
index dbee885a..9f0d5a39 100644
--- a/gui/devices/320x480/res/ui.xml
+++ b/gui/devices/320x480/res/ui.xml
@@ -2443,7 +2443,16 @@
-
+
+
+
+ Vibration Duration
+
+ Vibrate
+
+
+
+
Restore Defaults
@@ -2650,6 +2659,52 @@
+
+
+
+
+
+
+ Vibration Settings :
+
+
+
+
+
+ Button Vibration:
+
+
+
+
+
+
+
+ Keyboard Vibration:
+
+
+
+
+
+
+
+ Action Vibration:
+
+
+
+
+
+
+ main
+
+
+
+
+ settings
+
+
+
+
+
diff --git a/gui/devices/480x800/res/ui.xml b/gui/devices/480x800/res/ui.xml
index bb90e70b..416f6b94 100644
--- a/gui/devices/480x800/res/ui.xml
+++ b/gui/devices/480x800/res/ui.xml
@@ -2443,7 +2443,16 @@
-
+
+
+
+ Vibration Duration
+
+ Vibrate
+
+
+
+
Restore Defaults
@@ -2650,6 +2659,52 @@
+
+
+
+
+
+
+ Vibration Settings :
+
+
+
+
+
+ Button Vibration:
+
+
+
+
+
+
+
+ Keyboard Vibration:
+
+
+
+
+
+
+
+ Action Vibration:
+
+
+
+
+
+
+ main
+
+
+
+
+ settings
+
+
+
+
+
diff --git a/gui/devices/480x854/res/ui.xml b/gui/devices/480x854/res/ui.xml
index 08c3ddcf..687300ab 100644
--- a/gui/devices/480x854/res/ui.xml
+++ b/gui/devices/480x854/res/ui.xml
@@ -2442,7 +2442,16 @@
-
+
+
+
+ Vibration Duration
+
+ Vibrate
+
+
+
+
Restore Defaults
@@ -2649,6 +2658,52 @@
+
+
+
+
+
+
+ Vibration Settings :
+
+
+
+
+
+ Button Vibration:
+
+
+
+
+
+
+
+ Keyboard Vibration:
+
+
+
+
+
+
+
+ Action Vibration:
+
+
+
+
+
+
+ main
+
+
+
+
+ settings
+
+
+
+
+
diff --git a/gui/devices/540x960/res/ui.xml b/gui/devices/540x960/res/ui.xml
index e03704ee..b11c3dc1 100644
--- a/gui/devices/540x960/res/ui.xml
+++ b/gui/devices/540x960/res/ui.xml
@@ -2443,7 +2443,16 @@
-
+
+
+
+ Vibration Duration
+
+ Vibrate
+
+
+
+
Restore Defaults
@@ -2650,6 +2659,52 @@
+
+
+
+
+
+
+ Vibration Settings :
+
+
+
+
+
+ Button Vibration:
+
+
+
+
+
+
+
+ Keyboard Vibration:
+
+
+
+
+
+
+
+ Action Vibration:
+
+
+
+
+
+
+ main
+
+
+
+
+ settings
+
+
+
+
+
diff --git a/gui/devices/720x1280/res/ui.xml b/gui/devices/720x1280/res/ui.xml
index c9a4c0a6..573bebde 100644
--- a/gui/devices/720x1280/res/ui.xml
+++ b/gui/devices/720x1280/res/ui.xml
@@ -2456,7 +2456,16 @@
-
+
+
+
+ Vibration Duration
+
+ Vibrate
+
+
+
+
Restore Defaults
@@ -2663,6 +2672,52 @@
+
+
+
+
+
+
+ Vibration Settings :
+
+
+
+
+
+ Button Vibration:
+
+
+
+
+
+
+
+ Keyboard Vibration:
+
+
+
+
+
+
+
+ Action Vibration:
+
+
+
+
+
+
+ main
+
+
+
+
+ settings
+
+
+
+
+
diff --git a/gui/devices/800x1280/res/ui.xml b/gui/devices/800x1280/res/ui.xml
index 9b7a0631..fd63d901 100755
--- a/gui/devices/800x1280/res/ui.xml
+++ b/gui/devices/800x1280/res/ui.xml
@@ -2444,7 +2444,16 @@
-
+
+
+
+ Vibration Duration
+
+ Vibrate
+
+
+
+
Restore Defaults
@@ -2651,6 +2660,52 @@
+
+
+
+
+
+
+ Vibration Settings :
+
+
+
+
+
+ Button Vibration:
+
+
+
+
+
+
+
+ Keyboard Vibration:
+
+
+
+
+
+
+
+ Action Vibration:
+
+
+
+
+
+
+ main
+
+
+
+
+ settings
+
+
+
+
+
diff --git a/gui/devices/800x480/res/ui.xml b/gui/devices/800x480/res/ui.xml
index 9c391b33..87a35438 100755
--- a/gui/devices/800x480/res/ui.xml
+++ b/gui/devices/800x480/res/ui.xml
@@ -2436,6 +2436,24 @@
timezone
+
+
+
+
+ Restore Defaults
+
+
+
+
+
+
+
+
+ Vibration Duration
+
+ Vibrate
+
+
@@ -2445,15 +2463,6 @@
screen
-
-
-
-
- Restore Defaults
-
-
-
-
main
@@ -2660,6 +2669,52 @@
+
+
+
+
+
+
+ Vibration Settings :
+
+
+
+
+
+ Button Vibration:
+
+
+
+
+
+
+
+ Keyboard Vibration:
+
+
+
+
+
+
+
+ Action Vibration:
+
+
+
+
+
+
+ main
+
+
+
+
+ settings
+
+
+
+
+
diff --git a/gui/keyboard.cpp b/gui/keyboard.cpp
index 97a980a4..36106c7c 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 3908b82a..af0c542d 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;