use a macro to reduce edc size

This commit is contained in:
Vincent Torri 2021-04-01 22:52:17 +02:00
parent 005421e28d
commit fd3370dcdf
1 changed files with 30 additions and 96 deletions

View File

@ -1,3 +1,29 @@
#define ICON_PART(_NAME, _OFFX) \
part \
{ \
name: "entice."_NAME; \
type: SWALLOW; \
clip_to: fader; \
scale: 1; \
description \
{ \
state: "default" 0.0; \
rel1.relative: 1.0 1.0; \
rel2.relative: 1.0 1.0; \
rel1.offset: 0 0; \
rel2.offset: (-16-_OFFX) -16; \
align: 1.0 1.0; \
offscale; \
} \
description { state: "disable" 0.0; \
inherit: "default" 0.0; \
visible: 0; \
} \
} \
program { signal: "mouse,clicked,1"; source: "entice."_NAME; \
action: SIGNAL_EMIT "image,action,"_NAME "entice"; \
}
collections
{
group { name: "entice/core";
@ -46,108 +72,16 @@ collections
// CONTROLS
// Next icon
part
{
name: "entice.next";
type: SWALLOW;
clip_to: fader;
scale: 1;
description
{
state: "default" 0.0;
rel1.relative: 1.0 1.0;
rel2.relative: 1.0 1.0;
rel1.offset: 0 0;
rel2.offset: -16 -16;
align: 1.0 1.0;
offscale;
}
description { state: "disable" 0.0;
inherit: "default" 0.0;
visible: 0;
}
}
program { signal: "mouse,clicked,1"; source: "entice.next";
action: SIGNAL_EMIT "image,action,next" "entice";
}
ICON_PART("next", 0)
// Previous icon
part
{
name: "entice.prev";
type: SWALLOW;
clip_to: fader;
scale: 1;
description
{
state: "default" 0.0;
rel1.relative: 1.0 1.0;
rel2.relative: 1.0 1.0;
rel1.offset: 0 0;
rel2.offset: -40 -16;
align: 1.0 1.0;
offscale;
}
description { state: "disable" 0.0;
inherit: "default" 0.0;
visible: 0;
}
}
program { signal: "mouse,clicked,1"; source: "entice.prev";
action: SIGNAL_EMIT "image,action,prev" "entice";
}
ICON_PART("prev", 24)
// Rotate right icon
part
{
name: "entice.rotright";
type: SWALLOW;
clip_to: fader;
scale: 1;
description
{
state: "default" 0.0;
rel1.relative: 1.0 1.0;
rel2.relative: 1.0 1.0;
rel1.offset: 0 0;
rel2.offset: -80 -16;
align: 1.0 1.0;
offscale;
}
description { state: "disable" 0.0;
inherit: "default" 0.0;
visible: 0;
}
}
program { signal: "mouse,clicked,1"; source: "entice.rotright";
action: SIGNAL_EMIT "image,action,rotright" "entice";
}
ICON_PART("rotright", 64)
// Rotate left icon
part
{
name: "entice.rotleft";
type: SWALLOW;
clip_to: fader;
scale: 1;
description
{
state: "default" 0.0;
rel1.relative: 1.0 1.0;
rel2.relative: 1.0 1.0;
rel1.offset: 0 0;
rel2.offset: -104 -16;
align: 1.0 1.0;
offscale;
}
description { state: "disable" 0.0;
inherit: "default" 0.0;
visible: 0;
}
}
program { signal: "mouse,clicked,1"; source: "entice.rotleft";
action: SIGNAL_EMIT "image,action,rotleft" "entice";
}
ICON_PART("rotleft", 88)
// Settings icon
part