Exemplo n.º 1
0
 /// <summary>
 /// Draw this line
 /// </summary>
 public virtual bool Draw(RootElement source, OnRenderEventArgs eventArgs)
 {
     if (Visible)
     {
         return(MtaClient.DxDrawLine3D(StartPosition.X, StartPosition.Y, StartPosition.Z, EndPosition.X, EndPosition.Y, EndPosition.Z, Color.Hex, Width, PostGUI));
     }
     return(false);
 }
Exemplo n.º 2
0
        public bool Draw(RootElement source, OnRenderEventArgs eventArgs)
        {
            UpdateDrawables();
            backgroundDrawable.Draw(source, eventArgs);
            nameDrawable.Draw(source, eventArgs);
            timeDrawable.Draw(source, eventArgs);

            return(true);
        }
Exemplo n.º 3
0
 public bool Draw(RootElement source, OnRenderEventArgs eventArgs)
 {
     if (useCustomFont)
     {
         return(MtaClient.DxDrawText(Content, Position.X, Position.Y, BottomRight.X, BottomRight.Y, Color.Hex, Scale.X, Scale.Y, CustomFont.MTAFont, HorizontalAlignment.ToString().ToLower(), VerticalAlignment.ToString().ToLower(), Clip, WordBreak, PostGUI, ColorCoded, SubPixelPositioning, Rotation, RotationOrigin.X, RotationOrigin.Y));
     }
     else
     {
         return(MtaClient.DxDrawText(Content, Position.X, Position.Y, BottomRight.X, BottomRight.Y, Color.Hex, Scale.X, Scale.Y, StandardFont.ToString().ToLower(), HorizontalAlignment.ToString().ToLower(), VerticalAlignment.ToString().ToLower(), Clip, WordBreak, PostGUI, ColorCoded, SubPixelPositioning, Rotation, RotationOrigin.X, RotationOrigin.Y));
     }
 }
Exemplo n.º 4
0
 /// <summary>
 /// Draw this material line
 /// </summary>
 public override bool Draw(RootElement source, OnRenderEventArgs eventArgs)
 {
     if (FaceToward == Vector3.Zero)
     {
         return(MtaClient.DxDrawMaterialLine3D(StartPosition.X, StartPosition.Y, StartPosition.Z, EndPosition.X, EndPosition.Y, EndPosition.Z, Material?.MaterialElement, Width, Color.Hex, PostGUI));
     }
     else
     {
         return(MtaClient.DxDrawMaterialLine3D(StartPosition.X, StartPosition.Y, StartPosition.Z, EndPosition.X, EndPosition.Y, EndPosition.Z, Material?.MaterialElement, Width, Color.Hex, PostGUI, FaceToward.X, FaceToward.Y, FaceToward.Z));
     }
 }
Exemplo n.º 5
0
 public override bool Draw(RootElement source, OnRenderEventArgs eventArgs)
 {
     if (usePath)
     {
         return(MtaClient.DxDrawImageSection(Position.X, Position.Y, Dimensions.X, Dimensions.Y, SectionTopLeft.X, SectionTopLeft.Y, SectionDimensions.X, SectionDimensions.Y, FilePath, Rotation, RotationCenter.X, RotationCenter.Y, Color.Hex, PostGUI));
     }
     else
     {
         return(MtaClient.DxDrawImageSection(Position.X, Position.Y, Dimensions.X, Dimensions.Y, SectionTopLeft.X, SectionTopLeft.Y, SectionDimensions.X, SectionDimensions.Y, Material?.MaterialElement, Rotation, RotationCenter.X, RotationCenter.Y, Color.Hex, PostGUI));
     }
 }
Exemplo n.º 6
0
 public virtual bool Draw(RootElement source, OnRenderEventArgs eventArgs)
 {
     if (usePath)
     {
         return(MtaClient.DxDrawImage(Position.X, Position.Y, Dimensions.X, Dimensions.Y, FilePath, Rotation, RotationCenter.X, RotationCenter.Y, Color.Hex));
     }
     else
     {
         return(MtaClient.DxDrawImage(Position.X, Position.Y, Dimensions.X, Dimensions.Y, Material?.MaterialElement, Rotation, RotationCenter.X, RotationCenter.Y, Color.Hex));
     }
 }
Exemplo n.º 7
0
 public bool Draw(RootElement source, OnRenderEventArgs eventArgs)
 {
     this.image.Draw(source, eventArgs);
     return(true);
 }
Exemplo n.º 8
0
 private void DebugDraw(RootElement source, OnRenderEventArgs eventArgs)
 {
     Draw(source, eventArgs);
 }
Exemplo n.º 9
0
 /// <summary>
 /// Draw this circle
 /// </summary>
 public bool Draw(RootElement source, OnRenderEventArgs eventArgs)
 {
     return(MtaClient.DxDrawCircle(Position.X, Position.Y, Radius, StartAngle, StopAngle, Color.Hex, CenterColor.Hex, Segments, Ratio, PostGUI));
 }
Exemplo n.º 10
0
 /// <summary>
 /// Draw the line
 /// </summary>
 public bool Draw(RootElement source, OnRenderEventArgs eventArgs)
 {
     return(MtaClient.DxDrawLine((int)Position.X, (int)Position.Y, (int)End.X, (int)End.Y, Color.Hex, Width, PostGUI));
 }
Exemplo n.º 11
0
 /// <summary>
 /// Draw this rectangle
 /// </summary>
 public bool Draw(RootElement source, OnRenderEventArgs eventArgs)
 {
     return(MtaClient.DxDrawRectangle(Position.X, Position.Y, Dimensions.X, Dimensions.Y, Color.Hex, PostGUI, SubPixelPositioning));
 }