Пример #1
0
        private void OnNodeDoubleClick(object S, TreeNodeMouseClickEventArgs E)
        {
            LuaStateViewer.BeginUpdate();
            E.Node.Nodes.Clear();

            List <string> FullPath = new List <string>();

            GetFullPath(FullPath, E.Node);

            L.GetTable(GLua.LUA_GLOBALSINDEX);
            for (int i = 0; i < FullPath.Count; i++)
            {
                L.GetField(-1, FullPath[i]);
                L.Remove(-2);
            }

            if (L.GetLuaType() == LuaType.Table)
            {
                L.PushNil();
                while (L.Next(-2) != 0)
                {
                    E.Node.Nodes.Add(L.LuaBase.GetString(-2));
                    L.Pop();
                }
            }

            LuaStateViewer.EndUpdate();
        }
Пример #2
0
        public Color(GLua gLua, Int32 IStackPos)
        {
            Boolean B = gLua.Lock();

            gLua.GetField(IStackPos, "r");
            this.R = (Byte)gLua.LuaBase.GetNumber(-1);
            gLua.GetField(IStackPos, "g");
            this.G = (Byte)gLua.LuaBase.GetNumber(-1);
            gLua.GetField(IStackPos, "b");
            this.B = (Byte)gLua.LuaBase.GetNumber(-1);
            gLua.GetField(IStackPos, "a");
            this.A = (Byte)gLua.LuaBase.GetNumber(-1);
            gLua.Pop(4);

            if (B)
            {
                gLua.UnLock();
            }
        }