Skip to content

Feature - Implement TabControl Data Model & Save Logic #9

@DevGeniusCode

Description

@DevGeniusCode

Title:
Feature: Implement TabControl class and SAGE engine properties

Description:
We need to support the TabControl UI element based on the original SAGE engine C++ source code . Unlike standard User controls, a Tab Control handles an array of sub-panes and specific layout orientations.

Tasks:

  • Create a new TabControl class inheriting from UserControl (or Window).
  • Inject specific default properties into the initialization:
    • TABORIENTATION (default: 'TOPLEFT')
    • TABWIDTH and TABHEIGHT
    • NUMTABS (default: 1)
  • Create a TABS array property capable of holding up to 8 tab dictionaries. Each dictionary must contain: NAME (label), SUBPANE (associated window name), and DISABLED (boolean).
  • Update the textures dictionary to include exactly 3 slots for ENABLEDDRAWDATA: Background, Active Tab, Inactive Tab.
  • Update the saving logic to ensure TABORIENTATION is written to the file before the TABS list.

Acceptance Criteria:

  • TabControl object generates the correct Python dictionary structure.
  • All specific Tab properties exist in the Property Editor.
  • Exporting to .wnd generates the syntax exactly as the game engine expects it (strict order of properties).

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions