109 lines
7.7 KiB
JSON
109 lines
7.7 KiB
JSON
{
|
||
"_comment": "SHOP UI — the buy/sell (and buyback) screen over the shop clip (data/shopui.json). LAYOUT: the SELL grid (the player's cargo bays) sits on the LEFT, the BUY list (the shop's stock, as a scrollable list of wide rows) RIGHT NEXT TO it with just a bit of padding between (grid.centerW) — the panel is pure selection. The panel SPANS the screen: the SELL grid's left edge is flush with the planet text (data/landing.json → landing.hud.marginX), and the BUY list stretches to the same right padding. The trade ACTIONS (Confirm/Clear) + the live NET-credits readout ride on the TAB SUB-BAR (→ tabs/preview/buttons), and the tab sub-bar toggles Buy/Sell ↔ Buyback (Buyback is disabled until the player has SOLD something this session). The panels are semi-transparent so the shop clip shows through; items + text are full alpha. SELL CELLS show the good's ICON only — the name + price appear in a hover TOOLTIP (→ tooltip) instead of over the icon. BUY ROWS carry their name + description (wraps to two lines, never over the price/stepper) + price INLINE (no tooltip — the row is wide enough). GEOMETRY (slot/gap/grid/centerW) is primitives the code (js/ui/shop/ShopView.js) lays out against the live scene size — not pixel positions. The ECONOMY itself (prices, stock) is Economy.js + data/goods.json + data/economy.json; this file is only presentation.",
|
||
"enabled": true,
|
||
|
||
"tabs": {
|
||
"_comment": "The tab sub-bar (the deck's cyberpunk style — js/ui/MenuButton.js): [Buy/Sell][Buyback] │ [Clear][Confirm] │ NET <value> — the tabs, the trade ACTIONS (→ buttons), and the live NET readout (→ preview), past hairline dividers, on ONE console. Buy/Sell opens the trade panel; Buyback opens the buyback panel (goods sold this session, session-local only). Size/palette come from data/save.json → subBar + colors (the Menu sub-bar recipe); this section just holds the labels + Buy/Sell accent. The sub-bar rests above the command deck, anchored to the deck's Shop button (SurfaceScene.shopAnchor).",
|
||
"buySell": "Buy/Sell",
|
||
"buyback": "Buyback",
|
||
"activeAccent": "#00e5ff",
|
||
"disabledAlpha": 0.34
|
||
},
|
||
|
||
"panel": {
|
||
"_comment": "The semi-transparent panel behind each side (the SELL grid's bays / the BUY list's rows) — the shop clip shows through it (bgAlpha < 1) but the goods + labels sit at full alpha on top.",
|
||
"bgColor": "#0a1120",
|
||
"bgAlpha": 0.70,
|
||
"border": "#22405f",
|
||
"pad": 16,
|
||
"title": { "fontSize": 21, "color": "#eaf6ff", "h": 34 }
|
||
},
|
||
|
||
"grid": {
|
||
"_comment": "The SELL side's 4×4 bay grid (data/economy.json → cargo.maxSlots = 16 slots): the first `capacity` cells are live cargo bays (one good each), the rest are locked (the hold's upgrade room). `centerW` is the small PADDING gap between the SELL grid and the BUY list (the panels sit side by side; the trade actions live on the tab sub-bar — → buttons). (The BUY side is a list now — → buyList.)",
|
||
"cols": 4, "rows": 4,
|
||
"slot": 96, "gap": 10,
|
||
"centerW": 16
|
||
},
|
||
|
||
"slot": {
|
||
"_comment": "A single SELL bay cell. `bg` is the cell plate, `selected` the SELL-check highlight (a bay marked to sell), `lockAlpha` dims the locked/empty cells. `iconScale` sizes the good icon, which fills the cell (the name + price live in the hover tooltip, not over the icon). `name`/`price` colors feed the tooltip's name/price lines. Colors follow the theme (cyan selection, green sell, magenta = bad).",
|
||
"bgColor": "#0e1728",
|
||
"border": "#1d2e4c",
|
||
"selected": "#00e5ff",
|
||
"lockAlpha": 0.30,
|
||
"iconScale": 0.62,
|
||
"name": { "fontSize": 11, "color": "#eaf6ff" },
|
||
"price": { "fontSize": 12, "sell": "#7ce8a4" },
|
||
"emptyLabel": "—",
|
||
"lockLabel": "locked"
|
||
},
|
||
|
||
"buyList": {
|
||
"_comment": "The BUY side (js/ui/shop/BuyList.js): the shop's stock as a SCROLLABLE LIST of WIDE ROWS — [icon] NAME / description (the good's flavor, data/goods.json, wraps to up to desc.maxLines lines and NEVER over the price/stepper) … PRICE, − qty +. Live, ShopView STRETCHES the list from just past the SELL grid out to the right padding (data/landing.json → landing.hud.marginX) — `w` is only the fallback when no width is passed (headless/dev). Sized to the SELL grid's height so the panels align top AND bottom; the list scrolls (drag on the body / mouse wheel) when the stock outgrows the viewport — rows outside it are hidden (row-based clipping; this Phaser build has no camera/mask clip). A row in the pending trade (qty > 0) gets the accent border + lit qty. `rowH` is tall enough for the two-line description. `pad` insets rows from the panel edge; the title bar reuses panel.title.",
|
||
"w": 560,
|
||
"pad": 14,
|
||
"rowH": 72,
|
||
"rowGap": 6,
|
||
"icon": 44,
|
||
"iconGap": 12,
|
||
"name": { "fontSize": 14, "color": "#eaf6ff" },
|
||
"desc": { "fontSize": 11, "color": "#7d92c4", "maxLines": 2 },
|
||
"price": { "fontSize": 14, "color": "#ffc94d", "w": 64 },
|
||
"rowBg": "#0e1728",
|
||
"rowBgAlpha": 0.55,
|
||
"rowBorder": "#1d2e4c",
|
||
"rowSelBg": "#12283a",
|
||
"rowSelBgAlpha": 0.85,
|
||
"selected": "#00e5ff"
|
||
},
|
||
|
||
"tooltip": {
|
||
"_comment": "The hover tooltip — one per SELL grid (shared), revealed when the pointer is over a usable bay: the good's NAME + the sell-price line (\"sell for N cr\"). Anchored above the cell, or below when there's no room (top row); centred on the cell, clamped to the panel. Size/palette follow the theme; text is the body face (Centauri). (The BUY list has no tooltip — its rows carry the name/price inline.)",
|
||
"bgColor": "#0a1120",
|
||
"bgAlpha": 0.96,
|
||
"border": "#22405f",
|
||
"pad": 10,
|
||
"gap": 8,
|
||
"nameFontSize": 14,
|
||
"priceFontSize": 13
|
||
},
|
||
|
||
"stepper": {
|
||
"_comment": "The BUY list's per-row quantity stepper (− n +): clicking −/+ adjusts that good's buy quantity (the qty tap = +1); the live preview recalcs. `w` is the stepper block's width (sizes the price gap). The sell side is bay-based (each bay = 1 unit, tap to check), so it has no stepper.",
|
||
"fontSize": 19,
|
||
"w": 88,
|
||
"color": "#eaf6ff",
|
||
"btn": "#7d92c4",
|
||
"activeColor": "#00e5ff"
|
||
},
|
||
|
||
"preview": {
|
||
"_comment": "The live NET-credits readout — on the TAB SUB-BAR, right of the Buy/Sell + Buyback buttons, past a hairline divider (→ divider): tabs AND the pending trade's credit delta on one console, one glance apart. Positive (you're up) = green, negative (a net spend) = the value shown in magenta, zero = dim (entry state / nothing selected). The value is right-aligned at the bar's end so longer numbers (+1,240 cr) never resize the bar. Confirm is disabled while the trade is invalid (can't go negative, hold overflows).",
|
||
"label": "NET",
|
||
"labelColor": "#7d92c4",
|
||
"labelFontSize": 12,
|
||
"valueFontSize": 22,
|
||
"zeroColor": "#7d92c4",
|
||
"posColor": "#7ce8a4",
|
||
"negColor": "#ff2d6f",
|
||
"gap": 12,
|
||
"divider": { "width": 2, "height": 26, "color": "#22405f", "alpha": 0.9 }
|
||
},
|
||
|
||
"buttons": {
|
||
"_comment": "Confirm (execute the trade) + Clear (reset this side's selection) — on the TAB SUB-BAR (→ tabs), between the tabs and the NET readout: they appear once the player starts checking/stepping items, and serve BOTH the trade and the buyback tabs. Confirm is grayed (disabled) while the trade is invalid. Button size/palette come from data/save.json → subBar (the same MenuButtons as the tabs); this section just holds the labels + accents.",
|
||
"confirmLabel": "Confirm",
|
||
"clearLabel": "Clear",
|
||
"confirmAccent": "#7ce8a4",
|
||
"clearAccent": "#7d92c4"
|
||
},
|
||
|
||
"animation": {
|
||
"_comment": "Reveal: the SELL grid slides in from the left, the BUY list from the right (data/shopui.json → animation). A short stagger keeps it feeling assembled rather than popped.",
|
||
"slideMs": 340,
|
||
"staggerMs": 26,
|
||
"ease": "Cubic.Out"
|
||
}
|
||
}
|