Пример #1
0
 protected override void OnCompile()
 {
     this.Add(new UI16(base.CharacterID));
     this.Add(this._Bounds);
     AB item = new AB(2);
     item.Append(new UB(1, 1));
     item.Append(new UB(1, Convert.ToInt32( this.WordWrap)));
     item.Append(new UB(1, Convert.ToInt32( this.Multitile)));
     item.Append(new UB(1, Convert.ToInt32( this.PasswordFiled)));
     item.Append(new UB(1, Convert.ToInt32( this.ReadOnly)));
     item.Append(new UB(1, 1));
     item.Append(new UB(1, 0));
     item.Append(new UB(1, 1));
     item.Append(new UB(2, 0));
     item.Append(new UB(1, 0));
     item.Append(new UB(1, Convert.ToInt32( !this.Selectable)));
     item.Append(new UB(1, Convert.ToInt32( this.HasBorder)));
     item.Append(new UB(2, 0));
     item.Append(new UB(1, 0));
     this.Add(item);
     this.Add(new UI16(this.FontID));
     this.Add(new UI16(this.Height));
     RGBA rgba = new RGBA(this.TextColor.Red, this.TextColor.Green, this.TextColor.Blue, 0);
     this.Add(rgba);
     this.Add(new STRING(this.VarName));
     this.Add(new STRING(this.Text));
     base.OnCompile();
 }
Пример #2
0
 protected override void OnCompile()
 {
     bool flag = false;
     bool flag2 = false;
     bool flag3 = false;
     bool flag4 = false;
     bool flag5 = false;
     if (this._matrix != null)
     {
         flag = true;
     }
     if (this._character != null)
     {
         flag3 = true;
     }
     if (this.Name != null)
     {
         flag2 = true;
     }
     if (this.ColorTransform != null)
     {
         flag4 = true;
     }
     AB item = new AB(1);
     item.Append(new UB(2, 0));
     item.Append(new UB(1, Convert.ToInt32( flag2)));
     item.Append(new UB(1, Convert.ToInt32( flag5)));
     item.Append(new UB(1, Convert.ToInt32( flag4)));
     item.Append(new UB(1, Convert.ToInt32( flag)));
     item.Append(new UB(1, Convert.ToInt32( flag3)));
     item.Append(new UB(1, 0));
     this.Add(item);
     this.Add(new UI16(this._character.Depth));
     if (flag3)
     {
         this.Add(new UI16(this._character.CharacterID));
     }
     if (flag)
     {
         this.Add(this._matrix);
     }
     if (flag4)
     {
         this.Add(this.ColorTransform);
     }
     if (flag5)
     {
         this.Add(new UI16(this.Ratio));
     }
     if (flag2)
     {
         this.Add(new STRING(this.Name));
     }
     base.OnCompile();
 }
Пример #3
0
 public ButtonRecord(int CharacterID, bool hitTest, bool Down, bool Over, bool Up)
 {
     AB item = new AB(1);
     item.Append(new UB(4, 0));
     item.Append(new UB(1, Convert.ToInt32( hitTest)));
     item.Append(new UB(1, Convert.ToInt32( Down)));
     item.Append(new UB(1, Convert.ToInt32( Over)));
     item.Append(new UB(1, Convert.ToInt32( Up)));
     this.Add(item);
     this.Add(new UI16(CharacterID));
     this.Add(new UI16(1));
     Matrix matrix = new Matrix();
     matrix.Tanslate(200, 200);
     this.Add(matrix);
 }
Пример #4
0
 public RecordHeader(int tipo, int length)
 {
     AB item = new AB(2, true);
     item.Append(new UB(10, tipo));
     if (length > 0x3e)
     {
         item.Append(new Bits("111111"));
         this.Add(item);
         this.Add(new UI32(length));
     }
     else
     {
         item.Append(new UB(6, length));
         this.Add(item);
     }
 }
Пример #5
0
 protected override void OnCompile()
 {
     this.Add(new UI16(base.FontID));
     AB item = new AB(2);
     item.Append(new UB(1, 0));
     item.Append(new UB(1, 0));
     item.Append(new UB(1, 0));
     item.Append(new UB(1, 0));
     item.Append(new UB(1, 0));
     item.Append(new UB(1, 1));
     item.Append(new UB(1, 0));
     item.Append(new UB(1, (int) this.FontBold));
     item.Append(new UB(8, (int) this.FontItalic));
     this.Add(item);
     this.Add(new UI8(this.FontName.Length));
     this.Add(new STRING(this.FontName, false));
     this.Add(new UI16(0));
     base.OnCompile();
 }
Пример #6
0
 protected override void OnCompile()
 {
     this.Add(this.FillStyles);
     this.Add(this.LineStyles);
     AB item = new AB(1);
     if (this.FillStyles.Count > 0)
     {
         this.nFillBits = UB.NumBits((long) this.FillStyles.Count);
     }
     if (this.LineStyles.Count > 0)
     {
         this.nLineBits = UB.NumBits((long) this.LineStyles.Count);
     }
     item.Append(new UB(4, this.nFillBits));
     item.Append(new UB(4, this.nLineBits));
     this.Add(item);
     this.Records.Add(new EndShapeRecord());
     this.Add(this.Records);
 }