Пример #1
0
        public static string GetCompleteTitle()
        {
            GInterfaceObject QuestDetailScrollChildFrame = GContext.Main.Interface.GetByName("QuestRewardScrollChildFrame");
            GInterfaceObject QuestTitle = QuestDetailScrollChildFrame.GetChildObject("QuestRewardTitleText");

            PPather.WriteLine("Reward title: {0}, v: {1}", QuestTitle.LabelText, QuestTitle.IsVisible);
            return(QuestTitle.LabelText);
        }
Пример #2
0
        public static string GetAcceptTitle()
        {
            GInterfaceObject QuestDetailScrollChildFrame = GContext.Main.Interface.GetByName("QuestDetailScrollChildFrame");
            GInterfaceObject QuestTitle = QuestDetailScrollChildFrame.GetChildObject("QuestTitleText");

            PPather.WriteLine("Quest title: " + QuestTitle.LabelText + " v: " + QuestTitle.IsVisible);
            return(QuestTitle.LabelText);
        }
Пример #3
0
        public static String CheckToolTip()
        {
            GInterfaceObject btn = GContext.Main.Interface.GetByName("GameTooltip");

            if (btn != null && btn.IsVisible)
            {
                GInterfaceObject text = btn.GetChildObject("GameTooltipTextLeft1");

                if (text != null)
                {
                    return(text.LabelText);
                }
            }

            return(null);
        }
Пример #4
0
        public static string GetText(int popNr)
        {
            String           name = "StaticPopup" + popNr;
            GInterfaceObject obj  = GContext.Main.Interface.GetByName(name);

            if (obj == null || !obj.IsVisible)
            {
                return(null);
            }
            GInterfaceObject text = obj.GetChildObject(name + "Text");

            if (text == null)
            {
                return(null);
            }
            return(text.LabelText);
        }
Пример #5
0
        public static string GetButtonText(int frameNum, int buttonNum)
        {
            GInterfaceObject obj = GetButton(frameNum, buttonNum);

            //PPather.WriteLine("GetButtonText(" + frameNum + ", " + buttonNum + "): obj=" + obj + ", visible=" + (obj != null && obj.IsVisible));

            if (obj != null && obj.IsVisible)
            {
                GInterfaceObject text = obj.GetChildObject("DropDownList" + frameNum + "Button" + buttonNum + "NormalText");

                //PPather.WriteLine("GetButtonText(" + frameNum + ", " + buttonNum + "): text=" + text);

                if (text != null)
                {
                    return(text.LabelText);
                }
            }
            return(null);
        }
Пример #6
0
        public static int[] AvailableSkills()
        {
            List <int> options = new List <int>();

            for (int i = 1; i <= 11; i++)
            {
                GInterfaceObject btn = GContext.Main.Interface.GetByName("ClassTrainerSkill" + i);
                if (btn != null && btn.IsVisible)
                {
                    GInterfaceObject textObj = btn.GetChildObject("ClassTrainerSkill" + i + "Text");
                    string           text    = textObj.LabelText;
                    //PPather.WriteLine("Item " + i + " label '" + text + "'");
                    if (text.StartsWith("  "))
                    {
                        options.Add(i);
                    }
                }
            }
            return(options.ToArray());
        }