Ejemplo n.º 1
0
        public void AppendTab(string name, View view)
        {
            StdString nameStr = StdString.Create(name);

            Window_c.AppendTab(Pointer, nameStr.Pointer, view.Pointer);
            Views.Add(view);
        }
Ejemplo n.º 2
0
        public static unsafe IntPtr Create(Rect rect, string name, int scrollBarModeH, int scrollBarModeV, int unk1, int unk2, int unk3)
        {
            StdString nameStr = StdString.Create(name);
            IntPtr    pView   = Constructor(MSVCR100.New(0x1B0), &rect, nameStr.Pointer, scrollBarModeH, scrollBarModeV, unk1, unk2, unk3);

            return(pView);
        }
Ejemplo n.º 3
0
        public static unsafe IntPtr Create(Rect rect, string name, int unk1, int unk2)
        {
            StdString nameStr = StdString.Create(name);
            IntPtr    pView   = Constructor(MSVCR100.New(0x1A8), &rect, nameStr.Pointer, unk1, unk2);

            return(pView);
        }
Ejemplo n.º 4
0
        private string GetName()
        {
            StdString name = StdString.Create();

            Looper.GetName(Pointer, name.Pointer);
            return(name.ToString());
        }
Ejemplo n.º 5
0
        public static View CreateFromXml(string filePath)
        {
            IntPtr pFilePath = StdString.Create(filePath).Pointer;
            IntPtr pUnknown  = StdString.Create().Pointer;

            return(GUIUnk.LoadViewFromXml(out var pView, pFilePath, pUnknown) ? new View(pView, false) : null);
        }
Ejemplo n.º 6
0
        public static IntPtr Create(Variant variant, string name, int unk1, int unk2)
        {
            StdString nameStr = StdString.Create(name);
            IntPtr    pView   = Constructor(MSVCR100.New(0x98), variant.Pointer, nameStr.Pointer, unk1, unk2);

            return(pView);
        }
Ejemplo n.º 7
0
        internal override View CreateView()
        {
            //RadioButtonGroup radioGroup = RadioButtonGroup.Create(Name);

            IntPtr pView = XMLObject_c.LoadXMLObject(StdString.Create(@"C:\Users\tagyo\Desktop\Test.xml").Pointer, StdString.Create().Pointer);

            return(new View(pView));
        }
Ejemplo n.º 8
0
        public static IntPtr Create(string name, int unk1, uint unk2, uint unk3)
        {
            IntPtr pNew = MSVCR100.New(0x250);

            StdString nameStr = StdString.Create(name);
            IntPtr    pView   = Constructor(pNew, nameStr.Pointer, unk1, (uint)pNew, (uint)pNew);

            return(pView);
        }
Ejemplo n.º 9
0
        public static IntPtr Create(string name, string text, bool defaultValue, bool horizontalSpacer)
        {
            IntPtr    pNew    = MSVCR100.New(0x158);
            StdString nameStr = StdString.Create(name);
            StdString textStr = StdString.Create(text);
            IntPtr    pView   = Constructor(pNew, nameStr.Pointer, textStr.Pointer, defaultValue, horizontalSpacer);

            return(pView);
        }
Ejemplo n.º 10
0
        public static IntPtr Create(string name, string labelText, int unk1, uint unk2, uint unk3)
        {
            StdString nameStr = StdString.Create(name);

            StdString labelStr = StdString.Create(labelText);
            IntPtr    pView    = Constructor(MSVCR100.New(0x168), nameStr.Pointer, labelStr.Pointer, unk1, unk2, unk3);

            return(pView);
        }
Ejemplo n.º 11
0
        public unsafe byte ProcessChatInput_Hook(IntPtr pThis, IntPtr pWindow, IntPtr pCmdText)
        {
            StdString tokenized = StdString.Create();

            ChatGUIModule_t.ExpandChatTextArgs(tokenized.Pointer, pCmdText);
            _lastChatInput          = tokenized.ToString();
            _lastChatInputWindowPtr = pWindow;

            return(CommandInterpreter_c.ProcessChatInput(pThis, pWindow, pCmdText));
        }
Ejemplo n.º 12
0
        public static unsafe IntPtr Create(Rect rect, string string1, string string2, WindowStyle style, WindowFlags flags)
        {
            StdString str1 = StdString.Create(string1);

            StdString str2 = StdString.Create(string2);

            IntPtr pWindow = Constructor(MSVCR100.New(0xAC), &rect, str1.Pointer, str2.Pointer, style, flags);

            return(pWindow);
        }
Ejemplo n.º 13
0
        public static IntPtr Create(string string1, string string2)
        {
            IntPtr    pNew = MSVCR100.New(0x74);
            StdString str1 = StdString.Create(string1);
            StdString str2 = StdString.Create(string2);

            IntPtr pToolTip = Constructor(pNew, str1.Pointer, str2.Pointer);

            return(pToolTip);
        }
Ejemplo n.º 14
0
 public void WriteLine(string text, ChatColor color = ChatColor.Gold)
 {
     if (_pointer != IntPtr.Zero)
     {
         ChatWindowNode_t.AppendText(_pointer, StdString.Create(text).Pointer, color);
     }
     else
     {
         Chat.WriteLine(text, color);
     }
 }
Ejemplo n.º 15
0
        public bool FindView <T>(string name, out T view) where T : View
        {
            view = null;
            IntPtr pView = Window_c.FindView(Pointer, StdString.Create(name).Pointer);

            if (pView == IntPtr.Zero)
            {
                return(false);
            }

            view = Activator.CreateInstance(typeof(T), BindingFlags.NonPublic | BindingFlags.Instance, null, new object[] { pView }, null) as T;
            return(true);
        }
Ejemplo n.º 16
0
        public void AppendTab(string name, IntPtr pView)
        {
            StdString nameStr = StdString.Create(name);

            TabView_c.AppendTab(_pointer, nameStr.Pointer, pView);
        }
Ejemplo n.º 17
0
        public void SetTitle(string name)
        {
            StdString nameStr = StdString.Create(name);

            Window_c.SetTitle(Pointer, nameStr.Pointer);
        }
Ejemplo n.º 18
0
 public void SetLabels(string leftLabel, string rightLabel)
 {
     PowerBarView_c.SetLabels(Pointer, StdString.Create(leftLabel).Pointer, StdString.Create(rightLabel).Pointer);
 }
Ejemplo n.º 19
0
 public void SetLabel(string text)
 {
     PowerBarView_c.SetLabel(Pointer, StdString.Create(text).Pointer);
 }
Ejemplo n.º 20
0
 private void SetText(string text)
 {
     TextView_c.SetText(Pointer, StdString.Create(text).Pointer);
 }
Ejemplo n.º 21
0
        public static Window CreateFromXml(string name, string path, Rect windowSize, WindowStyle windowStyle = WindowStyle.Default, WindowFlags windowFlags = WindowFlags.None)
        {
            if (UIController.FindWindow(name, out Window existingWindow))
            {
                return(existingWindow);
            }

            if (!File.Exists(path))
            {
                return(null);
            }

            Window window = Create(windowSize, name, name, windowStyle, windowFlags);

            if (!GUIUnk.LoadViewFromXml(out IntPtr pView, StdString.Create(path).Pointer, StdString.Create().Pointer))
            {
                return(null);
            }

            window.AppendTab(name, new View(pView, false));

            window.MoveToCenter();

            return(window);
        }