321 lines
7.1 KiB
Plaintext
321 lines
7.1 KiB
Plaintext
// Fonts to be inlined and used that a user might not have already installed
|
|
fonts
|
|
{
|
|
// The first argument is the file, just like images, the second is the
|
|
// font name this font is to be known as by edje text objects as the
|
|
// font name
|
|
font: "Vera.ttf" "Edje.Font.Name";
|
|
}
|
|
|
|
// Images in the image database for the output file
|
|
images
|
|
{
|
|
// image "filename.png" STORAGE_MEOTHD [option to storage method];
|
|
// STORAGE_METHOD can be:
|
|
// COMP = compressed, no loss
|
|
// RAW = uncompressed, no loss
|
|
// LOSSY = compressed with quality loss, next param is quality level (0-100)
|
|
image: "bg.png" LOSSY 80; /* raw pixels */
|
|
image: "e.png" COMP; /* compressed */
|
|
}
|
|
|
|
// data can be attached to the edje file as a whole. string key, value style
|
|
data
|
|
{
|
|
item: "Key" "This is a"" continued string";
|
|
item: "My Data" "The string to attach to this data";
|
|
item: "The Key" "String data attached to the key";
|
|
}
|
|
|
|
collections
|
|
{
|
|
group
|
|
{
|
|
name: "test";
|
|
// min: 0 0;
|
|
// max: 0 0;
|
|
// more data that can be attached per collection
|
|
data
|
|
{
|
|
item: "My Data" "The string to attach to this data";
|
|
item: "The Key" "String data attached to the key";
|
|
}
|
|
// this section is optional. it contains all "shared" subroutines for this
|
|
// group. so if any program scripts call functions that are not edje
|
|
// exported calls, then this is where you put your own subroutines.
|
|
script
|
|
{
|
|
my_routine(var)
|
|
{
|
|
new i;
|
|
|
|
if (var > 10) tst();
|
|
if (var > 20)
|
|
{
|
|
for (i = 20; i < var; i++)
|
|
emit("SMELLY", "Fish");
|
|
}
|
|
}
|
|
|
|
tst()
|
|
{
|
|
return 0;
|
|
}
|
|
|
|
// a special function for handling app messages - put it here if you want to
|
|
// handle messages from apps
|
|
public message(Msg_Type:type, id, ...)
|
|
{
|
|
emit("MSG", "PROCESS");
|
|
if (type == MSG_NONE)
|
|
{
|
|
new buf[100];
|
|
|
|
snprintf(buf, sizeof(buf), "ID: %i", id);
|
|
emit("MESSAGE_NONE", buf);
|
|
}
|
|
else if (type == MSG_STRING)
|
|
{
|
|
new str[100];
|
|
new buf[100];
|
|
|
|
snprintf(buf, sizeof(buf), "MESSAGE STRING ID: %i", id);
|
|
getsarg(2, str, 100);
|
|
emit(buf, str);
|
|
}
|
|
else if (type == MSG_INT_SET)
|
|
{
|
|
new buf[100];
|
|
|
|
snprintf(buf, sizeof(buf), "MESSAGE INT SET ID: %i", id);
|
|
for (new i = 2; i < numargs(); i++)
|
|
{
|
|
new val;
|
|
new str[100];
|
|
|
|
val = getarg(i);
|
|
snprintf(str, sizeof(str), "V %i", val);
|
|
emit(buf, str);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
parts
|
|
{
|
|
part
|
|
{
|
|
name: "background";
|
|
// IMAGE, RECT, TEXT, SWALLOW
|
|
// type: IMAGE;
|
|
// for text only really
|
|
// NONE, PLAIN, OUTLINE, SOFT_OUTLINE, SHADOW, SOFT_SHADOW, OUTLINE_SHADOW,
|
|
// OUTLINE_SOFT_SHADOW
|
|
// effect: NONE;
|
|
mouse_events: 0;
|
|
// repeat_events: 0;
|
|
// clip_to: "p1";
|
|
// color_class: "default";
|
|
// text_class: "default";
|
|
// dragable
|
|
// {
|
|
// direction, on/off stepping count
|
|
// x: 0 1 2;
|
|
// y: 0 1 2;
|
|
// confine: "p2";
|
|
// }
|
|
description
|
|
{
|
|
// state, "name" (float value 0.0 - 1.0)
|
|
state: "default" 0.0;
|
|
visible: 1;
|
|
// align: 0.5 0.5;
|
|
// min: 0 0;
|
|
// max: 0 0;
|
|
// step: 1 1;
|
|
// aspect: 0.0 999999.0;
|
|
// can be NONE VERTICAL HORIZONTAL and BOTH - depending which axis (if any)
|
|
// is used as a master control on aspect calculations
|
|
// aspect_preference: NONE;
|
|
rel1
|
|
{
|
|
relative: 0.0 0.0;
|
|
offset: 0 0;
|
|
// if not defined assumed to be -1 (relative to all). to alone implies x & y
|
|
// to: "p2";
|
|
// relative to thia named part only in X direction
|
|
// to_x: "p2";
|
|
// and relative to this part only in the y direction
|
|
// to_y: "p2";
|
|
}
|
|
rel2
|
|
{
|
|
relative: 1.0 1.0;
|
|
offset: -1 -1;
|
|
}
|
|
image
|
|
{
|
|
normal: "bg.png";
|
|
// tween images are images that are looped thru when graduating TO normal
|
|
// tween: "test2.png";
|
|
// tween: "test3.png";
|
|
}
|
|
border: 12 12 12 12;
|
|
// fill
|
|
// {
|
|
// smooth: 1;
|
|
// origin
|
|
// {
|
|
// relative: 0.0 0.0;
|
|
// offset: 0 0;
|
|
// }
|
|
// size
|
|
// {
|
|
// relative: 1.0 1.0;
|
|
// offset: 0 0;
|
|
// }
|
|
// }
|
|
// only useful if its a rect or text object
|
|
// color: 255 255 255 255;
|
|
// only useful if its a text object
|
|
// color2: 255 255 255 255;
|
|
// color3: 255 255 255 255;
|
|
// text
|
|
// {
|
|
// text: "test text";
|
|
// font: "Vera";
|
|
// size: 12;
|
|
// fit: 0 0;
|
|
// min: 1 1;
|
|
// align: 0.5 0.5;
|
|
// alipsis: 0.0;
|
|
// }
|
|
}
|
|
}
|
|
part
|
|
{
|
|
name: "logo";
|
|
description
|
|
{
|
|
state: "default" 0.0;
|
|
visible: 1;
|
|
max: 64 64;
|
|
rel1
|
|
{
|
|
relative: 0.0 0.0;
|
|
offset: 16 16;
|
|
}
|
|
rel2
|
|
{
|
|
relative: 1.0 1.0;
|
|
offset: -17 -17;
|
|
}
|
|
image
|
|
{
|
|
normal: "e.png";
|
|
}
|
|
}
|
|
description
|
|
{
|
|
state: "clicked" 0.0;
|
|
visible: 1;
|
|
align: 0.5 0.5;
|
|
max: 64 64;
|
|
rel1
|
|
{
|
|
relative: 0.0 0.0;
|
|
offset: 16 16;
|
|
}
|
|
rel2
|
|
{
|
|
relative: 1.0 1.0;
|
|
offset: -17 -17;
|
|
}
|
|
image
|
|
{
|
|
normal: "e.png";
|
|
}
|
|
}
|
|
}
|
|
}
|
|
programs
|
|
{
|
|
program
|
|
{
|
|
name: "logo_click";
|
|
signal: "mouse,down,1";
|
|
source: "logo";
|
|
// STATE_SET, ACTION_STOP, SIGNAL_EMIT, DRAG_VAL_SET, DRAG_VAL_STEP, DRAG_VAL_PAGE
|
|
action: STATE_SET "clicked" 0.0;
|
|
// LINEAR, SINUSOIDAL, ACCELERATE, DECELERATE, + seconds to transition over
|
|
// transition: LINEAR 0.0;
|
|
// who to apply this state to, can be multiple targets
|
|
target: "logo";
|
|
// after: "p1_fade_1";
|
|
}
|
|
program
|
|
{
|
|
name: "logo_unclick";
|
|
signal: "mouse,up,1";
|
|
source: "logo";
|
|
action: STATE_SET "default" 0.0;
|
|
target: "logo";
|
|
}
|
|
program
|
|
{
|
|
name: "logo_unclick_script";
|
|
signal: "mouse,up,1";
|
|
source: "logo";
|
|
// code to execute if this program matches. it can use subroutines declared
|
|
// for this group or functions exported
|
|
script
|
|
{
|
|
new i = 5;
|
|
|
|
while (i > 0)
|
|
{
|
|
my_routine(10 + (i * 5));
|
|
i--;
|
|
}
|
|
}
|
|
}
|
|
/*
|
|
program
|
|
{
|
|
name: "p1_fade_2";
|
|
signal: "action,end";
|
|
source: "p1_fade_1";
|
|
action: STATE_SET "clicked" 0.0;
|
|
transition: LINEAR 1.0;
|
|
target: "p1";
|
|
after: "p1_fade_1";
|
|
}
|
|
program
|
|
{
|
|
name: "p1_unclicked";
|
|
signal: "mouse,up,1";
|
|
source: "p1";
|
|
action: STATE_SET "default" 0.0;
|
|
transition: LINEAR 0.0;
|
|
target: "p1";
|
|
}
|
|
*/
|
|
}
|
|
}
|
|
/*
|
|
group
|
|
{
|
|
name: "test2";
|
|
parts
|
|
{
|
|
part
|
|
{
|
|
name: "p1";
|
|
}
|
|
}
|
|
programs
|
|
{
|
|
}
|
|
}
|
|
*/
|
|
}
|