public static void tooltip(Point dxMousePos)
 {
     overIcon = false;
     if ((GameEngine.Instance.World.isTutorialActive() || Program.mySettings.showGameFeaturesScreenIcon) && ((dxMousePos.X < 0x40) && (dxMousePos.Y > (GameEngine.Instance.GFX.viewHeight() - 0x40))))
     {
         overIcon = true;
         if (GameEngine.Instance.World.isTutorialActive())
         {
             CustomTooltipManager.MouseEnterTooltipArea(0x640);
         }
         else if (Program.mySettings.showGameFeaturesScreenIcon)
         {
             CustomTooltipManager.MouseEnterTooltipArea(0x641);
         }
     }
 }
示例#2
0
 public override void setData(GetReport_ReturnType returnData)
 {
     base.setData(returnData);
     base.lblSecondaryText.Text = CustomTooltipManager.getAchievementTitle(returnData.genericData1) + " - " + CustomTooltipManager.getAchievementRank(returnData.genericData1);
     base.lblSubTitle.Text      = SK.Text("ReportsPanel_Achievement_Attained", "Achievement Attained");
     base.imgFurther.Image      = (Image)GFXLibrary.com_32_honour_DS;
     base.imgFurther.setSizeToImage();
     base.imgFurther.Position  = new Point((base.Width / 2) - base.imgFurther.Width, base.btnDelete.Position.Y);
     base.lblFurther.Text      = base.m_returnData.genericData2.ToString("N", base.nfi);
     base.lblFurther.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.CENTER_LEFT;
     base.lblFurther.Size      = new Size(base.Width, base.imgFurther.Height);
     base.lblFurther.Position  = new Point(base.imgFurther.Rectangle.Right + 10, base.imgFurther.Position.Y);
     base.showFurtherInfo();
     base.btnUtility.Visible   = true;
     base.btnUtility.Text.Text = SK.Text("GENERIC_Achievements", "Achievements");
 }
 public void handleInput(MouseInputState input)
 {
     if (this.village != null)
     {
         if (!input.leftdown && input.isScrolling())
         {
             if (input.scrollLeft)
             {
                 this.village.moveMap(10, 0);
             }
             if (input.scrollRight)
             {
                 this.village.moveMap(-10, 0);
             }
             if (input.scrollUp)
             {
                 this.village.moveMap(0, 10);
             }
             if (input.scrollDown)
             {
                 this.village.moveMap(0, -10);
             }
         }
         if (!input.leftdown)
         {
             this.village.mouseNotClicked(input.dxMousePos);
         }
         if (input.overDXWindow || this.village.holdingLeftMouse())
         {
             this.village.mouseMoveUpdate(input.dxMousePos, input.leftdown);
         }
         else if (input.wasOverDXWindow)
         {
             CustomTooltipManager.MouseLeaveTooltipAreaMapSpecial();
         }
         if (input.rightclick)
         {
             this.village.stopPlaceBuilding(true);
         }
     }
 }
            public void init(HouseData houseData, int yourHouseID, int yourRank, int appliedToHouse, int position, HouseListPanel parent, bool gloryMode)
            {
                this.m_parent    = parent;
                this.m_position  = position;
                this.m_houseData = houseData;
                this.clearControls();
                if ((position & 1) == 0)
                {
                    this.backgroundImage.Image = (Image)GFXLibrary.lineitem_strip_02_light;
                }
                else
                {
                    this.backgroundImage.Image = (Image)GFXLibrary.lineitem_strip_02_dark;
                }
                this.backgroundImage.Position = new Point(0, 0);
                this.backgroundImage.Size     = new Size(this.backgroundImage.Size.Width, 0x33);
                base.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.clickedLine));
                base.addControl(this.backgroundImage);
                this.Size = this.backgroundImage.Size;
                if (houseData.houseID > 0)
                {
                    this.houseImage.Image    = (Image)GFXLibrary.house_circles_medium[houseData.houseID - 1];
                    this.houseImage.Position = new Point(5, 0);
                    this.houseImage.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.clickedLine));
                    this.houseImage.CustomTooltipID   = 0x904;
                    this.houseImage.CustomTooltipData = houseData.houseID;
                    this.backgroundImage.addControl(this.houseImage);
                }
                NumberFormatInfo nFI   = GameEngine.NFI;
                Color            black = ARGBColors.Black;

                if (houseData.houseID == yourHouseID)
                {
                    black = ARGBColors.Yellow;
                }
                this.houseName.Text      = SK.Text("STATS_CATEGORY_TITLE_HOUSE", "House") + " " + houseData.houseID.ToString();
                this.houseName.Color     = black;
                this.houseName.Position  = new Point(0x40, 5);
                this.houseName.Size      = new Size(280, this.backgroundImage.Height);
                this.houseName.Font      = FontManager.GetFont("Arial", 9f, FontStyle.Regular);
                this.houseName.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_LEFT;
                this.houseName.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.clickedLine));
                this.backgroundImage.addControl(this.houseName);
                this.houseMotto.Text      = "\"" + CustomTooltipManager.getHouseMotto(houseData.houseID) + "\"";
                this.houseMotto.Color     = black;
                this.houseMotto.Position  = new Point(0x40, 30);
                this.houseMotto.Size      = new Size(280, this.backgroundImage.Height);
                this.houseMotto.Font      = FontManager.GetFont("Arial", 9f, FontStyle.Regular);
                this.houseMotto.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_LEFT;
                this.houseMotto.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.clickedLine));
                this.backgroundImage.addControl(this.houseMotto);
                int num = -1;

                if (!gloryMode)
                {
                    if (houseData.houseID == 0)
                    {
                        this.numPlayersLabel.Text = GameEngine.Instance.World.countHouseMembers(0).ToString("N", nFI);
                    }
                    else
                    {
                        this.numPlayersLabel.Text = houseData.numFactions.ToString("N", nFI);
                    }
                }
                else
                {
                    int num2 = GameEngine.Instance.World.getGloryRank(houseData.houseID);
                    if ((houseData.houseID == 0) || (num2 < 0))
                    {
                        this.numPlayersLabel.Text = "";
                    }
                    else
                    {
                        this.numPlayersLabel.Text = (num2 + 1).ToString("N", nFI);
                        num = GameEngine.Instance.World.getGloryPoints(houseData.houseID);
                    }
                }
                this.numPlayersLabel.Color     = ARGBColors.Black;
                this.numPlayersLabel.Position  = new Point(0xeb, 0);
                this.numPlayersLabel.Size      = new Size(100, this.backgroundImage.Height);
                this.numPlayersLabel.Font      = FontManager.GetFont("Arial", 9f, FontStyle.Regular);
                this.numPlayersLabel.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.CENTER_RIGHT;
                this.numPlayersLabel.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.clickedLine));
                this.backgroundImage.addControl(this.numPlayersLabel);
                if (!gloryMode)
                {
                    this.pointsLabel.Text = houseData.points.ToString("N", nFI);
                }
                else if (num >= 0)
                {
                    this.pointsLabel.Text = num.ToString("N", nFI);
                }
                else
                {
                    this.pointsLabel.Text = "";
                }
                this.pointsLabel.Color     = ARGBColors.Black;
                this.pointsLabel.Position  = new Point(410, 0);
                this.pointsLabel.Size      = new Size(100, this.backgroundImage.Height);
                this.pointsLabel.Font      = FontManager.GetFont("Arial", 9f, FontStyle.Regular);
                this.pointsLabel.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.CENTER_RIGHT;
                this.pointsLabel.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.clickedLine));
                this.backgroundImage.addControl(this.pointsLabel);
                if (houseData.houseID > 0)
                {
                    this.membershipLabel.Color     = ARGBColors.Black;
                    this.membershipLabel.Position  = new Point(570, 3);
                    this.membershipLabel.Size      = new Size(130, this.backgroundImage.Height);
                    this.membershipLabel.Font      = FontManager.GetFont("Arial", 9f, FontStyle.Regular);
                    this.membershipLabel.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.TOP_CENTER;
                    this.membershipLabel.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.clickedLine));
                    this.backgroundImage.addControl(this.membershipLabel);
                    string str = "";
                    this.joinButton.ImageNorm      = (Image)GFXLibrary.mail2_button_blue_141wide_normal;
                    this.joinButton.ImageOver      = (Image)GFXLibrary.mail2_button_blue_141wide_over;
                    this.joinButton.ImageClick     = (Image)GFXLibrary.mail2_button_blue_141wide_pushed;
                    this.joinButton.Position       = new Point(0x237, 0x18);
                    this.joinButton.Text.Text      = str = SK.Text("HouseInfoLine_Join", "Join");
                    this.joinButton.Text.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.CENTER_CENTER;
                    this.joinButton.Text.Font      = FontManager.GetFont("Arial", 9f, FontStyle.Bold);
                    this.joinButton.TextYOffset    = -3;
                    this.joinButton.Text.Color     = ARGBColors.Black;
                    this.joinButton.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.joinClicked), "HouseListPanel_join");
                    this.backgroundImage.addControl(this.joinButton);
                    this.joinButton.Visible = false;
                    if ((yourHouseID == 0) && (appliedToHouse > 0))
                    {
                        if (houseData.houseID == appliedToHouse)
                        {
                            str = SK.Text("HouseInfoLine_Applied", "Applied");
                            this.joinButton.Visible = true;
                            this.m_applied          = true;
                            if (yourRank != 1)
                            {
                                this.joinButton.Enabled = false;
                            }
                        }
                    }
                    else if (((houseData.numFactions < GameEngine.Instance.LocalWorldData.Houses_MaxFactions) && (yourHouseID == 0)) && ((yourRank == 1) && (houseData.houseID != 0)))
                    {
                        if (houseData.numFactions >= GameEngine.Instance.LocalWorldData.Houses_SelfJoinLimit)
                        {
                            str = SK.Text("HouseInfoLine_Apply", "Apply");
                            this.joinButton.Visible = true;
                        }
                        else
                        {
                            str = SK.Text("HouseInfoLine_Join", "Join");
                            this.joinButton.Visible = true;
                        }
                    }
                    if ((houseData.houseID == 10) && GameEngine.Instance.LocalWorldData.AIWorld)
                    {
                        this.membershipLabel.Text = SK.Text("FactionInvites_Membership_closed", "Closed");
                        this.joinButton.Visible   = false;
                    }
                    else if (houseData.numFactions < GameEngine.Instance.LocalWorldData.Houses_MaxFactions)
                    {
                        this.membershipLabel.Text = SK.Text("FactionInvites_Membership_open", "Open");
                    }
                    else
                    {
                        this.membershipLabel.Text = SK.Text("FactionInvites_Membership_closed", "Closed");
                    }
                    this.joinButton.Text.Text = str;
                    if (!this.joinButton.Visible)
                    {
                        this.membershipLabel.Position  = new Point(570, 0);
                        this.membershipLabel.Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.CENTER_CENTER;
                    }
                }
                int num3 = GameEngine.Instance.World.getYourHouseRelation(houseData.houseID);

                if (num3 != 0)
                {
                    if (num3 > 0)
                    {
                        this.allianceImage.Image           = (Image)GFXLibrary.faction_relationships[0];
                        this.allianceImage.CustomTooltipID = 0x8ff;
                    }
                    else
                    {
                        this.allianceImage.Image           = (Image)GFXLibrary.faction_relationships[2];
                        this.allianceImage.CustomTooltipID = 0x900;
                    }
                    this.allianceImage.Position = new Point(0xee, 12);
                    this.allianceImage.setClickDelegate(new CustomSelfDrawPanel.CSDControl.CSD_ClickDelegate(this.clickedLine));
                    this.backgroundImage.addControl(this.allianceImage);
                }
                base.invalidate();
            }
