summaryrefslogtreecommitdiff
path: root/data/themes
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2017-08-05 23:09:32 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2017-08-05 23:09:32 +0900
commit8dfcdf243518c280ea58ec003759574a9043ab6c (patch)
tree97a6a8a1b4bb75c49742d80ba32362f7ec9042e0 /data/themes
parent712d88dbf04bd78dabdc0a2065c01a8bc3ed3d4f (diff)
browser mode - clean up and dot some i's and corss some t's
hide control bar/pos when in browse mode, disable lots of key controls and pause/unpause click and a bunch more. much cleaner now
Diffstat (limited to 'data/themes')
-rw-r--r--data/themes/default.edc72
1 files changed, 52 insertions, 20 deletions
diff --git a/data/themes/default.edc b/data/themes/default.edc
index e7b4e27..3e15f27 100644
--- a/data/themes/default.edc
+++ b/data/themes/default.edc
@@ -47,17 +47,43 @@ collections {
47 public pos_timer; 47 public pos_timer;
48 public drag_is_down; 48 public drag_is_down;
49 public novideo; 49 public novideo;
50 public browser;
50 51
51 public pos_timeout(val) { 52 public pos_timeout(val) {
52 set_int(pos_visible, 0);
53 set_int(pos_timer, 0); 53 set_int(pos_timer, 0);
54 stop_program(PROGRAM:"posshow"); 54 if (get_int(pos_visible)) {
55 run_program(PROGRAM:"poshide"); 55 set_int(pos_visible, 0);
56 if (!get_int(novideo)) { 56 stop_program(PROGRAM:"poshide");
57 stop_program(PROGRAM:"posshow");
58 run_program(PROGRAM:"poshide");
59 stop_program(PROGRAM:"cbarhide");
57 stop_program(PROGRAM:"cbarshow"); 60 stop_program(PROGRAM:"cbarshow");
58 run_program(PROGRAM:"cbarhide"); 61 run_program(PROGRAM:"cbarhide");
59 } 62 }
60 } 63 }
64 public pos_show() {
65 if (!get_int(browser)) {
66 new t;
67
68 if (!get_int(pos_visible)) {
69 set_int(pos_visible, 1);
70 stop_program(PROGRAM:"poshide");
71 stop_program(PROGRAM:"posshow");
72 run_program(PROGRAM:"posshow");
73 stop_program(PROGRAM:"cbarhide");
74 stop_program(PROGRAM:"cbarshow");
75 run_program(PROGRAM:"cbarshow");
76 }
77 t = get_int(pos_timer);
78 if (t) cancel_timer(t);
79 if (!get_int(novideo)) {
80 t = timer(5.0, "pos_timeout", 1);
81 } else {
82 t = 0;
83 }
84 set_int(pos_timer, t);
85 }
86 }
61 } 87 }
62 88
63 parts { 89 parts {
@@ -403,12 +429,14 @@ collections {
403 signal: "state,novideo"; source: "rage"; 429 signal: "state,novideo"; source: "rage";
404 script { 430 script {
405 set_int(novideo, 1); 431 set_int(novideo, 1);
432 pos_show();
406 } 433 }
407 } 434 }
408 program { 435 program {
409 signal: "state,video"; source: "rage"; 436 signal: "state,video"; source: "rage";
410 script { 437 script {
411 set_int(novideo, 0); 438 set_int(novideo, 0);
439 pos_show();
412 } 440 }
413 } 441 }
414 442
@@ -463,6 +491,17 @@ collections {
463 target: "rage.browser"; 491 target: "rage.browser";
464 } 492 }
465 program { 493 program {
494 signal: "browser,state,visible"; source: "rage";
495 script {
496 set_int(browser, 1);
497 if (get_int(pos_visible)) {
498 new t = get_int(pos_timer);
499 if (t) cancel_timer(t);
500 pos_timeout(0);
501 }
502 }
503 }
504 program {
466 signal: "browser,state,hidden"; source: "rage"; 505 signal: "browser,state,hidden"; source: "rage";
467 action: STATE_SET "default" 0.0; 506 action: STATE_SET "default" 0.0;
468 transition: ACCELERATE 0.5; 507 transition: ACCELERATE 0.5;
@@ -471,6 +510,13 @@ collections {
471 } 510 }
472 program { name: "browser_hidden"; 511 program { name: "browser_hidden";
473 action: SIGNAL_EMIT "browser,state,hidden,finished" "rage"; 512 action: SIGNAL_EMIT "browser,state,hidden,finished" "rage";
513 after: "browser_hidden2";
514 }
515 program { name: "browser_hidden2";
516 script {
517 set_int(browser, 0);
518 pos_show();
519 }
474 } 520 }
475 521
476 part { name: "rage.list"; type: SWALLOW; 522 part { name: "rage.list"; type: SWALLOW;
@@ -1615,24 +1661,10 @@ collections {
1615 color: 0 0 0 0; 1661 color: 0 0 0 0;
1616 } 1662 }
1617 } 1663 }
1618 program { name: "move1"; 1664 program { // mouse moves around causing control bar to show until idle
1619 signal: "mouse,move"; source: "event"; 1665 signal: "mouse,move"; source: "event";
1620 script { 1666 script {
1621 new t; 1667 pos_show();
1622
1623 if (!get_int(pos_visible)) {
1624 stop_program(PROGRAM:"poshide");
1625 run_program(PROGRAM:"posshow");
1626 if (!get_int(novideo)) {
1627 stop_program(PROGRAM:"cbarhide");
1628 run_program(PROGRAM:"cbarshow");
1629 }
1630 set_int(pos_visible, 1);
1631 }
1632 t = get_int(pos_timer);
1633 if (t) cancel_timer(t);
1634 t = timer(5.0, "pos_timeout", 1);
1635 set_int(pos_timer, t);
1636 } 1668 }
1637 } 1669 }
1638 program { name: "posshow"; 1670 program { name: "posshow";