import{_ as s,q as i,p as a,ag as t}from"./chunks/framework.Sr2_9k8k.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};