Ejemplo n.º 1
0
 public PrimitiveBox(PrimBoxType mode, BHAVContainer master)
 {
     Type = mode;
     if (mode == PrimBoxType.True) InstPtr = 254;
     else InstPtr = 255;
     Master = master;
     Nodes = new PrimitiveNode[0];
     Width = 32;
     Height = 32;
     HitTest = ListenForMouse(new Rectangle(0, 0, Width, Height), new UIMouseEvent(MouseEvents));
 }
Ejemplo n.º 2
0
 public PrimitiveBox(PrimBoxType mode, BHAVContainer master)
 {
     Type = mode;
     if (mode == PrimBoxType.True)
     {
         InstPtr = 254;
     }
     else
     {
         InstPtr = 255;
     }
     Master  = master;
     Nodes   = new PrimitiveNode[0];
     Width   = 32;
     Height  = 32;
     HitTest = ListenForMouse(new Rectangle(0, 0, Width, Height), new UIMouseEvent(MouseEvents));
 }
Ejemplo n.º 3
0
        public PrimitiveBox(BHAVInstruction inst, byte ptr, BHAVContainer master)
        {
            Type        = PrimBoxType.Primitive;
            Instruction = inst;
            Descriptor  = PrimitiveRegistry.GetDescriptor(inst.Opcode);
            Operand     = (VMPrimitiveOperand)Activator.CreateInstance(Descriptor.OperandType);
            Operand.Read(inst.Operand);
            InstPtr = ptr;

            Nodes    = new PrimitiveNode[2];
            Nodes[0] = new PrimitiveNode
            {
                Type = NodeType.False
            };
            Nodes[1] = new PrimitiveNode
            {
                Type = NodeType.True
            };

            Title = new UILabel
            {
                Alignment = TextAlignment.Middle | TextAlignment.Center,
                Y         = 0,
                X         = 0
            };
            this.Add(Title);
            Title.CaptionStyle      = TextStyle.DefaultLabel.Clone();
            Title.CaptionStyle.Font = Client.GameFacade.EdithFont;
            Title.CaptionStyle.Size = 14;

            BodyTextStyle      = TextStyle.DefaultLabel.Clone();
            BodyTextStyle.Font = Client.GameFacade.EdithFont;
            BodyTextStyle.Size = 12;

            this.Add(Nodes[0]);
            this.Add(Nodes[1]);

            HitTest = ListenForMouse(new Rectangle(0, 0, Width, Height), new UIMouseEvent(MouseEvents));

            Master = master;
            UpdateDisplay();
        }
Ejemplo n.º 4
0
        public PrimitiveBox(BHAVInstruction inst, byte ptr, BHAVContainer master)
        {
            Type = PrimBoxType.Primitive;
            Instruction = inst;
            Descriptor = PrimitiveRegistry.GetDescriptor(inst.Opcode);
            Operand = (VMPrimitiveOperand)Activator.CreateInstance(Descriptor.OperandType);
            Operand.Read(inst.Operand);
            InstPtr = ptr;

            Nodes = new PrimitiveNode[2];
            Nodes[0] = new PrimitiveNode();
            Nodes[0].Type = NodeType.False;
            Nodes[1] = new PrimitiveNode();
            Nodes[1].Type = NodeType.True;

            Title = new UILabel();
            Title.Alignment = TextAlignment.Middle | TextAlignment.Center;
            Title.Y = 0;
            Title.X = 0;
            this.Add(Title);
            Title.CaptionStyle = TextStyle.DefaultLabel.Clone();
            Title.CaptionStyle.Font = FSO.Client.GameFacade.EdithFont;
            Title.CaptionStyle.Size = 14;

            BodyTextStyle = TextStyle.DefaultLabel.Clone();
            BodyTextStyle.Font = FSO.Client.GameFacade.EdithFont;
            BodyTextStyle.Size = 12;

            this.Add(Nodes[0]);
            this.Add(Nodes[1]);

            HitTest = ListenForMouse(new Rectangle(0, 0, Width, Height), new UIMouseEvent(MouseEvents));

            Master = master;
            UpdateDisplay();
        }