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

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
}
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),t=[o];function p(r,i,c,d,y,E){return a(),n("div",null,t)}const g=s(e,[["render",p]]);export{u as __pageData,g as default};