public CFont(CR2WFile cr2w) : base(cr2w) { unicodemapping = new CArray(cr2w) { Name = "Unicode mappings" }; linedist = new CInt32(cr2w) { Name = "Line distance" }; maxglyphheight = new CInt32(cr2w) { Name = "Max glyph height" }; kerning = new CBool(cr2w) { Name = "Kerning" }; glyphs = new CArray(cr2w) { Name = "Glyphs" }; }
public static void OnCellClick(FvCell p_tgtCell, Fv p_fv) { if (p_fv.Data == p_tgtCell) { return; } var items = p_fv.Items; using (items.Defer()) { items.Clear(); FvCell cell = new CBool(); cell.ID = "IsReadOnly"; cell.Title = "只读"; items.Add(cell); foreach (var info in p_tgtCell.GetType().GetProperties(BindingFlags.Instance | BindingFlags.Public)) { // 可设置属性 var attr = (CellParamAttribute)info.GetCustomAttribute(typeof(CellParamAttribute), false); if (attr == null) { continue; } cell = Fv.CreateCell(info.PropertyType, info.Name); cell.Title = attr.Title; items.Add(cell); } } p_fv.Data = p_tgtCell; }
public CFont(IRed3EngineFile cr2w, CVariable parent, string name) : base(cr2w, parent, name) { Unicodemapping = new CArray <CUInt16>(cr2w, this, nameof(Unicodemapping)) { IsSerialized = true, Elementtype = "Uint16" }; Linedist = new CInt32(cr2w, this, nameof(Linedist)) { IsSerialized = true }; Maxglyphheight = new CInt32(cr2w, this, nameof(Maxglyphheight)) { IsSerialized = true }; Kerning = new CBool(cr2w, this, nameof(Kerning)) { IsSerialized = true }; Glyphs = new CArray <CArray <CFloat> >(cr2w, this, nameof(Glyphs)) { IsSerialized = true, Elementtype = "array:2,0,Float" }; }