forked from enlightenment/efl
87 lines
2.6 KiB
Plaintext
87 lines
2.6 KiB
Plaintext
group { name: "e/gadget/netstatus/main";
|
|
alias: "e/gadget/netstatus/main_vert";
|
|
image: "netstatus_rx.png" COMP;
|
|
image: "netstatus_tx.png" COMP;
|
|
image: "netstatus_base.png" COMP;
|
|
image: "netstatus_over.png" COMP;
|
|
script {
|
|
public message(Msg_Type:type, id, ...) {
|
|
if ((type == MSG_INT_SET) && (id == 1)) {
|
|
// new rxcur = getarg(2);
|
|
new rxper = getarg(3);
|
|
// new rxmax = getarg(4);
|
|
// new txcur = getarg(5);
|
|
new txper = getarg(6);
|
|
// new txmax = getarg(7);
|
|
|
|
new Float:val = rxper / 100.0;
|
|
custom_state(PART:"rx_clip", "default", 0.0);
|
|
set_state_val(PART:"rx_clip", STATE_REL2, 1.0, val);
|
|
set_state(PART:"rx_clip", "custom", 0.0);
|
|
|
|
val = txper / 100.0;
|
|
custom_state(PART:"tx_clip", "default", 0.0);
|
|
set_state_val(PART:"tx_clip", STATE_REL1, 0.0, 1.0 - val);
|
|
set_state(PART:"tx_clip", "custom", 0.0);
|
|
}
|
|
}
|
|
}
|
|
parts {
|
|
part { name: "base";
|
|
description { state: "default" 0.0;
|
|
aspect: 1.0 1.0;
|
|
aspect_preference: BOTH;
|
|
image.normal: "netstatus_base.png";
|
|
}
|
|
}
|
|
part { name: "rx_spacer"; type: SPACER;
|
|
description { state: "default" 0.0;
|
|
rel1.relative: 0.0 0.09;
|
|
rel2.relative: 1.0 0.91;
|
|
}
|
|
}
|
|
part { name: "rx_clip"; type: RECT;
|
|
description { state: "default" 0.0;
|
|
rel1.to: "rx_spacer";
|
|
rel2.to: "rx_spacer";
|
|
}
|
|
}
|
|
part { name: "rx"; type: IMAGE;
|
|
clip_to: "rx_clip";
|
|
description { state: "default" 0.0;
|
|
rel1.to: "base";
|
|
rel2.to: "base";
|
|
image.normal: "netstatus_rx.png";
|
|
}
|
|
}
|
|
part { name: "tx_spacer"; type: SPACER;
|
|
description { state: "default" 0.0;
|
|
rel1.relative: 0.0 0.09;
|
|
rel2.relative: 1.0 0.91;
|
|
}
|
|
}
|
|
part { name: "tx_clip"; type: RECT;
|
|
description { state: "default" 0.0;
|
|
rel1.to: "tx_spacer";
|
|
rel2.to: "tx_spacer";
|
|
}
|
|
}
|
|
part { name: "tx"; type: IMAGE;
|
|
clip_to: "tx_clip";
|
|
description { state: "default" 0.0;
|
|
rel1.to: "base";
|
|
rel2.to: "base";
|
|
image.normal: "netstatus_tx.png";
|
|
}
|
|
}
|
|
part { name: "over";
|
|
description { state: "default" 0.0;
|
|
rel1.to: "base";
|
|
rel2.to: "base";
|
|
image.normal: "netstatus_over.png";
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|