Difference between revisions of "Translations:Virtual/10/ru"

From Larnitech wiki page
Jump to navigation Jump to search
(Created page with "Скрипт обработки нажатия <syntaxhighlight lang="cpp" line> u8 state[2] = {0,0}; V-ID/142:99 { if (opt(0)==0xff){ if (state[0]==0) state[0] =...")
 
 
Line 1: Line 1:
 
Скрипт обработки нажатия
 
Скрипт обработки нажатия
 
<syntaxhighlight lang="cpp" line>
 
<syntaxhighlight lang="cpp" line>
u8 state[2] = {0,0};
+
u8 dim = 0;
V-ID/142:99
+
 
{
+
V-ID/Dimmer{
    if (opt(0)==0xff){
+
  if (opt(0)==0xff)
        if (state[0]==0) state[0] = 1;
+
    setStatus(Dimmer,{1,dim});
        else state[0] = 0;
+
  else if (opt(0)==0xfe){
    }else (opt(0)==0xfe){
+
     dim=opt(1);
    state[0]=state[0];
+
     setStatus(Dimmer,{1,dim});
     }else {
+
  }
    state[0]=opt(0);
 
     }
 
 
    if(opt(1)==0xfe){
 
    state[1]=state[1];
 
    }else {
 
  state[1]=opt(1);
 
    }
 
    setStatus(142:99,state); 
 
 
}
 
}
 
</syntaxhighlight>
 
</syntaxhighlight>

Latest revision as of 14:30, 7 November 2025

Information about message (contribute)
This message has no documentation. If you know where or how this message is used, you can help other translators by adding documentation to this message.
Message definition (Virtual)
The script  processing of stroke
<syntaxhighlight lang="cpp" line>
u8 state[2] = {0,0};
V-ID/142:99
{
   if (opt(0)==0xff){
       if (state[0]==0) state[0] = 1;
       else state[0] = 0;
   }else (opt(0)==0xfe){
     state[0]=state[0];
   }else {
     state[0]=opt(0);
   }
 
   if(opt(1)==0xfe){
     state[1]=state[1];
   }else {
  state[1]=opt(1);
   }
   setStatus(142:99,state);  
}
</syntaxhighlight>
TranslationСкрипт обработки нажатия
<syntaxhighlight lang="cpp" line>
u8 dim = 0;

V-ID/Dimmer{
  if (opt(0)==0xff)
   setStatus(Dimmer,{1,dim});
  else if (opt(0)==0xfe){
   dim=opt(1);
   setStatus(Dimmer,{1,dim});
  }
}
</syntaxhighlight>

Скрипт обработки нажатия

 1u8 dim = 0;
 2
 3V-ID/Dimmer{
 4  if (opt(0)==0xff)
 5    setStatus(Dimmer,{1,dim});
 6  else if (opt(0)==0xfe){
 7    dim=opt(1);
 8    setStatus(Dimmer,{1,dim});
 9  }
10}