示例#5
0
 public MailUserBlockPopup()
 {
     this.InitializeComponent();
     this.Font = FontManager.GetFont("Microsoft Sans Serif", 8.25f);
     CustomTooltipManager.addTooltipToSystemControl(this.cbAggressive, 0x1f8);
 }
示例#6
0
 public void handleInput(MouseInputState input)
 {
     if (!input.leftdown && input.isScrolling())
     {
         if (input.scrollLeft)
         {
             this.world.moveMap(0.0 - (10.0 / this.world.WorldScale), 0.0);
         }
         if (input.scrollRight)
         {
             this.world.moveMap(10.0 / this.world.WorldScale, 0.0);
         }
         if (input.scrollUp)
         {
             this.world.moveMap(0.0, 0.0 - (10.0 / this.world.WorldScale));
         }
         if (input.scrollDown)
         {
             this.world.moveMap(0.0, 10.0 / this.world.WorldScale);
         }
     }
     if (!input.leftdown)
     {
         this.world.mouseNotClicked(input.dxMousePos);
     }
     if (input.overDXWindow || this.world.holdingLeftMouse())
     {
         if (input.leftdown)
         {
             this.world.leftMouseDown(input.dxMousePos);
         }
         else if (input.rightclick)
         {
             this.world.zoomOut();
         }
         else if (input.mousebackward)
         {
             this.world.stopZoom();
             double num = this.world.getOrigWorldZoom();
             if (num > 26.899999998509884)
             {
                 this.world.setMouseWheelZoomOut(14f);
             }
             else if (num > 13.899999618530273)
             {
                 this.world.setMouseWheelZoomOut(9.5f);
             }
             else if (num > 9.3999996185302734)
             {
                 this.world.setMouseWheelZoomOut(6.5f);
             }
             else if (num > 6.4000000953674316)
             {
                 this.world.setMouseWheelZoomOut(3.5f);
             }
             else if (num > 3.4000000953674316)
             {
                 this.world.setMouseWheelZoomOut(2f);
             }
             else
             {
                 this.world.setMouseWheelZoomOut(0f);
             }
         }
         else if (input.mouseforward)
         {
             this.world.stopZoom();
             double num2 = this.world.getOrigWorldZoom();
             if (num2 < 0.10000000149011612)
             {
                 this.world.changeZoom(2f, input.dxMousePos);
             }
             else if (num2 < 2.0999999046325684)
             {
                 this.world.changeZoom(3.5f, input.dxMousePos);
             }
             else if (num2 < 3.5999999046325684)
             {
                 this.world.changeZoom(6.5f, input.dxMousePos);
             }
             else if (num2 < 6.5999999046325684)
             {
                 this.world.changeZoom(9.5f, input.dxMousePos);
             }
             else if (num2 < 9.6000003814697266)
             {
                 this.world.changeZoom(14f, input.dxMousePos);
             }
             else
             {
                 this.world.changeZoom(27f, input.dxMousePos);
             }
             if (num2 < 26.899999998509884)
             {
                 GameEngine.Instance.playInterfaceSound("WorldMap_mousewheel_zoomin");
             }
             this.world.centreMap(false);
         }
         else
         {
             this.world.moveMouse(input.dxMousePos);
         }
         InterfaceMgr.Instance.mouseMoveDXCardBar(input.dxMousePos);
         GameEngine.Instance.World.freeCardTooltip(input.dxMousePos);
     }
     else
     {
         if (input.wasOverDXWindow)
         {
             CustomTooltipManager.MouseLeaveTooltipAreaMapSpecial();
         }
         if (InterfaceMgr.Instance.ParentForm.Cursor == Cursors.Hand)
         {
             InterfaceMgr.Instance.ParentForm.Cursor = Cursors.Default;
         }
     }
 }
 public void closing()
 {
     CustomTooltipManager.MouseLeaveTooltipAreaStored();
 }
 public void populateControls(int id)
 {
     if (id >= 0x3e8)
     {
         this.title.Text = SK.Text("ACHIEVEMENT_OBTAINED", "Achievement Obtained!");
         string str = CustomTooltipManager.getAchievementTitle(id - 0x3e8) + " (" + CustomTooltipManager.getAchievementRank(id - 0x3e8) + ")";
         this.content.Text = str;
         this.icon.Image   = (Image)GFXLibrary.medal_images[CustomSelfDrawPanel.MedalImage.getAchievementImage((id - 0x3e8) & 0xfff)];
     }
 }