From 13252fbbb7e91185f773f5f135d2393f10dd328b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Drahom=C3=ADr=20Karch=C5=88=C3=A1k?=
 <drahomir.karchnak@nic.cz>
Date: Thu, 16 Jun 2016 11:21:25 +0200
Subject: [PATCH] #360 Added "Use your finger to sign" text above signature
 dialog...

---
 .../nic/tablexia/screen/createuser/FormScreen.java  | 13 +++++++++++--
 .../screen/createuser/FormScreenAssets.java         |  1 +
 .../screen/createuser/form/FormActorsLayout.java    |  4 +++-
 3 files changed, 15 insertions(+), 3 deletions(-)

diff --git a/core/src/cz/nic/tablexia/screen/createuser/FormScreen.java b/core/src/cz/nic/tablexia/screen/createuser/FormScreen.java
index 0c874fd0e..58887265a 100644
--- a/core/src/cz/nic/tablexia/screen/createuser/FormScreen.java
+++ b/core/src/cz/nic/tablexia/screen/createuser/FormScreen.java
@@ -68,6 +68,7 @@ import cz.nic.tablexia.util.ui.dialog.TablexiaComponentDialogFactory;
 import cz.nic.tablexia.util.ui.dialog.components.AdaptiveSizeDialogComponent;
 import cz.nic.tablexia.util.ui.dialog.components.CenterPositionDialogComponent;
 import cz.nic.tablexia.util.ui.dialog.components.DimmerDialogComponent;
+import cz.nic.tablexia.util.ui.dialog.components.DividerContentDialogComponent;
 import cz.nic.tablexia.util.ui.dialog.components.FixedSpaceContentDialogComponent;
 import cz.nic.tablexia.util.ui.dialog.components.ResizableSpaceContentDialogComponent;
 import cz.nic.tablexia.util.ui.dialog.components.SpeechDialogComponent;
@@ -80,9 +81,10 @@ import cz.nic.tablexia.util.ui.dialog.components.ViewportMaximumSizeComponent;
 public class FormScreen extends AbstractTablexiaScreen<Void> {
     //TODO - Get rid of all magic values and strings in the code (Use constants)
 
-    private static final Color                              TEXT_COLOR                      = Color.BLACK;
+    private static final Color                                  TEXT_COLOR                      = Color.BLACK;
     private static final ApplicationFontManager.FontType_NEW    TEXT_14                         = ApplicationFontManager.FontType_NEW.REGULAR_14;
     private static final ApplicationFontManager.FontType_NEW    TEXT_20                         = ApplicationFontManager.FontType_NEW.REGULAR_20;
+    private static final ApplicationFontManager.FontType_NEW    TEXT_26                         = ApplicationFontManager.FontType_NEW.REGULAR_26;
 
     private static final int    DEFAULT_USER_AGE                = 10;
     private static final int    MAX_USER_AGE                    = 99;
@@ -286,7 +288,7 @@ public class FormScreen extends AbstractTablexiaScreen<Void> {
         // signature pen needs to be below pen and stamp
         signaturePane = new SignaturePane();
         group.addActor(signaturePane);
-        signaturePane.setBounds(getSceneWidth() / 2, getSceneInnerHeight() * FormActorsLayout.SIGNATURE_PANE_Y, getSceneInnerHeight() / 2, getSceneInnerHeight() * FormActorsLayout.SIGNATURE_PANE_HEIGHT);
+        signaturePane.setBounds(getSceneWidth() * FormActorsLayout.SIGNATURE_PANE_X, getSceneInnerHeight() * FormActorsLayout.SIGNATURE_PANE_Y, getSceneWidth() * FormActorsLayout.SIGNATURE_PANE_WIDTH, getSceneInnerHeight() * FormActorsLayout.SIGNATURE_PANE_HEIGHT);
 
         signaturePane.setDebug(TablexiaSettings.getInstance().isShowBoundingBoxes());
 
@@ -571,6 +573,13 @@ public class FormScreen extends AbstractTablexiaScreen<Void> {
         adapters.add(new CenterPositionDialogComponent());
         adapters.add(new DimmerDialogComponent(0.7f));
 
+        //Signature title and spacers...
+        adapters.add(new FixedSpaceContentDialogComponent());
+        adapters.add(new TextContentDialogComponent(getText(FormScreenAssets.TEXT_FORM_SIGNATURE), TEXT_26));
+        adapters.add(new FixedSpaceContentDialogComponent());
+        adapters.add(new DividerContentDialogComponent());
+        adapters.add(new FixedSpaceContentDialogComponent());
+
         //Anonymous signature component
         adapters.add(new TablexiaDialogComponentAdapter() {
             //TODO 4 Desktop - Override sizeChanged?? Resize SignaturePane when resizing the window
diff --git a/core/src/cz/nic/tablexia/screen/createuser/FormScreenAssets.java b/core/src/cz/nic/tablexia/screen/createuser/FormScreenAssets.java
index edd99c107..af10e0316 100644
--- a/core/src/cz/nic/tablexia/screen/createuser/FormScreenAssets.java
+++ b/core/src/cz/nic/tablexia/screen/createuser/FormScreenAssets.java
@@ -42,6 +42,7 @@ public class FormScreenAssets {
     public static final String TEXT_FORM_SIGN       = "createuser_form_sign";
     public static final String TEXT_FORM_AGE        = "createuser_form_age";
     public static final String TEXT_FORM_GENDER     = "createuser_form_gender";
+    public static final String TEXT_FORM_SIGNATURE  = "createuser_form_signature";
 
 
     ///// MUSIC ASSETS
diff --git a/core/src/cz/nic/tablexia/screen/createuser/form/FormActorsLayout.java b/core/src/cz/nic/tablexia/screen/createuser/form/FormActorsLayout.java
index 41d6a3aab..9b44e4087 100644
--- a/core/src/cz/nic/tablexia/screen/createuser/form/FormActorsLayout.java
+++ b/core/src/cz/nic/tablexia/screen/createuser/form/FormActorsLayout.java
@@ -34,8 +34,10 @@ public class FormActorsLayout {
     public static final float  STAMP_X                          = -0.01f;
     public static final float  STAMP_Y                          = -0.05f;
 
+    public static final float  SIGNATURE_PANE_X                 = 0.53f;
     public static final float  SIGNATURE_PANE_Y                 = 0.1f;
-    public static final float  SIGNATURE_PANE_HEIGHT            = 0.1f;
+    public static final float  SIGNATURE_PANE_WIDTH             = 0.2f;
+    public static final float  SIGNATURE_PANE_HEIGHT            = 0.12f;
 
     public static final float  SWITCH_GENDER_SCALE              = 0.8f;
     public static final float  SWITCH_GENDER_X                  = 0.725f;
-- 
GitLab