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.
 
 

744 lines
21 KiB

#define ORIENT_TARGETS \
target: "day0"; \
target: "day1"; \
target: "icon"; \
target: "e.text.location"; \
target: "e.text.temp"; \
target: "e.text.description"; \
target: "e.swallow.day0.icon"; \
target: "e.text.day0.date"; \
target: "e.text.day0.description"; \
target: "e.text.day0.low"; \
target: "e.text.day0.high"; \
target: "e.swallow.day1.icon"; \
target: "e.text.day1.date"; \
target: "e.text.day1.description"; \
target: "e.text.day1.low"; \
target: "e.text.day1.high"; \
#define FORECASTS_ICON(icon_code, minw, minh, maxw, maxh, a) \
images { \
image: icon_code".png" COMP; \
} \
group { \
name: "modules/forecasts/icons/"icon_code; \
min: minw minh; \
max: maxw maxh; \
parts { \
part { \
name: "icon"; \
description { \
state: "default" 0.0; \
aspect: a a; \
aspect_preference: BOTH; \
image { \
normal: icon_code".png"; \
} \
fill { \
smooth: 1; \
} \
} \
} \
} \
}
collections {
group {
name: "modules/forecasts/main";
script {
public is_float;
}
parts {
part {
name: "base";
type: RECT;
mouse_events: 1;
description {
state: "default" 0.0;
color: 0 0 0 0;
rel1 {
offset: 0 0;
}
rel2 {
offset: -1 -1;
}
}
}
part {
name: "icon";
type: SWALLOW;
mouse_events: 0;
description {
state: "default" 0.0;
aspect_preference: BOTH;
align: 0.0 0.0;
rel1 {
relative: 0.0 0.0;
offset: 0 0;
}
rel2 {
relative: 1.0 1.0;
offset: -1 -1;
}
//color: 0 0 0 0;
}
description {
state: "float" 0.0;
inherit: "default" 0.0;
aspect: 1.0 1.0;
rel1 {
relative: 0.0 0.0;
}
rel2 {
relative: 0.6 1.0;
offset: 2 2;
}
}
}
part {
name: "e.text.temp";
type: TEXT;
effect: OUTLINE_SOFT_SHADOW;
mouse_events: 0;
scale: 1;
description {
state: "default" 0.0;
rel1 {
relative: 0.0 0.0;
offset: 0 0;
to: "icon";
}
rel2 {
relative: 1.0 1.0;
offset: -1 -1;
to: "icon";
}
color: 255 255 255 255;
color2: 0 0 0 96;
color3: 0 0 0 32;
color_class: "module_label";
text {
text: "";
font: "Sans:style=Bold";
size: 10;
min: 1 1;
align: 0.0 0.1;
ellipsis: -1.0;
text_class: "module_large";
}
}
description {
state: "float" 0.0;
inherit: "default" 0.0;
rel1 {
relative: 0.0 1.0;
offset: 2 -20;
}
rel2 {
relative: 1.0 1.0;
offset: -2 -2;
}
text.align: 0.5 1.0;
}
}
part {
name: "e.text.description";
type: TEXT;
effect: OUTLINE_SOFT_SHADOW;
mouse_events: 0;
scale: 1;
description {
state: "default" 0.0;
rel1 {
relative: 0.0 1.0;
offset: -1 -1;
to_x: "icon";
}
rel2 {
relative: 1.0 1.0;
offset: -1 -10;
}
color: 255 255 255 255;
color2: 0 0 0 96;
color3: 0 0 0 32;
color_class: "module_label";
text {
text: "";
font: "Sans:style=Bold";
size: 10;
min: 1 1;
align: 0.5 0.5;
ellipsis: -1.0;
text_class: "module_normal";
}
}
description {
state: "hidden" 0.0;
inherit: "default" 0.0;
visible: 0;
}
description {
state: "float" 0.0;
inherit: "default" 0.0;
rel1 {
relative: 0.0 0.0;
offset: 1 -14;
to: "e.text.temp";
}
rel2 {
relative: 1.0 0.0;
offset: -2 -2;
to: "e.text.temp";
}
}
}
part {
name: "e.text.location";
type: TEXT;
effect: OUTLINE_SOFT_SHADOW;
mouse_events: 0;
scale: 1;
description {
state: "default" 0.0;
visible: 0;
}
description {
state: "float" 0.0;
visible: 1;
rel1 {
relative: 0.0 0.2;
offset: 1 1;
}
color: 255 255 255 255;
color2: 0 0 0 96;
color3: 0 0 0 32;
color_class: "module_label";
text {
text: "Location";
font: "Sans:style=Bold";
size: 10;
min: 1 1;
align: 0.0 0.0;
ellipsis: -1.0;
text_class: "module_normal";
}
}
}
part {
name: "day0";
type: RECT;
description {
state: "default" 0.0;
visible: 0;
}
description {
state: "float" 0.0;
visible: 1;
color: 0 0 0 0;
rel1 {
relative: 0.6 0.0;
offset: 1 1;
}
rel2 {
relative: 1.0 0.5;
offset: -5 -5;
}
}
}
part {
name: "e.swallow.day0.icon";
type: SWALLOW;
mouse_events: 0;
description {
state: "default" 0.0;
visible: 0;
}
description {
state: "float" 0.0;
visible: 1;
rel1 {
to: "day0";
}
rel2 {
to: "day0";
}
}
}
part {
name: "e.text.day0.date";
type: TEXT;
effect: OUTLINE_SOFT_SHADOW;
mouse_events: 0;
scale: 1;
description {
state: "default" 0.0;
visible: 0;
}
description {
state: "float" 0.0;
visible: 1;
rel1 {
relative: 0.0 0.0;
offset: 1 1;
to: "day0";
}
rel2 {
relative: 1.0 1.0;
offset: -1 -1;
to: "day0";
}
color: 255 255 255 255;
color2: 0 0 0 96;
color3: 0 0 0 32;
color_class: "module_label";
text {
text: "Date0";
font: "Sans:style=Bold";
size: 9;
min: 1 1;
align: 0.5 0.0;
ellipsis: -1.0;
text_class: "module_normal";
}
}
}
part {
name: "e.text.day0.description";
type: TEXT;
effect: OUTLINE_SOFT_SHADOW;
mouse_events: 0;
scale: 1;
description {
state: "default" 0.0;
visible: 0;
}
description {
state: "float" 0.0;
visible: 1;
rel1 {
relative: 0.0 0.0;
offset: 1 -14;
to_x: "day0";
to_y: "e.text.day0.low";
}
rel2 {
relative: 1.0 0.0;
offset: -1 -1;
to_x: "day0";
to_y: "e.text.day0.low";
}
color: 255 255 255 255;
color2: 0 0 0 96;
color3: 0 0 0 32;
color_class: "module_label";
text {
text: "Description0";
font: "Sans:style=Bold";
size: 10;
min: 1 1;
align: 0.5 0.0;
ellipsis: -1.0;
text_class: "module_normal";
}
}
}
part {
name: "e.text.day0.low";
type: TEXT;
effect: OUTLINE_SOFT_SHADOW;
mouse_events: 0;
scale: 1;
description {
state: "default" 0.0;
visible: 0;
}
description {
state: "float" 0.0;
visible: 1;
rel1 {
relative: 0.0 1.0;
offset: 1 -14;
to: "day0";
}
rel2 {
relative: 1.0 1.0;
offset: -1 -1;
to: "day0";
}
color: 255 255 255 255;
color2: 0 0 0 96;
color3: 0 0 0 32;
color_class: "module_label";
text {
text: "Low0";
font: "Sans:style=Bold";
size: 9;
min: 1 1;
align: 0.0 0.0;
ellipsis: -1.0;
text_class: "module_normal";
}
}
}
part {
name: "e.text.day0.high";
type: TEXT;
effect: OUTLINE_SOFT_SHADOW;
mouse_events: 0;
scale: 1;
description {
state: "default" 0.0;
visible: 0;
}
description {
state: "float" 0.0;
visible: 1;
rel1 {
relative: 0.0 1.0;
offset: 0 -14;
to: "day0";
}
rel2 {
relative: 1.0 1.0;
to: "day0";
}
color: 255 255 255 255;
color2: 0 0 0 96;
color3: 0 0 0 32;
color_class: "module_label";
text {
text: "High0";
font: "Sans:style=Bold";
size: 9;
min: 1 1;
align: 1.0 0.0;
ellipsis: -1.0;
text_class: "module_normal";
}
}
}
part {
name: "day1";
type: RECT;
description {
state: "default" 0.0;
visible: 0;
}
description {
state: "float" 0.0;
visible: 1;
color: 0 0 0 0;
rel1 {
relative: 0.6 0.5;
offset: 4 4;
}
rel2 {
relative: 1.0 1.0;
offset: -1 -1;
}
}
}
part {
name: "e.swallow.day1.icon";
type: SWALLOW;
mouse_events: 0;
description {
state: "default" 0.0;
visible: 0;
}
description {
state: "float" 0.0;
visible: 1;
rel1 {
to: "day1";
}
rel1 {
to: "day1";
}
}
}
part {
name: "e.text.day1.date";
type: TEXT;
effect: OUTLINE_SOFT_SHADOW;
mouse_events: 0;
scale: 1;
description {
state: "default" 0.0;
visible: 0;
}
description {
state: "float" 0.0;
visible: 1;
rel1 {
relative: 0.0 0.0;
offset: 1 1;
to: "day1";
}
rel2 {
relative: 1.0 1.0;
offset: -1 -1;
to: "day1";
}
color: 255 255 255 255;
color2: 0 0 0 96;
color3: 0 0 0 32;
color_class: "module_label";
text {
text: "Date1";
font: "Sans:style=Bold";
size: 9;
min: 1 1;
align: 0.5 0.0;
ellipsis: -1.0;
text_class: "module_normal";
}
}
}
part {
name: "e.text.day1.description";
type: TEXT;
effect: OUTLINE_SOFT_SHADOW;
mouse_events: 0;
scale: 1;
description {
state: "default" 0.0;
visible: 0;
}
description {
state: "float" 0.0;
visible: 1;
rel1 {
relative: 0.0 0.0;
offset: 1 -14;
to_x: "day1";
to_y: "e.text.day1.low";
}
rel2 {
relative: 1.0 0.0;
offset: -1 -1;
to_x: "day1";
to_y: "e.text.day1.low";
}
color: 255 255 255 255;
color2: 0 0 0 96;
color3: 0 0 0 32;
color_class: "module_label";
text {
text: "Description1";
font: "Sans:style=Bold";
size: 10;
min: 1 1;
align: 0.5 0.0;
ellipsis: -1.0;
text_class: "module_normal";
}
}
}
part {
name: "e.text.day1.low";
type: TEXT;
effect: OUTLINE_SOFT_SHADOW;
mouse_events: 0;
scale: 1;
description {
state: "default" 0.0;
visible: 0;
}
description {
state: "float" 0.0;
visible: 1;
rel1 {
relative: 0.0 1.0;
offset: 1 -14;
to: "day1";
}
rel2 {
relative: 1.0 1.0;
offset: -1 -1;
to: "day1";
}
color: 255 255 255 255;
color2: 0 0 0 96;
color3: 0 0 0 32;
color_class: "module_label";
text {
text: "Low1";
font: "Sans:style=Bold";
size: 9;
min: 1 1;
align: 0.0 0.0;
ellipsis: -1.0;
text_class: "module_normal";
}
}
}
part {
name: "e.text.day1.high";
type: TEXT;
effect: OUTLINE_SOFT_SHADOW;
mouse_events: 0;
scale: 1;
description {
state: "default" 0.0;
visible: 0;
}
description {
state: "float" 0.0;
visible: 1;
rel1 {
relative: 0.0 1.0;
offset: 0 -14;
to: "day1";
}
rel2 {
relative: 1.0 1.0;
to: "day1";
}
color: 255 255 255 255;
color2: 0 0 0 96;
color3: 0 0 0 32;
color_class: "module_label";
text {
text: "High1";
font: "Sans:style=Bold";
size: 9;
min: 1 1;
align: 1.0 0.0;
ellipsis: -1.0;
text_class: "module_normal";
}
}
}
}
programs {
program {
name: "text_hide";
signal: "e,state,description,hide";
source: "e";
action: STATE_SET "hidden" 0.0;
target: "e.text.description";
}
program {
name: "text_show";
signal: "e,state,description,show";
source: "e";
action: STATE_SET "default" 0.0;
target: "e.text.description";
}
program {
name: "float";
signal: "e,state,orientation,float";
source: "e";
script {
set_int(is_float, 1);
run_program(PROGRAM:"float_complete");
}
}
program {
name: "float_complete";
action: STATE_SET "float" 0.0;
ORIENT_TARGETS
}
program {
name: "shelf";
signal: "e,state,orientation,default";
source: "e";
script {
set_int(is_float, 0);
run_program(PROGRAM:"shelf_complete");
}
}
program {
name: "shelf_complete";
action: STATE_SET "default" 0.0;
ORIENT_TARGETS
}
}
}
FORECASTS_ICON("rainshowersandthunder_polartwilight", 10, 10, 110, 110, 1.0);
FORECASTS_ICON("lightsleetshowers_night", 10, 10, 110, 110, 1.0);
FORECASTS_ICON("sleetshowers_day", 10, 10, 110, 110, 1.0);
FORECASTS_ICON("lightrainshowers_polartwilight", 10, 10, 110, 110, 1.0);
FORECASTS_ICON("fair_night", 10, 10, 110, 110, 1.0);
FORECASTS_ICON("rainandthunder", 10, 10, 110, 110, 1.0);
FORECASTS_ICON("heavyrainshowers_night", 10, 10, 110, 110, 1.0);
FORECASTS_ICON("lightssnowshowersandthunder_polartwilight", 10, 10, 110, 110, 1.0);
FORECASTS_ICON("sleet", 10, 10, 110, 110, 1.0);
FORECASTS_ICON("snowshowersandthunder_day", 10, 10, 110, 110, 1.0);
FORECASTS_ICON("rainshowers_polartwilight", 10, 10, 110, 110, 1.0);
FORECASTS_ICON("snowshowers_polartwilight", 10, 10, 110, 110, 1.0);
FORECASTS_ICON("heavysnowshowers_day", 10, 10, 110, 110, 1.0);
FORECASTS_ICON("lightrainshowersandthunder_night", 10, 10, 110, 110, 1.0);
FORECASTS_ICON("heavysleetshowers_night", 10, 10, 110, 110, 1.0);
FORECASTS_ICON("rainshowers_night", 10, 10, 110, 110, 1.0);
FORECASTS_ICON("clearsky_night", 10, 10, 110, 110, 1.0);
FORECASTS_ICON("heavysnowshowersandthunder_night", 10, 10, 110, 110, 1.0);
FORECASTS_ICON("partlycloudy_polartwilight", 10, 10, 110, 110, 1.0);
FORECASTS_ICON("heavysleetandthunder", 10, 10, 110, 110, 1.0);
FORECASTS_ICON("heavysleetshowersandthunder_day", 10, 10, 110, 110, 1.0);
FORECASTS_ICON("snowshowers_day", 10, 10, 110, 110, 1.0);
FORECASTS_ICON("lightrainshowers_day", 10, 10, 110, 110, 1.0);
FORECASTS_ICON("heavysleetshowersandthunder_polartwilight", 10, 10, 110, 110, 1.0);
FORECASTS_ICON("snow", 10, 10, 110, 110, 1.0);
FORECASTS_ICON("heavyrainshowersandthunder_polartwilight", 10, 10, 110, 110, 1.0);
FORECASTS_ICON("snowshowersandthunder_polartwilight", 10, 10, 110, 110, 1.0);
FORECASTS_ICON("lightssnowshowersandthunder_day", 10, 10, 110, 110, 1.0);
FORECASTS_ICON("sleetandthunder", 10, 10, 110, 110, 1.0);
FORECASTS_ICON("snowandthunder", 10, 10, 110, 110, 1.0);
FORECASTS_ICON("lightsnowshowers_polartwilight", 10, 10, 110, 110, 1.0);
FORECASTS_ICON("rainshowersandthunder_night", 10, 10, 110, 110, 1.0);
FORECASTS_ICON("lightrainshowersandthunder_day", 10, 10, 110, 110, 1.0);
FORECASTS_ICON("heavysleetshowersandthunder_night", 10, 10, 110, 110, 1.0);
FORECASTS_ICON("fair_day", 10, 10, 110, 110, 1.0);
FORECASTS_ICON("snowshowersandthunder_night", 10, 10, 110, 110, 1.0);
FORECASTS_ICON("lightsnowshowers_night", 10, 10, 110, 110, 1.0);
FORECASTS_ICON("lightsnowandthunder", 10, 10, 110, 110, 1.0);
FORECASTS_ICON("heavysnowshowers_polartwilight", 10, 10, 110, 110, 1.0);
FORECASTS_ICON("heavysnowshowers_night", 10, 10, 110, 110, 1.0);
FORECASTS_ICON("lightsleetandthunder", 10, 10, 110, 110, 1.0);
FORECASTS_ICON("lightssnowshowersandthunder_night", 10, 10, 110, 110, 1.0);
FORECASTS_ICON("heavyrainshowers_polartwilight", 10, 10, 110, 110, 1.0);
FORECASTS_ICON("heavyrainshowersandthunder_day", 10, 10, 110, 110, 1.0);
FORECASTS_ICON("lightssleetshowersandthunder_day", 10, 10, 110, 110, 1.0);
FORECASTS_ICON("lightrainshowersandthunder_polartwilight", 10, 10, 110, 110, 1.0);
FORECASTS_ICON("lightsleetshowers_day", 10, 10, 110, 110, 1.0);
FORECASTS_ICON("sleetshowersandthunder_day", 10, 10, 110, 110, 1.0);
FORECASTS_ICON("heavyrainandthunder", 10, 10, 110, 110, 1.0);
FORECASTS_ICON("heavyrainshowersandthunder_night", 10, 10, 110, 110, 1.0);
FORECASTS_ICON("rainshowers_day", 10, 10, 110, 110, 1.0);
FORECASTS_ICON("heavysnowshowersandthunder_polartwilight", 10, 10, 110, 110, 1.0);
FORECASTS_ICON("lightssleetshowersandthunder_polartwilight", 10, 10, 110, 110, 1.0);
FORECASTS_ICON("clearsky_day", 10, 10, 110, 110, 1.0);
FORECASTS_ICON("heavyrainshowers_day", 10, 10, 110, 110, 1.0);
FORECASTS_ICON("fair_polartwilight", 10, 10, 110, 110, 1.0);
FORECASTS_ICON("lightssleetshowersandthunder_night", 10, 10, 110, 110, 1.0);
FORECASTS_ICON("lightsnow", 10, 10, 110, 110, 1.0);
FORECASTS_ICON("heavysnowandthunder", 10, 10, 110, 110, 1.0);
FORECASTS_ICON("lightrainandthunder", 10, 10, 110, 110, 1.0);
FORECASTS_ICON("sleetshowers_night", 10, 10, 110, 110, 1.0);
FORECASTS_ICON("lightrainshowers_night", 10, 10, 110, 110, 1.0);
FORECASTS_ICON("lightsleet", 10, 10, 110, 110, 1.0);
FORECASTS_ICON("lightsleetshowers_polartwilight", 10, 10, 110, 110, 1.0);
FORECASTS_ICON("snowshowers_night", 10, 10, 110, 110, 1.0);
FORECASTS_ICON("heavyrain", 10, 10, 110, 110, 1.0);
FORECASTS_ICON("rainshowersandthunder_day", 10, 10, 110, 110, 1.0);
FORECASTS_ICON("heavysleet", 10, 10, 110, 110, 1.0);
FORECASTS_ICON("heavysleetshowers_day", 10, 10, 110, 110, 1.0);
FORECASTS_ICON("heavysnowshowersandthunder_day", 10, 10, 110, 110, 1.0);
FORECASTS_ICON("cloudy", 10, 10, 110, 110, 1.0);
FORECASTS_ICON("lightsnowshowers_day", 10, 10, 110, 110, 1.0);
FORECASTS_ICON("heavysleetshowers_polartwilight", 10, 10, 110, 110, 1.0);
FORECASTS_ICON("heavysnow", 10, 10, 110, 110, 1.0);
FORECASTS_ICON("sleetshowersandthunder_polartwilight", 10, 10, 110, 110, 1.0);
FORECASTS_ICON("lightrain", 10, 10, 110, 110, 1.0);
FORECASTS_ICON("sleetshowersandthunder_night", 10, 10, 110, 110, 1.0);
FORECASTS_ICON("sleetshowers_polartwilight", 10, 10, 110, 110, 1.0);
FORECASTS_ICON("clearsky_polartwilight", 10, 10, 110, 110, 1.0);
FORECASTS_ICON("rain", 10, 10, 110, 110, 1.0);
FORECASTS_ICON("partlycloudy_day", 10, 10, 110, 110, 1.0);
FORECASTS_ICON("partlycloudy_night", 10, 10, 110, 110, 1.0);
FORECASTS_ICON("fog", 10, 10, 110, 110, 1.0);
}