import{_ as s,c as a,o,a as t}from"./app.e9531dc8.js";const h=JSON.parse('{"title":"Custom tab layouts","description":"","frontmatter":{},"headers":[],"relativePath":"public/gamedevtree/docs/custom-tab-layouts.md","lastUpdated":null}'),n={name:"public/gamedevtree/docs/custom-tab-layouts.md"},e=t(`

Custom tab layouts

Note: If you are using subtabs, tabFormat is used differently, but you still use the same format within each subtabs. See here for more on subtabs

Custom tab layouts can be used to do basically anything in a tab window, especially combined with the "style" layer feature. The tabFormat feature is an array of things, like this:

js
    tabFormat: ["main-display",
            ["prestige-button", function(){return "Melt your points into "}],
            "blank",
            ["display-text",
                function() {return 'I have ' + format(player.points) + ' pointy points!'},
                {"color": "red", "font-size": "32px", "font-family": "Comic Sans MS"}],
            "blank",
            ["toggle", ["c", "beep"]],
            "milestones", "blank", "blank", "upgrades"]

It is a list of components, which can be either just a name, or an array with arguments. If it's an array, the first item is the name of the component, the second is the data passed into it, and the third (optional) applies a CSS style to it with a "CSS object", where the keys are CSS attributes.

These are the existing components, but you can create more in v.js:

The rest of the components are sub-components. They can be used just like other components, but are typically part of another component.

`,9),l=[e];function p(r,c,i,y,D,u){return o(),a("div",null,l)}const b=s(n,[["render",p]]);export{h as __pageData,b as default};