"use strict";(self.webpackChunkdocs_site=self.webpackChunkdocs_site||[]).push([[3770],{1643:(e,n,o)=>{o.r(n),o.d(n,{assets:()=>l,contentTitle:()=>s,default:()=>u,frontMatter:()=>r,metadata:()=>i,toc:()=>a});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":"\u6293\u53d6\u754c\u9762\u72b6\u6001 (LCC.capture_ui_state)","permalink":"/docs/XXTLanControl.lua/core/capture_ui_state"}}');var c=o(4848),t=o(8453);const r={sidebar_position:50},s="\u83b7\u53d6\u811a\u672c UI \u914d\u7f6e (LCC.get_ui_config)",l={},a=[{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 d(e){const n={blockquote:"blockquote",br:"br",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",p:"p",pre:"pre",ul:"ul",...(0,t.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:["\u5e73\u94fa\u811a\u672c\u8bfb\u53d6 ",(0,c.jsx)(n.code,{children:'XXT_SCRIPTS_PATH .. "/main.json"'}),"\uff1bXPP \u811a\u672c\u5305\u8bfb\u53d6 ",(0,c.jsx)(n.code,{children:'xpp.resource_path("main.json")'})," \u8fd4\u56de\u7684\u5305\u5185\u6587\u4ef6\u3002\u8bfb\u53d6\u540e\u4f1a\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\nComboBox / 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,t.R)(),...e.components};return n?(0,c.jsx)(n,{...e,children:(0,c.jsx)(d,{...e})}):d(e)}},8453:(e,n,o)=>{o.d(n,{R:()=>r,x:()=>s});var i=o(6540);const c={},t=i.createContext(c);function r(e){const n=i.useContext(t);return i.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function s(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(c):e.components||c:r(e.components),i.createElement(t.Provider,{value:n},e.children)}}}]);