Skip to content

feat: the editor's interface, with Mission mode's Script view - #13

Merged
vdmkenny merged 7 commits into
mainfrom
feat/script-view
Oct 14, 2026
Merged

vdmkenny merged 7 commits into
mainfrom
feat/script-view

Conversation

@vdmkenny

@vdmkenny vdmkenny commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

The editor's first code: the design's interface, with Mission mode's Script view working.

  • Stack: Zig 0.17, SDL3 and SDL_GPU from the same package as OpenReliant, Dear ImGui 1.92.9b's docking branch through Dear Bindings' C API, ImGuiColorTextEdit through a C shim, IBM Plex Sans, JetBrains Mono, Lucide's icons and Newtown. OpenReliant comes in as a package, pinned at the commit that exports its library and mission source parser (build: export the mission source parser for other projects openreliant#1205).
  • Shell: the menu bar, the toolbar, the dock layout of panels, the status bar, the start screen, the command palette and the Keys settings, as the design's pages draw them. Every action is declared once (src/commands.zig) with its icon, menu and keys on Windows and Linux and on macOS.
  • Games come from their profile (src/game.zig): StarLancer's reads its commands, conditions and records from OpenReliant's tables, and builds and decompiles with OpenReliant's compiler. Its data is kept apart from the library calls, so that profiles can become files a Game mode edits (Game mode: a game's profile, for games made on OpenReliant 2.0 #11).
  • Script view: opens a mod's missions, a mission file (decompiled to source beside it) or one of the game's own missions (as the source of a new mod); colours the game's words; checks the source as it's typed, with the problem in the gutter, under the text, on the outline and in Problems, and fixes for a name that isn't declared; completion and hover help from the catalogues, and the Reference panel; the outline and the inspector; breakpoints in the gutter; Build, with the script listing; Play in game and Play from part, which start openreliant on the mission.
  • Text as in the design: each font size the design uses is a font of its own, drawn at its exact size, and each line sits on the baseline a browser gives it (gui.textTop). The design's pictures now show the name in Newtown: browsers refused the font's file, which the design's copy fixes.
  • Like OpenReliant: an icon of its own made as OpenReliant's, OR with EDITOR under it, in the window, the Dock and the Windows executable, with OpenReliant's Windows manifest; --version from the version release-please keeps in build.zig.zon; release-please and the release workflow that builds the six systems' archives with checksums and attestations. The first release is 0.0.1.
  • Greyed out, each with its issue: the Scene view (The Scene view #2), the Blocks view (The Blocks view and its flow graph #3), Mod mode (Mod mode: Manifest, Code, Game files and Share #4), the debugger and the editor link (The debugger on the editor link #5), the guided first mission (The guided first mission #6), new mods from templates (New mods from templates #7), editing records with forms (Add and edit records with forms #8), .hog mods (Open .hog mods, read only #9), the General and Appearance settings (The General and Appearance settings #10).

Differs from the design: comments aren't in italics and the ships' icons are outlines, since the text editor draws in one font and Lucide's icons are outlines only; the fold arrows sit before the line numbers, where the text editor draws them; completion inserts a command's name alone, without the values to tab through (#12); and code is laid out 8 pixels a character where the design has 7.5.

Checked: the tests in Debug and ReleaseFast, the screens against the design's pages with --screenshot, and --check-missions on an installed game, where each of the 44 stock missions opens as source and builds back to the same mission. CI builds and tests on Linux, macOS and Windows.

Part of OpenReliant/openreliant#1126.

The editor's first code: the design's interface on SDL3, SDL_GPU and Dear ImGui's docking branch,
through Dear Bindings' C API, with ImGuiColorTextEdit for the source through a C shim. It reads,
builds and decompiles missions with OpenReliant's own library and mission source parser, pinned at
the commit that exports them.

The interface never names a game's commands, conditions or records: it asks the game's profile,
which reads them from OpenReliant's tables, so that other games on OpenReliant are profiles of
their own. Every action is declared once with its label, icon, menu and keys on each system, and
what doesn't work yet shows greyed out with the issue that plans it.

The Script view opens a mod's missions, a mission file or one of the game's own missions as source,
checks it as it's typed, completes and explains the game's words, builds the mission, and plays it
in OpenReliant. Every stock mission opens as source and builds back to the same mission.
…h release-please

The editor shows OpenReliant's icon in its window and in the Dock, and the Windows executable
carries it with the editor's name, its version and OpenReliant's manifest, which keeps the text sharp
on scaled displays. --version reports the version release-please keeps in build.zig.zon, as
OpenReliant does, and the release workflow builds the six systems' archives for each release. The
first release is 0.0.1.

The mode switch's buttons get IDs of their own, apart from the menus of the same names, which ImGui
reported as a conflict.
The editor showed OpenReliant's icon. It now has its own: OpenReliant's OR, raised, with EDITOR
under it in IBM Plex Sans SemiBold, the interface's font, in the grey and the spacing of the menu
bar's EDITOR, on OpenReliant's sky. The SVG holds the letters as outlines, so it needs no font, and
scripts/icon.sh (make icon) makes the PNGs, the .ico and the .icns from it, as OpenReliant's does.
The editor's name and menus sat lower and higher than in the design. ImGui rounds every font size
to a whole pixel and centres text by that size, so text was a little off everywhere: 12 and 12.5
pixel text drew alike, Newtown 4% large, and many lines a pixel too high. Each size the design uses
is now a font of its own, scaled to the exact size, and gui.textTop puts a line's baseline where a
browser puts the design's, with the browser's rounding.

The menu bar and the toolbar take the design's heights, 37 and 45 pixels, with their controls
centred and the menus where their buttons put them. The start screen takes the design's columns,
cards and gaps, its Open chip runs Open with its keys, and the guided mission's line is shorter.

Browsers refused Newtown's file, so the design's pictures showed the name in IBM Plex Sans. The
design's copy is fixed and the pictures are taken again, with the name in Newtown.
…elp menu

The panels sat flush against each other and the toolbar, with tabs spaced apart and wider than
the design's. They now stand 3 pixels apart on the ground, each in its line with rounded corners,
at the design's sizes. ImGui spaced and padded the tabs and kept room for close buttons, so its
tabs now take their width from their titles and show nothing, and the editor draws every tab over
them as the design's, with the source panel's tabs from the same widget. The Mission tab has its
flag.

The underline of the view in front follows the tab's rounded corners, as the stylesheet's inset
shadow draws it, rather than squaring them off. The Help menu ends with the editor's version.
The line under the view in front curved up into the tab's corners, which read as too much. It is
now only the straight part along the bottom, between the rounded corners.
The line under the view in front curved up into the tab's corners. It is now as the panel tabs'
line, upside down: the tab's last 2 pixels, edge to edge, thinning only where the corners round.
@vdmkenny
vdmkenny merged commit 2e11944 into main Oct 14, 2026
3 checks passed
@vdmkenny
vdmkenny deleted the feat/script-view branch October 14, 2026 14:32
vdmkenny pushed a commit that referenced this pull request Oct 14, 2026
🤖 I have created a release *beep* *boop*
---


## 0.0.1 (2026-10-14)


### Features

* the editor's interface, with Mission mode's Script view
([#13](#13))
([2e11944](2e11944))


### Documentation

* the editor's design
([#1](#1))
([2891fa9](2891fa9))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant