feat: integrate surf-display UI framework into surf-api#309
Draft
Copilot wants to merge 4 commits intoversion/26.1from
Draft
feat: integrate surf-display UI framework into surf-api#309Copilot wants to merge 4 commits intoversion/26.1from
Copilot wants to merge 4 commits intoversion/26.1from
Conversation
Add the public-facing Display/UI API classes across 35 files organized into 7 packages under dev.slne.surf.api.paper.display: - Color.kt: ARGB color utility functions - style/: CSS-like styling (Insets, Border, TextAlign, VerticalAlign, Overflow, FlexDirection, JustifyContent, AlignItems, Style) - cursor/: CursorStyle enum for hover cursor display - behavior/: Interaction system (Behavior, Clickable, Hoverable, Draggable, Scrollable, TooltipBehavior, InteractionContext, ElementPhase) - element/: UI element tree (Element, Div, Label, ImageElement, ShapeElement) - render/: Canvas pixel buffer and Renderer layout/paint engine - shape/: Geometric shapes (Rectangle, Circle, Ellipse, Line, Triangle, RoundedRectangle, Polygon) with BitSet rasterization - document/: Document root and DSL entry point Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: TheBjoRedCraft <143264463+TheBjoRedCraft@users.noreply.github.com>
Create the server-side display implementation in surf-api-paper-server with the following components: - user/DisplayUser.kt - Player wrapper with packet sending and session tracking - map/DisplayMap.kt - Map data container with packet creation - frame/DisplayItemFrame.kt - Virtual item frame entity management - cursor/Cursor.kt - Horse-based cursor rendering via equipment packets - DisplaySession.kt - Session lifecycle (horse mount, fake camera, visual effects) - Display.kt - Main display class with rendering, cursor, modals, interaction - DisplayManager.kt - Active display registry for open/close/lookup - protocol/DisplayProtocolListener.kt - PacketEvents listener for input handling - modal/Modal.kt - Confirm/alert/success/error/warning dialog builders - web/JavaFxPlatform.kt - JavaFX platform initialization and thread utilities - web/WebRenderer.kt - Offscreen WebView rendering to Canvas - web/WebDisplay.kt - WebView-backed display with async rendering Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: TheBjoRedCraft <143264463+TheBjoRedCraft@users.noreply.github.com>
…d, update API dump Agent-Logs-Url: https://github.com/SLNE-Development/surf-api/sessions/b48cae1b-adb9-4a36-a5af-f09bf8bf8fec Co-authored-by: TheBjoRedCraft <143264463+TheBjoRedCraft@users.noreply.github.com>
Agent-Logs-Url: https://github.com/SLNE-Development/surf-api/sessions/b48cae1b-adb9-4a36-a5af-f09bf8bf8fec Co-authored-by: TheBjoRedCraft <143264463+TheBjoRedCraft@users.noreply.github.com>
Copilot created this pull request from a session on behalf of
TheBjoRedCraft
April 12, 2026 12:15
View session
Member
|
Keine Ahnung ob man das irgendwann mal reinpacken möchte |
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.
Ports the surf-display map-based Display/UI framework into surf-api, following the existing API/impl module split.
API module (
dev.slne.surf.api.paper.display)Element,Div,Label,ImageElement,ShapeElement— DOM-like hierarchy with Kotlin DSL buildersStyleclass — flex layout, padding/margin/border, text alignment, overflow, cursor styleCircle,Rectangle,Ellipse,Triangle,Line,RoundedRectangle,PolygonviaShapeinterface withBitSetrasterizationClickable,Hoverable,Draggable,Scrollable,TooltipBehavior— composable interaction handlersCanvaspixel bufferdocument(width, height) { ... }entry pointServer module (
dev.slne.surf.api.paper.server.display)Canvastiles to map packets, software cursor overlayPaperInstancefor lifecycle managementconfirmDialog(),alertDialog(),successDialog(),errorDialog(),warningDialog()WebDisplay/WebRenderer/JavaFxPlatformfor HTML rendering via offscreen JavaFX WebViewTest plugin
/surfapitest display open|close— demo with shapes, hover buttons, modal dialog, text alignmentExample usage