abouttreesummaryrefslogcommitdiff
path: root/srcs/juloo.keyboard2/KeyboardData.java
diff options
context:
space:
mode:
Diffstat (limited to 'srcs/juloo.keyboard2/KeyboardData.java')
-rw-r--r--srcs/juloo.keyboard2/KeyboardData.java26
1 files changed, 0 insertions, 26 deletions
diff --git a/srcs/juloo.keyboard2/KeyboardData.java b/srcs/juloo.keyboard2/KeyboardData.java
index 07b0c09..0b73b3d 100644
--- a/srcs/juloo.keyboard2/KeyboardData.java
+++ b/srcs/juloo.keyboard2/KeyboardData.java
@@ -93,7 +93,6 @@ class KeyboardData
public Key(XmlResourceParser parser) throws Exception
{
- downPointer = -1;
key0 = KeyValue.getKeyByName(parser.getAttributeValue(null, "key0"));
key1 = KeyValue.getKeyByName(parser.getAttributeValue(null, "key1"));
key2 = KeyValue.getKeyByName(parser.getAttributeValue(null, "key2"));
@@ -110,30 +109,5 @@ class KeyboardData
while (parser.next() != XmlResourceParser.END_TAG)
continue ;
}
-
- // TODO move it in Keyboard2View
- private static final float SUB_VALUE_DIST = 5f;
-
- public int downPointer;
- public KeyValue downValue;
- public float downX;
- public float downY;
-
- public KeyValue getDownValue(float x, float y)
- {
- x -= downX;
- y -= downY;
- if ((Math.abs(x) + Math.abs(y)) < SUB_VALUE_DIST)
- return (key0);
- if (x < 0)
- {
- if (y < 0)
- return ((key1 == null) ? key0 : key1);
- return ((key3 == null) ? key0 : key3);
- }
- else if (y < 0)
- return ((key2 == null) ? key0 : key2);
- return ((key4 == null) ? key0 : key4);
- }
}
}