код (Отобразить)
CODE:
[code]int pos_size_button0[1][4];
string text_button0[1];
int flag_button0[1];
pos_size_button0[0][0]=37; pos_size_button0[0][1]=45; pos_size_button0[0][2]=100; pos_size_button0[0][3]=20;
text_button0[0]="Êíîïêà 0";
//////////
int pos_size_static0[1][4];
string text_static0[1];
pos_size_static0[0][0]=41; pos_size_static0[0][1]=78; pos_size_static0[0][2]=100; pos_size_static0[0][3]=20;
text_static0[0]="Òåêñò 0";
//////////
createdialog(0, BUTTON, #pos_size_button0[0][0], #text_button0[0], #flag_button0[0] |
STATIC, #pos_size_static0[0][0], #text_static0[0]);
//////////
showdialog(0, "Äèàëîã", 10, 10, 250, 300, 1, 1);
//////////
enabletimer(0);
loop()
{
text_static0[0]=format(flag_button0[0]);
sleep(10);
}
CREATE_TIMER(0, 500)
{
if(flag_button0[0]==1){sleep(1000);flag_button0[0]=0;}
//text_static0[0]=format(flag_button0[0]);
}
string text_button0[1];
int flag_button0[1];
pos_size_button0[0][0]=37; pos_size_button0[0][1]=45; pos_size_button0[0][2]=100; pos_size_button0[0][3]=20;
text_button0[0]="Êíîïêà 0";
//////////
int pos_size_static0[1][4];
string text_static0[1];
pos_size_static0[0][0]=41; pos_size_static0[0][1]=78; pos_size_static0[0][2]=100; pos_size_static0[0][3]=20;
text_static0[0]="Òåêñò 0";
//////////
createdialog(0, BUTTON, #pos_size_button0[0][0], #text_button0[0], #flag_button0[0] |
STATIC, #pos_size_static0[0][0], #text_static0[0]);
//////////
showdialog(0, "Äèàëîã", 10, 10, 250, 300, 1, 1);
//////////
enabletimer(0);
loop()
{
text_static0[0]=format(flag_button0[0]);
sleep(10);
}
CREATE_TIMER(0, 500)
{
if(flag_button0[0]==1){sleep(1000);flag_button0[0]=0;}
//text_static0[0]=format(flag_button0[0]);
}
если быстро нажимать кнопку то со временем она забагается
приходится в конце таймера все кнопки сбрасывать