Repository navigation
Conversation
On the desktop, TConsole::changeColors() styles a mini console's or user window's colour as background-color: rgba(...) over a transparent palette, and its text area fills only the cells whose colour is not the console's. So setBackgroundColor(name, r, g, b, a) with an alpha below 255, or a Geyser MiniConsole colour with one, shows what is under the window: a common Geyser pattern puts a chat box or HUD over a background label. The engine already sends bgAlpha for every window with a colour and Protocol.kt reads it, but the app drew every console opaque, so the label was hidden. - ScriptWindows.kt: ScriptWindow.backgroundArgb(), the window's colour as ARGB with its alpha (clamped, as Protocol.kt reads bgAlpha as it comes), or null where it has no colour. - ScriptWindowsArea.kt: WindowConsole paints that, with the console background where there is none. A mini console in the game area then shows the windows below it in its parent and the main console, as Mudlet's mini consoles, children of the main frame above its display, do. A user window, or a mini console that the stacked layout makes a page of the switcher, shows black. On the desktop a user window shows Mudlet's main window colour (its own window's when floating), which the app's user windows, part of the game area, do not have; the stacked layout draws no label from the side borders: docs/divergences.md records both. - ScriptLabel.kt: a label's fill takes the same backgroundArgb(), as it drew the same colour and alpha in its own way. - Runs keep their own colours opaque. The desktop fills a cell in a colour other than the console's with that colour, alpha and all, but a run's colour carries no alpha in the protocol, so a see-through setBgColor(name, r, g, b, a) is drawn opaque: noted in docs/phase-f.md. - docs/protocol.md: a console's bg may be transparent too (a new paragraph; no protocol change). docs/phase-f.md: how a console draws its colour. Tests: ScriptWindowsTest (instrumented) puts a maroon label under a green mini console and finds maroon at alpha 0, the two mixed at 128 and green when opaque; on main it finds green at 0. ScriptWindowsTest (:protocol) covers the alpha, a window without a colour, black, and an alpha past either end. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016ujaeGdi2MHnkoicGsDqhg
vadi2
force-pushed
the
ccr-14671218-tf96z6-scriptui-consolealpha
branch
from
November 18, 2026 03:46
786bf65 to
57590ce
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Brief overview of PR changes/additions
A mini console's or user window's colour is now drawn with its alpha.
setBackgroundColor(name, r, g, b, a)withabelow 255, or a Geyser MiniConsole colour with one, lets what is under the window show through, as on the desktop: a mini console in the game area shows the labels and windows below it.ScriptWindow.backgroundArgb()(:protocol) gives a window's colour as ARGB, alpha clamped, or null without one; the console and the label both draw from it.Motivation for adding to Mudlet
A common Geyser layout puts a chat box or HUD over a background label. The engine already sent
bgAlphafor every window, but the app drew each console opaque, so the label underneath was hidden.Other info (issues closed, discussion etc)
Part of Mudlet/Mudlet#9011
:protocoltests (231), ktlint, lint.sh. Two review rounds; the second was clean.ScriptWindowsTest(maroon label under a green mini console at alpha 0, 128 and 255) run here first; there is no Android SDK locally.🤖 Generated with Claude Code
https://claude.ai/code/session_016ujaeGdi2MHnkoicGsDqhg