/// <summary> /// Create a survey element by making a default circle element, then creating the GLCircle, and then adding this to the parent element list. /// </summary> /// <param name="parent"></param> /// <param name="oSurveyPoint"></param> /// <param name="a_oDefaultEffect"></param> /// <param name="SPIndex"></param> private void CreateSurveyPoint(SceenElement parent, SurveyPoint oSurveyPoint, GLEffect a_oDefaultEffect, int SPIndex) { Vector3 v3SPPos = new Vector3((float)oSurveyPoint.Position.X, (float)oSurveyPoint.Position.Y, 0.0f); CircleElement oSurveyPointElement = new CircleElement(); oSurveyPointElement.EntityID = oSurveyPoint.Id; GLCircle oSPCircle = new GLCircle(a_oDefaultEffect, v3SPPos, 4.0f / m_fZoomScaler, Color.White, UIConstants.Textures.DEFAULT_TEXTURE); GLUtilities.GLFont oNameLable = new GLUtilities.GLFont(SceenDefaultEffect, v3SPPos, UIConstants.DEFAULT_TEXT_SIZE, Color.White, UIConstants.Textures.DEFAULT_GLFONT2, SPIndex.ToString()); oSurveyPointElement._isSurveyPoint = true; oSurveyPointElement.Lable = oNameLable; oSurveyPointElement.Lable.Size = UIConstants.DEFAULT_TEXT_SIZE / m_fZoomScaler; //Initial taskgroup names weren't being scaled properly for whatever reason. oSurveyPointElement.RealSize = new Vector2(0.0001f, 0.0001f) / m_fZoomScaler; oSurveyPointElement.PrimaryPrimitive = oSPCircle; oSurveyPointElement.AddPrimitive(oSPCircle); parent.AddChildElement(oSurveyPointElement); }
private void CreateJumpPoint(SceenElement parent, JumpPoint oJumpPoint) { SceenElement oJumpPointElement = new JumpPointElement(oJumpPoint); oJumpPointElement.EntityID = oJumpPoint.Id; Vector3 v3JPPos = new Vector3((float)oJumpPoint.Position.X, (float)oJumpPoint.Position.Y, 0.0f); GLQuad oJPQuad = new GLUtilities.GLQuad(SceenDefaultEffect, v3JPPos, new Vector2(0.0001f, 0.0001f), // what size is a jump point anyway??? Color.Cyan, UIConstants.Textures.DEFAULT_JUMPPOINT_ICON); GLUtilities.GLFont oNameLable = new GLUtilities.GLFont(SceenDefaultEffect, v3JPPos, UIConstants.DEFAULT_TEXT_SIZE, Color.Cyan, UIConstants.Textures.DEFAULT_GLFONT2, oJumpPoint.Name); oJumpPointElement.Lable = oNameLable; oJumpPointElement.PrimaryPrimitive = oJPQuad; oJumpPointElement.AddPrimitive(oJPQuad); oJumpPointElement.RealSize = new Vector2(0.0001f, 0.0001f); parent.AddChildElement(oJumpPointElement); }
private void CreateJumpPoint(SceenElement parent, JumpPoint oJumpPoint) { SceenElement oJumpPointElement = new JumpPointElement(oJumpPoint); oJumpPointElement.EntityID = oJumpPoint.Id; Vector3 v3JPPos = new Vector3((float)oJumpPoint.Position.X, (float)oJumpPoint.Position.Y, 0.0f); GLQuad oJPQuad = new GLUtilities.GLQuad(SceenDefaultEffect, v3JPPos, new Vector2(0.0001f, 0.0001f), // what size is a jump point anyway??? Color.Cyan, UIConstants.Textures.DEFAULT_JUMPPOINT_ICON); GLUtilities.GLFont oNameLable = new GLUtilities.GLFont(SceenDefaultEffect, v3JPPos, UIConstants.DEFAULT_TEXT_SIZE, Color.Cyan, UIConstants.Textures.DEFAULT_GLFONT2, oJumpPoint.Name); oJumpPointElement.Lable = oNameLable; oJumpPointElement.PrimaryPrimitive = oJPQuad; oJumpPointElement.AddPrimitive(oJPQuad); oJumpPointElement.RealSize = new Vector2(0.0001f, 0.0001f); parent.AddChildElement(oJumpPointElement); }