Skip to content

Quick Start Level 1

Brian Jr edited this page Nov 17, 2026 · 1 revision

2 · Quick start: add a Level-1 Look

  1. Enum — in LookStyle.kt, add a value to TccUiLook and a label case:
    enum class TccUiLook { AUTO, AURORA_GLASS, /* … */, E_INK, MY_LOOK; }
    // label: MY_LOOK -> "My Look"
  2. Fonts (optional) — drop an OFL .ttf into res/font/ named tcc_<name>.ttf, add a FontFamily in TccFonts.kt, and add attribution to assets/THIRD_PARTY_NOTICES.txt (required — see Gotchas).
  3. Colors — in TccLookColors.kt, resolveLookColors(palette, look) returns a TccLookColors. Add/branch the fields your Look needs; reuse an existing Look's block as a starting point. Colors should be derived from palette (accent + bg + text) so the Look follows the user's accent on dark and light palettes.
  4. Spec — in TccLookSpec.kt, copy StockLookSpec and override only what differs:
    val MyLookSpec: TccLookSpec = StockLookSpec.copy(
        look = TccUiLook.MY_LOOK,
        panelCardShape = RoundedCornerShape(aynDp(12f)),
        traits = LookTraits(
            card = CardStyle.GLASS, tile = TileStyle.NEON, gauge = GaugeStyle.RING,
            slider = SliderStyle.GLOW_GRADIENT, nav = NavStyle.GLASS_PILL, backdrop = BackdropStyle.AURORA,
            labelFontFamily = TccMonoFontFamily, displayFontFamily = TccMonoFontFamily,
            canvasFontRes = R.font.tcc_mono_bold, // used by the native-Paint FPS number
        ),
    )
  5. Map it — add one line to specForLook() in TccLookSpec.kt:
    TccUiLook.MY_LOOK -> MyLookSpec
  6. Build, install, screenshot both overlay tabs and the companion (see Verification Checklist). Iterate.

That's the whole Level-1 flow. No renderer code.


Level 2 extras (new visual style)

  • Add a value to the style enum (e.g. CardStyle.MY_CARD).
  • Create ui/components/looks/MyLookRenderers.kt with an object implementing the interface (LookCardRenderer, LookTileRenderer, LookGaugeRenderer, LookSliderRenderer, or LookNavRenderer). Copy the closest existing *Renderers.kt as a template — they show every method you can override.
  • Wire the enum value → your object in the matching .renderer() when in LookRenderers.kt.
  • Reference the new style in your spec's LookTraits.

Next: Driving an Agent

Clone this wiki locally