You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
289 lines
5.6 KiB
289 lines
5.6 KiB
images { |
|
image: "e17_battery_000.png" COMP; |
|
image: "e17_battery_010.png" COMP; |
|
image: "e17_battery_020.png" COMP; |
|
image: "e17_battery_030.png" COMP; |
|
image: "e17_battery_040.png" COMP; |
|
image: "e17_battery_050.png" COMP; |
|
image: "e17_battery_060.png" COMP; |
|
image: "e17_battery_070.png" COMP; |
|
image: "e17_battery_080.png" COMP; |
|
image: "e17_battery_090.png" COMP; |
|
image: "e17_battery_100.png" COMP; |
|
image: "e17_battery_ac.png" COMP; |
|
} |
|
group { |
|
name: "modules/battery/main"; |
|
max: 128 128; |
|
script { |
|
public message(Msg_Type:type, id, ...) { |
|
if ((type == MSG_FLOAT) && (id == 1)) { |
|
new Float:val; |
|
val = getfarg(2); |
|
set_state(PART:"battery", "default", val); |
|
} |
|
} |
|
} |
|
parts { |
|
part { |
|
name: "battery"; |
|
clip_to: "pulse_clip"; |
|
description { |
|
state: "default" 0.0; |
|
aspect: 0.669291339 0.669291339; |
|
align: 0.0 0.5; |
|
max: 85 127; |
|
rel1 { |
|
relative: 0.0 0.0; |
|
} |
|
rel2 { |
|
relative: 1.0 1.0; |
|
} |
|
image { |
|
normal: "e17_battery_000.png"; |
|
} |
|
} |
|
description { |
|
state: "default" 0.1; |
|
inherit: "default" 0.0; |
|
image { |
|
normal: "e17_battery_010.png"; |
|
} |
|
} |
|
description { |
|
state: "default" 0.2; |
|
inherit: "default" 0.0; |
|
image { |
|
normal: "e17_battery_020.png"; |
|
} |
|
} |
|
description { |
|
state: "default" 0.3; |
|
inherit: "default" 0.0; |
|
image { |
|
normal: "e17_battery_030.png"; |
|
} |
|
} |
|
description { |
|
state: "default" 0.4; |
|
inherit: "default" 0.0; |
|
image { |
|
normal: "e17_battery_040.png"; |
|
} |
|
} |
|
description { |
|
state: "default" 0.5; |
|
inherit: "default" 0.0; |
|
image { |
|
normal: "e17_battery_050.png"; |
|
} |
|
} |
|
description { |
|
state: "default" 0.6; |
|
inherit: "default" 0.0; |
|
image { |
|
normal: "e17_battery_060.png"; |
|
} |
|
} |
|
description { |
|
state: "default" 0.7; |
|
inherit: "default" 0.0; |
|
image { |
|
normal: "e17_battery_070.png"; |
|
} |
|
} |
|
description { |
|
state: "default" 0.8; |
|
inherit: "default" 0.0; |
|
image { |
|
normal: "e17_battery_080.png"; |
|
} |
|
} |
|
description { |
|
state: "default" 0.9; |
|
inherit: "default" 0.0; |
|
image { |
|
normal: "e17_battery_090.png"; |
|
} |
|
} |
|
description { |
|
state: "default" 1.0; |
|
inherit: "default" 0.0; |
|
image { |
|
normal: "e17_battery_100.png"; |
|
} |
|
} |
|
} |
|
part { |
|
name: "reading"; |
|
type: TEXT; |
|
effect: SOFT_SHADOW; |
|
clip_to: "fade_clip"; |
|
description { |
|
state: "default" 0.0; |
|
align: 1.0 0.0; |
|
rel1 { |
|
relative: 1.0 0.0; |
|
to_x: "battery"; |
|
} |
|
rel2 { |
|
relative: 1.0 0.0; |
|
} |
|
color: 255 255 255 255; |
|
color3: 0 0 0 32; |
|
text { |
|
text: "100%"; |
|
font: "Edje Vera"; |
|
size: 7; |
|
min: 1 1; |
|
align: 1.0 0.0; |
|
} |
|
} |
|
} |
|
part { |
|
name: "time"; |
|
type: TEXT; |
|
effect: SOFT_SHADOW; |
|
clip_to: "fade_clip"; |
|
description { |
|
state: "default" 0.0; |
|
align: 1.0 0.0; |
|
rel1 { |
|
relative: 1.0 1.0; |
|
to_x: "battery"; |
|
to_y: "reading"; |
|
} |
|
rel2 { |
|
relative: 1.0 1.0; |
|
to_y: "reading"; |
|
} |
|
color: 255 255 255 255; |
|
color3: 0 0 0 32; |
|
text { |
|
text: "00:00"; |
|
font: "Edje Vera"; |
|
size: 7; |
|
min: 1 1; |
|
align: 1.0 0.0; |
|
} |
|
} |
|
} |
|
part { |
|
name: "ac"; |
|
clip_to: "fade_clip"; |
|
description { |
|
state: "default" 0.0; |
|
aspect: 0.975609756 0.975609756; |
|
align: 1.0 1.0; |
|
max: 40 41; |
|
visible: 0; |
|
rel1 { |
|
relative: 0.5 0.5; |
|
} |
|
rel2 { |
|
relative: 1.0 1.0; |
|
} |
|
image { |
|
normal: "e17_battery_ac.png"; |
|
} |
|
} |
|
description { |
|
state: "active" 0.0; |
|
inherit: "default" 0.0; |
|
visible: 1; |
|
} |
|
} |
|
part { |
|
name: "fade_clip"; |
|
type: RECT; |
|
mouse_events: 0; |
|
description { |
|
state: "default" 0.0; |
|
color: 255 255 255 255; |
|
} |
|
description { |
|
state: "faded" 0.0; |
|
color: 255 255 255 128; |
|
} |
|
} |
|
part { |
|
name: "pulse_clip"; |
|
type: RECT; |
|
mouse_events: 0; |
|
clip_to: "fade_clip"; |
|
description { |
|
state: "default" 0.0; |
|
color: 255 255 255 255; |
|
} |
|
description { |
|
state: "faded" 1.0; |
|
color: 255 255 255 255; |
|
} |
|
description { |
|
state: "faded" 0.0; |
|
color: 255 255 255 0; |
|
} |
|
} |
|
} |
|
programs { |
|
program { |
|
name: "charge"; |
|
signal: "charge"; |
|
source: ""; |
|
action: STATE_SET "default" 0.0; |
|
target: "fade_clip"; |
|
} |
|
program { |
|
name: "charge2"; |
|
signal: "charge"; |
|
source: ""; |
|
action: STATE_SET "active" 0.0; |
|
target: "ac"; |
|
} |
|
program { |
|
name: "discharge"; |
|
signal: "discharge"; |
|
source: ""; |
|
action: STATE_SET "default" 0.0; |
|
target: "fade_clip"; |
|
} |
|
program { |
|
name: "discharge2"; |
|
signal: "discharge"; |
|
source: ""; |
|
action: STATE_SET "default" 0.0; |
|
target: "ac"; |
|
} |
|
program { |
|
name: "unknown"; |
|
signal: "unknown"; |
|
source: ""; |
|
action: STATE_SET "faded" 0.0; |
|
target: "fade_clip"; |
|
} |
|
program { |
|
name: "pulse"; |
|
signal: "pulse"; |
|
source: ""; |
|
action: STATE_SET "faded" 0.0; |
|
transition: ACCELERATE 0.3; |
|
after: "pulse2"; |
|
target: "pulse_clip"; |
|
} |
|
program { |
|
name: "pulse2"; |
|
signal: "pulse2"; |
|
source: ""; |
|
action: STATE_SET "faded" 1.0; |
|
transition: ACCELERATE 0.1; |
|
target: "pulse_clip"; |
|
} |
|
program { |
|
name: "pulsestop"; |
|
signal: "pulsestop"; |
|
source: ""; |
|
action: STATE_SET "default" 0.0; |
|
target: "pulse_clip"; |
|
} |
|
} |
|
}
|
|
|