Skip to content
C

Create-Buzzy-Bees

Build your create schematics using bees

3 open 11 shipped
Back to board
#74 Closed

Planner screen: texture sheet layout spec

#enhancement#documentation

Goal: a texture sheet the textures can be drawn against, with fixed regions the code relies on.

Scope

  • Add textures/gui/construction_planner.png (256×256 or 512×256, depending on the window size) with flat placeholder regions:
    • window background
    • list row: normal, hover, selected
    • group / parent row icons
    • scrollbar track and thumb
    • preview frame
    • material slot
    • small icon buttons (rename, delete, back, reset view)
  • Register the regions in AllCCRGuiTextures, the same way as the other screens.
  • Write a short region table (name, x, y, w, h) in this ticket, so the sheet can be painted without reading code.

Acceptance

  • The placeholder sheet loads and every region is registered.
  • The region table is in the ticket.
  • Repainting the PNG needs no code change, as long as the regions keep their coordinates.

Out of scope: the final artwork (separate ticket).

// Comments

5
  • D

    devin

    Texture sheet: assets/cbbees/textures/gui/construction_planner.png (512×512)

    Keep every region at its coordinates and size. Anything outside the regions is unused. Code constants are AllCCRGuiTextures.PLANNER_*.

    Sprites on the sheet

    Region x y w h Notes
    WINDOW 0 0 400 230 Whole window background. Panels, slots and scrollbar tracks are painted into it (see below).
    ROW_HOVER 0 232 112 18 List row under the mouse. Drawn on top of the list, can be translucent.
    ROW_SELECTED 0 250 112 18 Selected list row.
    ICON_GROUP 116 232 12 12 Folder / group entry.
    ICON_PARENT 128 232 12 12 ".." entry to go up.
    ICON_SCHEMATIC 140 232 12 12 Schematic entry.
    SCROLL_THUMB 156 232 4 15 Scrollbar thumb, same for both scrollbars.
    ICON_BUTTON 0 272 12 12 Small button background, normal.
    ICON_BUTTON_HOVER 12 272 12 12 Hover.
    ICON_BUTTON_DISABLED 24 272 12 12 Disabled.
    GLYPH_RENAME 40 272 12 12 Drawn on top of the icon button.
    GLYPH_DELETE 52 272 12 12
    GLYPH_BACK 64 272 12 12
    GLYPH_RESET_VIEW 76 272 12 12
    BUTTON 0 288 72 16 Text button, normal.
    BUTTON_HOVER 0 304 72 16 Hover.
    BUTTON_DISABLED 0 320 72 16 Disabled.

    Areas inside WINDOW (coordinates relative to the window)

    The code draws content into these rectangles, so the painted background must leave them clear.

    Area x y w h Content
    Search field 8 6 120 12 Text input (borderless; text starts at x+3).
    Title 133 6 168 12 Title text centered.
    Rename / Delete buttons 366 / 380 6 12 12 Icon buttons.
    List panel 7 22 122 184 Frame of the list.
    ↳ Back button 9 24 12 12 Only when inside a group.
    ↳ Breadcrumb 23 26 98 9 Text.
    ↳ Rows 9 38 112 162 9 rows of 18 px. Icon at row x+2, y+3; text at x+16.
    ↳ Scrollbar track 123 38 4 162 Thumb moves inside.
    Preview panel 133 22 168 184 Frame.
    ↳ 3D viewport 135 24 164 150 3D preview; reset view button at 285, 26 inside it.
    ↳ Info area 135 176 164 28 Name, group and size text.
    Materials panel 305 22 88 184 Frame.
    ↳ Header 309 25 76 9 "Materials" text.
    ↳ Slot grid 309 36 72 162 4×9 slots of 18 px; item at slot x+1, y+1, count bottom-right.
    ↳ Scrollbar track 385 36 4 162
    Buttons 8 / 84 / 244 / 320 210 72 16 Select, Assign group, Browse online, Done.

    Placeholder uses the vanilla palette (black border, white highlight, #C6C6C6 body, dark recessed panels) like the other screens.

  • D

    devin

    Update: full-screen layout (replaces the WINDOW region)

    The planner now fills the whole screen, so panels stretch with the screen size and are drawn as nine-slices: corners keep their size, while edges and center repeat (tile, not stretch), so pixel art stays crisp. The old 400×230 WINDOW region is gone. All other sprites keep their coordinates.

    New stretchable regions (top row of the sheet)

    Region x y w h Border Used for
    FRAME 0 0 32 32 4 Whole-screen background.
    PANEL 40 0 16 16 2 List, preview and materials panels.
    VIEWPORT 64 0 16 16 2 3D preview area inside the preview panel.
    SEARCH 88 0 16 12 2 Search field.
    SLOT 112 0 18 18 — Tiled across the material grid (one slot = one tile).
    SCROLL_TRACK 136 0 4 16 2 top/bottom Both scrollbar tracks, repeats vertically.

    Changed behaviour of existing sprites

    • ROW_HOVER / ROW_SELECTED (112×18) are now nine-sliced with border 2, because the list width changes with the screen. Keep the left/right 2 px as the row edge; the middle repeats.
    • Everything else (icons, scroll thumb, icon buttons, glyphs, text buttons) is drawn 1:1 as before.

    Layout rules (for reference)

    • List: 28% of the screen width (110–220 px). Materials: 3–9 slot columns. The preview takes the rest.
    • Top bar: search field, title centered over the preview, rename/delete at the top right. Bottom bar: Select and Assign Group on the left, Browse Online and Done on the right.
  • D

    devin

    Update: the screen background is the vanilla transparent dim again, so the FRAME region (0, 0, 32×32) is unused and doesn't need painting. Only the panels, viewport, search field, slots and tracks are textured; they sit directly on the dimmed world.

  • D

    devin

    Update: ICON_SCHEMATIC (140, 232) is unused, because schematic rows have no icon anymore. Semi-transparent pixels now blend correctly on every region, so ROW_HOVER / ROW_SELECTED can be translucent overlays.

  • D

    devin

    Dialogs (Assign Group, Rename, Delete): textures/gui/schematic_dialog.png (256×256)

    This is a new sheet, separate from the planner sheet. The dialogs also reuse planner pieces: SEARCH for input fields, BUTTON* for buttons, and PANEL, ROW_*, SCROLL_* and ICON_GROUP for the group list.

    Region x y w h Border Used for
    DIALOG 0 0 32 32 4 Dialog background, nine-sliced. Sizes are 220×80 (rename), 220×96 (delete) and 220×200 (group picker).
    DIALOG_DIVIDER 40 0 16 2 2 left/right Horizontal separator in the group picker; repeats horizontally.
    DIALOG_WARNING 60 0 16 16 — Icon in the delete dialog.