"use strict";(self.webpackChunkdocs_site=self.webpackChunkdocs_site||[]).push([[3770],{1643:(e,n,o)=>{o.r(n),o.d(n,{assets:()=>s,contentTitle:()=>l,default:()=>u,frontMatter:()=>t,metadata:()=>i,toc:()=>d});const i=JSON.parse('{"id":"XXTLanControl.lua/core/get_ui_config","title":"\u83b7\u53d6\u811a\u672c UI \u914d\u7f6e (LCC.get_ui_config)","description":"\u58f0\u660e","source":"@site/docs/XXTLanControl.lua/core/get_ui_config.md","sourceDirName":"XXTLanControl.lua/core","slug":"/XXTLanControl.lua/core/get_ui_config","permalink":"/docs/XXTLanControl.lua/core/get_ui_config","draft":false,"unlisted":false,"tags":[],"version":"current","sidebarPosition":50,"frontMatter":{"sidebar_position":50},"sidebar":"tutorialSidebar","previous":{"title":"\u8fde\u63a5\u4e2d\u63a7\u5e76\u521d\u59cb\u5316 (LCC.connect)","permalink":"/docs/XXTLanControl.lua/core/connect"},"next":{"title":"\u53d1\u9001\u4e2d\u63a7\u65e5\u5fd7 (LCC.log)","permalink":"/docs/XXTLanControl.lua/core/log"}}');var c=o(4848),r=o(8453);const t={sidebar_position:50},l="\u83b7\u53d6\u811a\u672c UI \u914d\u7f6e (LCC.get_ui_config)",s={},d=[{value:"\u58f0\u660e",id:"\u58f0\u660e",level:2},{value:"\u53c2\u6570",id:"\u53c2\u6570",level:2},{value:"\u8fd4\u56de\u503c",id:"\u8fd4\u56de\u503c",level:2},{value:"\u8bf4\u660e",id:"\u8bf4\u660e",level:2},{value:"\u793a\u4f8b",id:"\u793a\u4f8b",level:2}];function a(e){const n={blockquote:"blockquote",br:"br",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",p:"p",pre:"pre",ul:"ul",...(0,r.R)(),...e.components};return(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(n.header,{children:(0,c.jsx)(n.h1,{id:"\u83b7\u53d6\u811a\u672c-ui-\u914d\u7f6e-lccget_ui_config",children:"\u83b7\u53d6\u811a\u672c UI \u914d\u7f6e (LCC.get_ui_config)"})}),"\n",(0,c.jsx)(n.h2,{id:"\u58f0\u660e",children:"\u58f0\u660e"}),"\n",(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-lua",children:"config = LCC.get_ui_config()\n"})}),"\n",(0,c.jsx)(n.h2,{id:"\u53c2\u6570",children:"\u53c2\u6570"}),"\n",(0,c.jsxs)(n.ul,{children:["\n",(0,c.jsx)(n.li,{children:"\u65e0"}),"\n"]}),"\n",(0,c.jsx)(n.h2,{id:"\u8fd4\u56de\u503c",children:"\u8fd4\u56de\u503c"}),"\n",(0,c.jsxs)(n.ul,{children:["\n",(0,c.jsxs)(n.li,{children:["config",(0,c.jsx)(n.br,{}),"\n","\u8868\u7c7b\u578b\uff0c\u5305\u542b ",(0,c.jsx)(n.code,{children:"main.json"})," \u4e2d ",(0,c.jsx)(n.code,{children:"Config"})," \u8282\u70b9\u4ee5\u53ca\u754c\u9762\u63a7\u4ef6\u7684\u9ed8\u8ba4\u503c"]}),"\n"]}),"\n",(0,c.jsx)(n.h2,{id:"\u8bf4\u660e",children:"\u8bf4\u660e"}),"\n",(0,c.jsxs)(n.blockquote,{children:["\n",(0,c.jsxs)(n.p,{children:["\u4ece\u5f53\u524d\u811a\u672c\u76ee\u5f55\u8bfb\u53d6 ",(0,c.jsx)(n.code,{children:"main.json"}),"\uff0c\u5c06 ",(0,c.jsx)(n.code,{children:"Config"})," \u8282\u70b9\u4e0e UI \u63a7\u4ef6\u9ed8\u8ba4\u503c\u5408\u5e76\u4e3a\u6700\u7ec8\u914d\u7f6e\u8868\u3002",(0,c.jsx)(n.br,{}),"\n","ComboBox / RadioGroup \u4f1a\u8fd4\u56de\u88ab\u9009\u4e2d\u7684\u6587\u672c\uff1bCheckBoxGroup \u8fd4\u56de\u5f62\u5982 ",(0,c.jsx)(n.code,{children:"{ ['\u9009\u9879A'] = true }"})," \u7684\u6620\u5c04\u3002",(0,c.jsx)(n.br,{}),"\n","\u5f53 ",(0,c.jsx)(n.code,{children:"main.json"})," \u7f3a\u5931\u6216\u7ed3\u6784\u975e\u6cd5\u65f6\u8fd4\u56de\u7a7a\u8868\u3002"]}),"\n"]}),"\n",(0,c.jsx)(n.h2,{id:"\u793a\u4f8b",children:"\u793a\u4f8b"}),"\n",(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-lua",children:'local conf = LCC.get_ui_config()\nif conf["\u76ee\u6807\u5206\u7ec4"] then\n    print("\u6267\u884c\u76ee\u6807\u5206\u7ec4: " .. conf["\u76ee\u6807\u5206\u7ec4"])\nend\n'})})]})}function u(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,c.jsx)(n,{...e,children:(0,c.jsx)(a,{...e})}):a(e)}},8453:(e,n,o)=>{o.d(n,{R:()=>t,x:()=>l});var i=o(6540);const c={},r=i.createContext(c);function t(e){const n=i.useContext(r);return i.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function l(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(c):e.components||c:t(e.components),i.createElement(r.Provider,{value:n},e.children)}}}]);