X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=src%2Fswfc.c;h=db03652e5f3001fbeaae66143cd5b93826b6059e;hb=c5185094615e30a40e606fd880498136135468b1;hp=70920df223fdd5b93d266927a0896d87a17ebc65;hpb=ad6864172a8e4b12aad9505c054069958350ae60;p=swftools.git diff --git a/src/swfc.c b/src/swfc.c index 70920df..db03652 100644 --- a/src/swfc.c +++ b/src/swfc.c @@ -508,9 +508,6 @@ void s_buttonput(char*character, char*as, parameters_t p) break; s++; } - printf("%s\n", as); - swf_DumpMatrix(stdout,&mybutton.records[0].matrix); - } static void setbuttonrecords(TAG*tag) { @@ -552,10 +549,24 @@ void s_buttonaction(int flags, char*action) swf_ActionFree(a); } +static void setactionend(TAG*tag) +{ + if(!mybutton.nr_actions) { + /* no actions means we didn't have an actionoffset, + which means we can't signal the end of the + buttonaction records, so, *sigh*, we have + to insert a dummy record */ + swf_SetU16(tag, 0); //offset + swf_SetU16(tag, 0); //condition + swf_SetU8(tag, 0); //action + } +} + static void s_endButton() { SRECT r; setbuttonrecords(stack[stackpos-1].tag); + setactionend(stack[stackpos-1].tag); stackpos--; swf_ButtonPostProcess(stack[stackpos].tag, mybutton.nr_actions); @@ -2429,6 +2440,7 @@ static int c_edittext(map_t*args) char*htmlstr = lu(args, "html"); char*noselectstr = lu(args, "noselect"); char*readonlystr = lu(args, "readonly"); + char*borderstr = lu(args, "border"); int flags = 0; if(!strcmp(passwordstr, "password")) flags |= ET_PASSWORD; @@ -2437,6 +2449,7 @@ static int c_edittext(map_t*args) if(!strcmp(readonlystr, "readonly")) flags |= ET_READONLY; if(!strcmp(htmlstr, "html")) flags |= ET_HTML; if(!strcmp(noselectstr, "noselect")) flags |= ET_NOSELECT; + if(!strcmp(borderstr, "border")) flags |= ET_BORDER; s_edittext(name, font, size, width, height, text, &color, maxlength, variable, flags); return 0; @@ -2490,7 +2503,7 @@ static struct { {"egon", c_egon, "name vertices color=white line=1 @fill=none"}, {"text", c_text, "name text font size=100% color=white"}, - {"edittext", c_edittext, "name font size=100% width height text="" color=white maxlength=0 variable="" @password=0 @wordwrap=0 @multiline=0 @html=0 @noselect=0 @readonly=0"}, + {"edittext", c_edittext, "name font size=100% width height text="" color=white maxlength=0 variable="" @password=0 @wordwrap=0 @multiline=0 @html=0 @noselect=0 @readonly=0 @border=0"}, {"morphshape", c_morphshape, "name start end"}, {"button", c_button, "name"}, {"show", c_show, "name x=0 y=0 red=+0 green=+0 blue=+0 alpha=+0 luminance= scale= scalex= scaley= pivot= pin= shear= rotate= ratio= above= below= as="},