discomfitor pushed a commit to branch master.

http://git.enlightenment.org/apps/empc.git/commit/?id=caa9ae0997170fdf3d4c6c6cca187b9eb7f95f39

commit caa9ae0997170fdf3d4c6c6cca187b9eb7f95f39
Author: Mike Blumenkrantz <zm...@osg.samsung.com>
Date:   Tue Jan 6 13:37:12 2015 -0500

    add hints for available navigation edges in player ui
---
 README               |  9 ++++--
 TODO                 |  1 -
 data/themes/empc.edc | 83 ++++++++++++++++++++++++++++++++++++++++++++++++----
 3 files changed, 83 insertions(+), 10 deletions(-)

diff --git a/README b/README
index 7e03112..69057e9 100644
--- a/README
+++ b/README
@@ -22,10 +22,13 @@ Optional Module Dependencies:
 
 Controls:
        The UI of EMPC is based on mouse movements and event areas.
-       Moving the mouse to the an area of the application window
+       Moving the mouse to an area of the application window
        will trigger a change in the view state. Unless the current view
-       has been keyboard toggled using a global hotkey, it will automatically
-       hide after HIDE_TIMEOUT seconds.
+       has been mouse-hold toggled or keyboard toggled using a global
+       hotkey, it will automatically hide after HIDE_TIMEOUT seconds.
+       Hints for available navigation appear when the view changes:
+               * blue indicates a new view is available in a direction
+               * red indicates the previous view is available in a direction
 
        Mouse bindings for the player view and event area sizes can
        be changed using the defines at the top of empc.edc.
diff --git a/TODO b/TODO
index 922bb20..2b8e59f 100644
--- a/TODO
+++ b/TODO
@@ -1,6 +1,5 @@
 EMPC
 * visual indicators
-       * training wheels
        * database updating
        * get less shitty arrow images for bgselector
        * downloading indicator
diff --git a/data/themes/empc.edc b/data/themes/empc.edc
index 4932d6b..505ba56 100644
--- a/data/themes/empc.edc
+++ b/data/themes/empc.edc
@@ -96,6 +96,12 @@ collections {
             set_int(timer_lock, 0);
             run_program(get_program_id("playlist_overlay_signal"));
          }
+         public playlist_visible_hints() {
+            run_program(get_program_id("top_hint_active"));
+            run_program(get_program_id("left_hint_inactive"));
+            if (!get_int(controls_visible))
+              run_program(get_program_id("bottom_hint_active"));
+         }
       }
       parts {
          rect { "base"; nomouse;
@@ -706,6 +712,12 @@ collections {
                color: 0 0 0 0;
                rel1.relative: 1 0;
             }
+            desc { "hint_activate"; inherit: "default";
+               color: 52 153 255 100;
+            }
+            desc { "hint_deactivate"; inherit: "default";
+               color: 154 25 25 100;
+            }
          }
          rect { "left_events"; repeat_events: 1;
             clip: "bgchooser_active_clip";
@@ -717,6 +729,12 @@ collections {
                color: 0 0 0 0;
                rel2.relative: 0 1;
             }
+            desc { "hint_activate"; inherit: "default";
+               color: 52 153 255 100;
+            }
+            desc { "hint_deactivate"; inherit: "default";
+               color: 154 25 25 100;
+            }
          }
          rect { "bottom_events"; repeat_events: 1;
             clip: "bgchooser_active_clip";
@@ -728,6 +746,12 @@ collections {
                color: 0 0 0 0;
                rel1.relative: 0 1;
             }
+            desc { "hint_activate"; inherit: "default";
+               color: 52 153 255 100;
+            }
+            desc { "hint_deactivate"; inherit: "default";
+               color: 154 25 25 100;
+            }
          }
          rect { "top_events"; repeat_events: 1;
             clip: "bgchooser_active_clip";
@@ -739,7 +763,38 @@ collections {
                color: 0 0 0 0;
                rel2.relative: 1 0;
             }
+            desc { "hint_activate"; inherit: "default";
+               color: 52 153 255 100;
+            }
+            desc { "hint_deactivate"; inherit: "default";
+               color: 154 25 25 100;
+            }
          }
+#define HINT_PROGRAM(SIDE) \
+         program { SIDE"_hint_active"; \
+            action: STATE_SET "hint_activate"; \
+            target: SIDE"_events"; \
+            transition: SIN 0.5; \
+            sequence { \
+               action: STATE_SET "default"; \
+               target: SIDE"_events"; \
+               transition: SIN 0.5; \
+            } \
+         } \
+         program { SIDE"_hint_inactive"; \
+            action: STATE_SET "hint_deactivate"; \
+            target: SIDE"_events"; \
+            transition: SIN 0.5; \
+            sequence { \
+               action: STATE_SET "default"; \
+               target: SIDE"_events"; \
+               transition: SIN 0.5; \
+            } \
+         }
+         HINT_PROGRAM("top")
+         HINT_PROGRAM("bottom")
+         HINT_PROGRAM("left")
+         HINT_PROGRAM("right")
          alias: EMPC_LOGIN_TEXT_HEADER "login_panel:empc.text";
          alias: EMPC_LOGIN_SWALLOW_HOST "login_panel:swallow.host";
          alias: EMPC_LOGIN_SWALLOW_PORT "login_panel:swallow.port";
@@ -858,7 +913,10 @@ collections {
             after: "playlist_show_done";
          }
          program { "playlist_show_done";
-            action: SIGNAL_EMIT "empc,playlist,visible" "empc";
+            script {
+               emit("empc,playlist,visible", "empc");
+               playlist_visible_hints();
+            }
          }
          program { "playlist_hide";
             filter: EMPC_SWALLOW_PLAYLIST "visible";
@@ -874,7 +932,12 @@ collections {
             after: "playlist_hide_done";
          }
          program { "playlist_hide_done";
-            action: SIGNAL_EMIT "empc,playlist,hidden" "empc";
+            script {
+               emit("empc,playlist,hidden", "empc");
+               run_program(get_program_id("right_hint_active"));
+               if (!get_int(controls_visible))
+                 run_program(get_program_id("bottom_hint_active"));
+            }
          }
          program { signal: "mouse,in"; source: "left_events";
             script {
@@ -979,8 +1042,12 @@ collections {
             action: STATE_SET "visible" 0.0;
             target: EMPC_SWALLOW_FILESYSTEM;
             transition: LINEAR 0.2 CURRENT;
-            sequence {
-               action: SIGNAL_EMIT "empc,filesystem,visible" "empc";
+            after: "filesystem_show_done";
+         }
+         program { "filesystem_show_done";
+            script {
+               emit("empc,filesystem,visible", "empc");
+               run_program(get_program_id("bottom_hint_inactive"));
             }
          }
          program { "filesystem_hide";
@@ -994,8 +1061,12 @@ collections {
             action: STATE_SET "default" 0.0;
             target: EMPC_SWALLOW_FILESYSTEM;
             transition: LINEAR 0.2 CURRENT;
-            sequence {
-               action: SIGNAL_EMIT "empc,filesystem,hidden" "empc";
+            after: "filesystem_hide_done";
+         }
+         program { "filesystem_hide_done";
+            script {
+               emit("empc,filesystem,hidden", "empc");
+               playlist_visible_hints();
             }
          }
          program { signal: "empc,key,down"; source: "empc";

-- 


Reply via email to