internal CustomResolution(CustomDisplay customDisplay) { Width = customDisplay.Width; Height = customDisplay.Height; ColorDepth = customDisplay.Depth; ColorFormat = customDisplay.ColorFormat; Timing = customDisplay.Timing; XRatio = customDisplay.XRatio; YRatio = customDisplay.YRatio; }
public override void Write() { _worldPacket.WritePackedGuid(CharGUID); _worldPacket.WriteUInt8(SexID); _worldPacket.WriteUInt8(SkinID); _worldPacket.WriteUInt8(HairColorID); _worldPacket.WriteUInt8(HairStyleID); _worldPacket.WriteUInt8(FacialHairStyleID); _worldPacket.WriteUInt8(FaceID); CustomDisplay.ForEach(id => _worldPacket.WriteUInt8(id)); _worldPacket.WriteBits(CharName.GetByteCount(), 6); _worldPacket.FlushBits(); _worldPacket.WriteString(CharName); }
private void ShowCustom(Rect texRect, CustomDisplay custom) { if (size == ShowControlSize.Normal) { GUI.DrawTexture(texRect, custom.customTexture); } else { Rect groupRect = new Rect(texRect.x, texRect.y, texSize, verticalSize); GUI.BeginGroup(groupRect); GUI.DrawTexture(new Rect(0, -verticalSize / 2, texSize, texSize), custom.customTexture, ScaleMode.ScaleToFit); GUI.EndGroup(); } }
private void OnCustomColumnDisplayText(object sender, DevExpress.Xpf.Grid.CustomColumnDisplayTextEventArgs e) { CustomDisplay.FormatStorageColumns(e); }
private void ShowCustom(Rect texRect, CustomDisplay custom) { if (size == ShowControlSize.Normal) { GUI.DrawTexture(texRect, custom.customTexture); } else { Rect groupRect = new Rect(texRect.x, texRect.y, texSize, verticalSize); GUI.BeginGroup(groupRect); GUI.DrawTexture(new Rect(0, -verticalSize / 2, texSize, texSize), custom.customTexture, ScaleMode.ScaleToFit); GUI.EndGroup(); } }
/// <summary> /// Creates a ControlItem that uses a custom display. /// /// <example><code>new ControlItem("Move around", CustomDisplay.wasd);</code></example> /// </summary> public ControlItem(string description, CustomDisplay custom) { this.description = description; this.custom = custom; }
private void Awake() { current = this; pv = GetComponent <PhotonView>(); customController = GetComponent <CustomController>(); }
/// <summary> /// This is the method that actually does the work. /// </summary> /// <param name="DA">The DA object is used to retrieve from inputs and store in outputs.</param> protected override void SolveInstance(IGH_DataAccess DA) { if (!this.Hidden) { try { m_display.Clear(); } catch { m_display = new CustomDisplay(true); } GH_Structure <IGH_GeometricGoo> geo = new GH_Structure <IGH_GeometricGoo>(); List <Color> colors = new List <Color>(); int style = 4; int size = 1; if (!DA.GetDataTree(0, out geo)) { return; } if (!DA.GetDataList(1, colors)) { return; } DA.GetData(2, ref style); DA.GetData(3, ref size); try { geo.Simplify(GH_SimplificationMode.CollapseAllOverlaps); if (geo.Branches.Count == colors.Count) { for (int i = 0; i < geo.Branches.Count; i++) { ConcurrentQueue <Point3d> points = new ConcurrentQueue <Point3d>(); // Testing first object if (geo.Branches[i][0] is GH_Point) { Parallel.ForEach(geo.Branches[i], obj => { if (obj is GH_Point) { GH_Point p = new GH_Point(); if (GH_Convert.ToGHPoint(obj, GH_Conversion.Both, ref p)) { points.Enqueue(new Point3d(p.Value.X, p.Value.Y, p.Value.Z)); } } }); } // Testing for mesh else if (geo.Branches[i][0].TypeName == "Mesh") { Parallel.ForEach(geo.Branches[i], obj => { if (obj.TypeName == "Mesh") { Mesh m = new Mesh(); if (GH_Convert.ToMesh(obj, ref m, GH_Conversion.Both)) { points = new ConcurrentQueue <Point3d>(m.Vertices.ToPoint3dArray()); } } }); } PointStyle pointStyle = (PointStyle)style; m_display.AddPoints(points, colors[i], pointStyle, size); } } else { this.AddRuntimeMessage(GH_RuntimeMessageLevel.Warning, "Data input incorrect!"); } } catch (Exception e) { this.AddRuntimeMessage(GH_RuntimeMessageLevel.Error, e.Message); } } }
/// <summary> /// Creates a ControlItem that uses a custom display. /// /// <example><code>new ControlItem("Move around", CustomDisplay.wasd);</code></example> /// </summary> public ControlItem(string description, CustomDisplay custom) { this.description = description; this.custom = custom; }