"use strict";(self.webpackChunkdocs_site=self.webpackChunkdocs_site||[]).push([[8851],{4048:(e,n,o)=>{o.r(n),o.d(n,{assets:()=>l,contentTitle:()=>c,default:()=>d,frontMatter:()=>s,metadata:()=>t,toc:()=>a});const t=JSON.parse('{"id":"XXTLanControl.lua/core/get_ui_config","title":"Read Script UI Configuration (LCC.get_ui_config)","description":"Signature","source":"@site/i18n/en/docusaurus-plugin-content-docs/current/XXTLanControl.lua/core/get_ui_config.md","sourceDirName":"XXTLanControl.lua/core","slug":"/XXTLanControl.lua/core/get_ui_config","permalink":"/docs/en/XXTLanControl.lua/core/get_ui_config","draft":false,"unlisted":false,"tags":[],"version":"current","sidebarPosition":50,"frontMatter":{"sidebar_position":50},"sidebar":"tutorialSidebar","previous":{"title":"Connect To The Controller (LCC.connect)","permalink":"/docs/en/XXTLanControl.lua/core/connect"},"next":{"title":"Send Controller Logs (LCC.log)","permalink":"/docs/en/XXTLanControl.lua/core/log"}}');var r=o(4848),i=o(8453);const s={sidebar_position:50},c="Read Script UI Configuration (LCC.get_ui_config)",l={},a=[{value:"Signature",id:"signature",level:2},{value:"Parameters",id:"parameters",level:2},{value:"Returns",id:"returns",level:2},{value:"Notes",id:"notes",level:2},{value:"Example",id:"example",level:2}];function u(e){const n={blockquote:"blockquote",br:"br",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",p:"p",pre:"pre",ul:"ul",...(0,i.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.header,{children:(0,r.jsx)(n.h1,{id:"read-script-ui-configuration-lccget_ui_config",children:"Read Script UI Configuration (LCC.get_ui_config)"})}),"\n",(0,r.jsx)(n.h2,{id:"signature",children:"Signature"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-lua",children:"config = LCC.get_ui_config()\n"})}),"\n",(0,r.jsx)(n.h2,{id:"parameters",children:"Parameters"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:"none"}),"\n"]}),"\n",(0,r.jsx)(n.h2,{id:"returns",children:"Returns"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["config",(0,r.jsx)(n.br,{}),"\n","Table containing the ",(0,r.jsx)(n.code,{children:"Config"})," section of ",(0,r.jsx)(n.code,{children:"main.json"})," together with default values of UI controls."]}),"\n"]}),"\n",(0,r.jsx)(n.h2,{id:"notes",children:"Notes"}),"\n",(0,r.jsxs)(n.blockquote,{children:["\n",(0,r.jsxs)(n.p,{children:["Reads ",(0,r.jsx)(n.code,{children:"main.json"})," from the current script directory and merges the ",(0,r.jsx)(n.code,{children:"Config"})," block with control defaults to build the final configuration table.",(0,r.jsx)(n.br,{}),"\n","ComboBox/RadioGroup values return the selected label; CheckBoxGroup returns mappings such as ",(0,r.jsx)(n.code,{children:"{ ['Option A'] = true }"}),".",(0,r.jsx)(n.br,{}),"\n","Returns an empty table when ",(0,r.jsx)(n.code,{children:"main.json"})," is missing or malformed."]}),"\n"]}),"\n",(0,r.jsx)(n.h2,{id:"example",children:"Example"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-lua",children:'local conf = LCC.get_ui_config()\nif conf["Target Group"] then\n    print("Running against group: " .. conf["Target Group"])\nend\n'})})]})}function d(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(u,{...e})}):u(e)}},8453:(e,n,o)=>{o.d(n,{R:()=>s,x:()=>c});var t=o(6540);const r={},i=t.createContext(r);function s(e){const n=t.useContext(i);return t.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function c(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:s(e.components),t.createElement(i.Provider,{value:n},e.children)}}}]);