• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

chronometer code

Messages
118
Country
israel
Hi

I try to find simple code of chronomener but with only 2 button modes.. start and stop (without reset)

does anyone has that code?
 
This is a simple timer with a reset. You should be able to take the reset portion out of it. Hope it helps.

Cheers Greg

Code:
<Element Name="CounterDisplay">
  <Position X="0.000" Y="0.000"/>
  <Visible>(L:MFDOffOn,bool)</Visible>
  <Element>
    <Position X="95.0" Y="476.0" />
    <Visible>(L:TimeDisplay,bool)</Visible>
    <Element>
      <Select>
      <Value>
       (L:NeedNewValue, number) ! if{
       (P:Absolute Time, seconds) 60 % flr (&gt;L:SecondsValue, number)
       1 (&gt;L:NeedNewValue, number) }
       (P:Absolute Time, seconds) 60 % flr (&gt;L:CompareValue, number)
       (L:SecondsValue, number) (L:CompareValue, number) != if{
       0 (&gt;L:NeedNewValue, number)
       (L:StartStop, number) 1 == if{
       (L:SecondsCounter, number) ++ (&gt;L:SecondsCounter, number)
       (L:SecondsCounter, number) 60 == if{ 0 (&gt;L:SecondsCounter1, number)
       (L:MinutesCounter, number) ++ (&gt;L:MinutesCounter, number) }
       (L:MinutesCounter, number) 60 == if{ 0 (&gt;L:MinutesCounter1, number)
       (L:HoursCounter, number) ++ (&gt;L:HoursCounter, number) }
       (L:HoursCounter, number) 9 &gt;
       if{ 0 (&gt;L:HoursCounter, number) }
     </Value>
     </Select>
     <Element>
       <FormattedText X="150" Y="200" Length="20" Font="Arial Black" FontSize="20" Adjust="Left" VerticalAdjust="Center" Color="White" Multiline="Yes" Bright="Yes">
       <String>TIMER:\t\t%((L:HoursCounter, number))%!02d!:%((L:MinutesCounter, number))%!02d!:%((L:SecondsCounter, number))%!02d!</String>
       </FormattedText>
     </Element> 
   </Element>
  </Element>
</Element>
<Element Name="TimerStartStop">
  <Position X="0.000" Y="0.000"/>
  <Visible>(L:MFDOffOn,bool)</Visible>
  <Element>
    <Position X="95.0" Y="500.0" />
    <Visible>(L:TimeDisplay,bool)</Visible>
    <FormattedText X="50" Y="25" Length="14" Font="Arial Black" FontSize="12" Adjust="Center" VerticalAdjust="Center" Color="0xF0D0D0" BackgroundColor="Blue" LineWidth="1" Multiline="No" Bright="Yes">
    <String>START-STOP</String>
    </FormattedText>
  </Element>
</Element>
<Element Name="TimerReset">
  <Position X="0.000" Y="0.000"/>
  <Visible>(L:MFDOffOn,bool)</Visible>
  <Element>
    <Visible>(L:TimeDisplay,bool)</Visible>
    <Position X="150" Y="500" />
    <FormattedText X="50" Y="25" Length="14" Font="Arial Black" FontSize="12" Adjust="Center" VerticalAdjust="Center" Color="0xF0D0D0" BackgroundColor="Blue" LineWidth="1" Multiline="No" Bright="Yes">
    <String>RESET</String>
    </FormattedText>
  </Element>
</Element>

The Mouse Section
Code:
  <Area Left="95.00" Top="500.00" Width="50" Height="25">
    <Visible>(L:MFDOffOn,bool) (L:TimeDisplay,bool)</Visible>
    <Cursor Type="Hand"/>
    <Tooltip>TIMER START STOP</Tooltip>
    <Click>
      (L:StartStop, number) ! (>L:StartStop, number)
      0 (>L:DisplayMenu,bool)
    </Click>  
  </Area>
  <Area Left="150.00" Top="500.00" Width="50" Height="25">
    <Visible>(L:MFDOffOn,bool) (L:TimeDisplay,bool)</Visible>
    <Cursor Type="Hand"/>
    <Tooltip>TIMER RESET</Tooltip>
    <Click>
      0 (>L:HoursCounter, number)
      0 (>L:MinutesCounter, number)
      0 (>L:SecondsCounter, number)
      0 (>L:DisplayMenu,bool)
    </Click>  
  </Area>
 
Last edited:
Back
Top