import{_ as s,c as i,o as a,a4 as t}from"./chunks/framework.CsM8T_AH.js";const u=JSON.parse('{"title":"Grids","description":"","frontmatter":{},"headers":[],"relativePath":"public/kronos/docs/grids.md","filePath":"public/kronos/docs/grids.md"}'),e={name:"public/kronos/docs/grids.md"},n=t(`

Grids

Grids are an easier way of making a group of similar clickables. They all have the same behavior, but are different based on their data.

NOTE: Gridables are similar to clickables in some respects, but are fundamentally different from normal TMT components in quite a few ways. Be sure to keep these in mind:

Useful functions for dealing with grids:

The grid should be formatted like this:

js
grid: {
    rows: 4, // If these are dynamic make sure to have a max value as well!
    cols: 5,
    getStartData(id) {
        return 0
    },
    getUnlocked(id) { // Default
        return true
    },
    getCanClick(data, id) {
        return true
    },
    onClick(data, id) { 
        player[this.layer].grid[id]++
    },
    getDisplay(data, id) {
        return data 
    },

    etc
}

Features:

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