group {
name: "e/modules/battery/main";
images {
- image: "bat_content1.png" COMP;
- image: "bat_content2.png" COMP;
- image: "bat_content3.png" COMP;
- image: "bat_content1b.png" COMP;
- image: "bat_content2b.png" COMP;
- image: "bat_content3b.png" COMP;
- image: "bat_over.png" COMP;
- image: "bat_shadow.png" COMP;
- image: "power.png" COMP;
- image: "power_glow.png" COMP;
+ image: "batt_base.png" COMP;
+ image: "batt_level.png" COMP;
+ image: "batt_over.png" COMP;
+ image: "batt_power.png" COMP;
}
min: 16 16;
max: 128 128;
b = 0;
}
custom_state(PART:"fill", "default", 0.0);
- set_state_val(PART:"fill", STATE_REL1, 0.0, 1.0 - val);
+ set_state_val(PART:"fill", STATE_COLOR, r, g, b, 255);
+ set_state_val(PART:"fill", STATE_COLOR, r, g, b, 255);
+ set_state_val(PART:"fill", STATE_COLOR, r, g, b, 255);
set_state(PART:"fill", "custom", 0.0);
- custom_state(PART:"bfill1", "default", 0.0);
- custom_state(PART:"bfill2", "default", 0.0);
- custom_state(PART:"bfill3", "default", 0.0);
- set_state_val(PART:"bfill1", STATE_COLOR, r, g, b, 255);
- set_state_val(PART:"bfill2", STATE_COLOR, r, g, b, 255);
- set_state_val(PART:"bfill3", STATE_COLOR, r, g, b, 255);
- set_state(PART:"bfill1", "custom", 0.0);
- set_state(PART:"bfill2", "custom", 0.0);
- set_state(PART:"bfill3", "custom", 0.0);
+
+ custom_state(PART:"fill_clip", "default", 0.0);
+ set_state_val(PART:"fill_clip", STATE_REL1, 0.0, 1.0 - val);
+ set_state(PART:"fill_clip", "custom", 0.0);
}
}
}
parts {
- part {
- name: "fill_zone";
+ part { name: "fade_clip";
type: RECT;
- description {
- state: "default" 0.0;
- visible: 0;
- rel1 {
- to: "over";
- relative: 0.0 0.25;
- }
- rel2 {
- to: "over";
- relative: 1.0 0.84375;
- }
+ mouse_events: 0;
+ description { state: "default" 0.0;
+ color: 255 255 255 255;
}
- }
- part {
- name: "fill";
- type: RECT;
- description {
- state: "default" 0.0;
- visible: 0;
- rel1.to: "fill_zone";
- rel1.relative: 0.0 0.5;
- rel2.to: "fill_zone";
+ description { state: "faded" 0.0;
+ color: 255 255 255 160;
}
}
- part {
- name: "fade_clip";
+ part { name: "info_clip";
type: RECT;
- description {
- state: "default" 0.0;
- color: 255 255 255 255;
+ mouse_events: 0;
+ clip_to: "fade_clip";
+ description { state: "default" 0.0;
+ color: 255 255 255 0;
}
- description {
- state: "faded" 0.0;
- color: 255 255 255 160;
+ description { state: "visible" 0.0;
+ color: 255 255 255 255;
}
}
- part {
- name: "pulse_clip";
+ part { name: "pulse_clip";
type: RECT;
+ mouse_events: 0;
clip_to: "fade_clip";
- description {
- state: "default" 0.0;
+ description { state: "default" 0.0;
color: 255 255 255 255;
}
- description {
- state: "faded" 1.0;
+ description { state: "faded" 1.0;
color: 255 255 255 255;
}
- description {
- state: "faded" 0.0;
+ description { state: "faded" 0.0;
color: 255 255 255 0;
}
}
- part {
- name: "shadow";
- mouse_events: 0;
- clip_to: "pulse_clip";
- description {
- state: "default" 0.0;
- aspect: 1.0 1.0;
- aspect_preference: BOTH;
- image.normal: "bat_shadow.png";
- }
- }
- part {
- name: "bfill1";
+ part { name: "fill_region";
mouse_events: 0;
- clip_to: "pulse_clip";
- description {
- state: "default" 0.0;
- aspect: 3.0 3.0;
- aspect_preference: HORIZONTAL;
- align: 0.5 1.0;
- rel1 {
- to: "fill";
- relative: 0.125 0.0;
- offset: 0 -1;
- }
- rel2 {
- to: "fill";
- relative: 0.875 0.0;
- offset: -1 -1;
- }
- image.normal: "bat_content1.png";
- }
- }
- part {
- name: "bfill2";
- mouse_events: 0;
- clip_to: "pulse_clip";
- description {
- state: "default" 0.0;
- rel1 {
- to: "fill";
- relative: 0.125 0.0;
- }
- rel2 {
- to: "fill";
- relative: 0.875 1.0;
- }
- image.normal: "bat_content2.png";
+ type: RECT;
+ description { state: "default" 0.0;
+ visible: 0;
+ rel1.relative: 0.0 (26/128);
+ rel2.relative: 1.0 ((128-14)/128);
}
}
- part {
- name: "bfill3";
+ part { name: "fill_clip";
+ type: RECT;
mouse_events: 0;
clip_to: "pulse_clip";
- description {
- state: "default" 0.0;
- rel1 {
- to: "fill";
- relative: 0.125 1.0;
- }
- rel2 {
- to: "over";
- relative: 0.875 0.96875;
- }
- image.normal: "bat_content3.png";
+ description { state: "default" 0.0;
+ rel1.to: "fill_region";
+ rel1.relative: 0.0 0.5;
+ rel2.to: "fill_region";
+ color: 255 255 255 255;
}
}
- part {
- name: "bfill1b";
- mouse_events: 0;
+ part { name: "base";
clip_to: "pulse_clip";
- description {
- state: "default" 0.0;
- rel1.to: "bfill1";
- rel2.to: "bfill1";
- image.normal: "bat_content1b.png";
+ description { state: "default" 0.0;
+ aspect: 1.0 1.0;
+ aspect_preference: BOTH;
+ image.normal: "batt_base.png";
}
}
- part {
- name: "bfill2b";
+ part { name: "fill";
mouse_events: 0;
- clip_to: "pulse_clip";
- description {
- state: "default" 0.0;
- rel1.to: "bfill2";
- rel2.to: "bfill2";
- image.normal: "bat_content2b.png";
+ clip_to: "fill_clip";
+ description { state: "default" 0.0;
+ rel1.to: "base";
+ rel2.to: "base";
+ image.normal: "batt_level.png";
}
}
- part {
- name: "bfill3b";
+ part { name: "over";
mouse_events: 0;
clip_to: "pulse_clip";
- description {
- state: "default" 0.0;
- rel1.to: "bfill3";
- rel2.to: "bfill3";
- image.normal: "bat_content3b.png";
- }
- }
- part {
- name: "over";
- clip_to: "pulse_clip";
- description {
- state: "default" 0.0;
- aspect: 1.0 1.0;
- aspect_preference: BOTH;
- image.normal: "bat_over.png";
- }
- }
- part {
- name: "power_glow";
- mouse_events: 0;
- description {
- state: "default" 0.0;
- rel1.to: "power";
- rel2.to: "power";
- image.normal: "power_glow.png";
- visible: 0;
- }
- description {
- state: "active" 0.0;
- inherit: "default" 0.0;
- visible: 1;
- color: 255 255 255 0;
- }
- description {
- state: "active2" 0.0;
- inherit: "default" 0.0;
- visible: 1;
- color: 255 255 255 255;
+ description { state: "default" 0.0;
+ rel1.to: "base";
+ rel2.to: "base";
+ image.normal: "batt_over.png";
}
}
- part {
- name: "power";
+ part { name: "power";
mouse_events: 0;
- description {
- state: "default" 0.0;
- aspect: 1.0 1.0;
- aspect_preference: BOTH;
- rel1 {
- to: "over";
- relative: 0.0 0.35;
- }
- rel2 {
- to: "over";
- relative: 1.0 0.86875;
- }
- image.normal: "power.png";
+ description { state: "default" 0.0;
+ rel1.to: "base";
+ rel2.to: "base";
+ image.normal: "batt_power.png";
visible: 0;
}
- description {
- state: "active" 0.0;
+ description { state: "visible" 0.0;
inherit: "default" 0.0;
visible: 1;
}
}
- part {
- name: "e.text.reading";
+ part { name: "e.text.reading";
mouse_events: 0;
type: TEXT;
scale: 1;
+ clip_to: "info_clip";
effect: OUTLINE;
- clip_to: "fade_clip";
- description {
- state: "default" 0.0;
- align: 0.5 0.0;
- rel1 {
- relative: 0.5 0.0;
- }
- rel2 {
- relative: 0.5 0.0;
- }
- color: 255 255 255 0;
- color2: 0 0 0 0;
- color3: 0 0 0 0;
+ description { state: "default" 0.0;
+ align: 1.0 0.5;
+ rel1.relative: 0.5 0.0;
+ rel2.relative: 1.0 0.3;
+ color: 0 0 0 255;
+ color2: 255 255 255 128;
color_class: "module_label";
text {
- font: "Sans:style=Bold";
+ font: "Sans";
size: 8;
min: 1 1;
- align: 0.5 0.0;
+ align: 1.0 0.5;
text_class: "module_small";
}
}
- description {
- state: "visible" 0.0;
- inherit: "default" 0.0;
- color: 255 255 255 255;
- color2: 0 0 0 128;
- color3: 0 0 0 32;
- }
}
- part {
- name: "e.text.time";
+ part { name: "e.text.time";
mouse_events: 0;
type: TEXT;
scale: 1;
+ clip_to: "info_clip";
effect: OUTLINE;
- clip_to: "fade_clip";
- description {
- state: "default" 0.0;
- align: 0.5 1.0;
- rel1 {
- relative: 0.5 1.0;
- }
- rel2 {
- relative: 0.5 1.0;
- }
- color: 255 255 255 0;
- color2: 0 0 0 0;
- color3: 0 0 0 0;
+ description { state: "default" 0.0;
+ align: 1.0 0.5;
+ rel1.relative: 0.5 0.3;
+ rel2.relative: 1.0 0.6;
+ color: 0 0 0 255;
+ color2: 255 255 255 128;
color_class: "module_label";
text {
- font: "Sans:style=Bold";
+ font: "Sans";
size: 8;
min: 1 1;
- align: 0.5 1.0;
+ align: 1.0 0.5;
text_class: "module_small";
}
}
- description {
- state: "visible" 0.0;
- inherit: "default" 0.0;
- color: 255 255 255 255;
- color2: 0 0 0 128;
- color3: 0 0 0 32;
- }
}
}
programs {
- program {
- name: "hover1";
+ program { name: "hover1";
signal: "mouse,in";
- source: "over";
+ source: "base";
action: STATE_SET "visible" 0.0;
transition: LINEAR 0.3;
- target: "e.text.reading";
- target: "e.text.time";
+ target: "info_clip";
}
- program {
- name: "hover2";
+ program { name: "hover2";
signal: "mouse,out";
- source: "over";
+ source: "base";
action: STATE_SET "default" 0.0;
- transition: LINEAR 1.0;
- target: "e.text.reading";
- target: "e.text.time";
- }
- program {
- name: "charge";
- signal: "e,state,charging";
- source: "e";
- action: STATE_SET "default" 0.0;
- target: "fade_clip";
+ transition: LINEAR 0.3;
+ target: "info_clip";
}
- program {
- name: "charge2";
+ program { name: "charge";
signal: "e,state,charging";
source: "e";
- action: STATE_SET "active" 0.0;
+ action: STATE_SET "visible" 0.0;
target: "power";
- target: "power_glow";
- after: "charge3";
}
- program {
- name: "charge3";
- action: STATE_SET "active2" 0.0;
- in: 1.0 0.0;
- target: "power_glow";
- after: "charge4";
- }
- program {
- name: "charge4";
- action: STATE_SET "active" 0.0;
- in: 1.0 0.0;
- target: "power_glow";
- after: "charge3";
- }
- program {
- name: "discharge";
- signal: "e,state,discharging";
- source: "e";
- action: STATE_SET "default" 0.0;
- target: "fade_clip";
- }
- program {
- name: "discharge2";
+ program { name: "discharge";
signal: "e,state,discharging";
source: "e";
action: STATE_SET "default" 0.0;
target: "power";
- target: "power_glow";
}
- program {
- name: "discharge3";
- signal: "e,state,discharging";
- source: "e";
- action: ACTION_STOP;
- target: "charge3";
- target: "charge4";
- }
- program {
- name: "unknown";
+ program { name: "unknown";
signal: "e,state,unknown";
source: "e";
action: STATE_SET "faded" 0.0;
target: "fade_clip";
}
- program {
- name: "pulse";
+ program { name: "pulse";
signal: "e,action,pulse,start";
source: "e";
action: STATE_SET "faded" 0.0;
after: "pulse2";
target: "pulse_clip";
}
- program {
- name: "pulse2";
- signal: "pulse2";
- source: "e";
+ program { name: "pulse2";
action: STATE_SET "faded" 1.0;
transition: ACCELERATE 0.1;
target: "pulse_clip";
}
- program {
- name: "pulsestop";
+ program { name: "pulsestop";
signal: "e,action,pulse,stop";
source: "e";
action: STATE_SET "default" 0.0;