Responsive Ui logo

Responsive Ui

Community
jame581
responsive-ui

Use when handling multiple resolutions — stretch modes, aspect ratios, DPI scaling, and mobile/desktop adaptation

Overview

Publisherjame581
RepositoryGodotPrompter
Skill nameresponsive-ui
Stars
808
Forks
47
Bundled files
4
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 4 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by jame581 on GitHub. Read the source before you install it.

Installation

Install the Responsive Ui AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/jame581/GodotPrompter/tree/master/skills/responsive-ui
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/jame581/GodotPrompter.git /tmp/GodotPrompter
mkdir -p .claude/skills
cp -r /tmp/GodotPrompter/skills/responsive-ui .claude/skills/responsive-ui
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Responsive Ui in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Responsive Ui on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Responsive Ui is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Responsive UI in Godot 4.3+

All examples target Godot 4.3+ with no deprecated APIs. GDScript is shown first, then C#.

Related skills: godot-ui for Control node layout and themes, export-pipeline for platform-specific export settings, godot-project-setup for initial project resolution settings, input-handling for touch vs desktop input adaptation, localization for layout adjustments per locale, mobile-development for safe-area and notch handling.


1. Project Settings for Resolution

Configure base resolution and stretch behaviour in Project > Project Settings > Display > Window.

Key settings and their .godot/project.godot keys:

Settingproject.godot keyRecommended value
Viewport widthwindow/size/viewport_width1920 (or your base design width)
Viewport heightwindow/size/viewport_height1080 (or your base design height)
Stretch modewindow/stretch/modecanvas_items (most games)
Stretch aspectwindow/stretch/aspectexpand (fill screen) or keep (letterbox)
Scale factorwindow/stretch/scale1 (adjust for pixel art integer scaling)

Godot 4.7+: Projects newly created in Godot 4.7 already default display/window/stretch/mode to canvas_items and display/window/stretch/aspect to expand (previously disabled / keep) — the recommendations above are now the out-of-the-box values. Projects created on older versions are unchanged (the property default is still disabled), so set both explicitly when upgrading. See the 4.7 migration guide.

These can also be set at runtime:

GDScript:

gdscript
# Read current viewport size
var viewport_size: Vector2 = get_viewport().get_visible_rect().size

# Change stretch mode at runtime
ProjectSettings.set_setting("display/window/stretch/mode", "canvas_items")

C#:

csharp
// Read current viewport size
Vector2I viewportSize = GetViewport().GetVisibleRect().Size;

// Change a project setting at runtime (takes effect next frame)
ProjectSettings.SetSetting("display/window/stretch/mode", "canvas_items");

2. Stretch Mode Comparison

Modeproject.godot valueRenderingBest For
canvas_items"canvas_items"Viewport rendered at design resolution, then upscaled — UI and 2D nodes scale smoothlyMost 2D and UI-heavy games
viewport"viewport"Entire viewport is rendered at design resolution and stretched; no sub-pixel blendingPixel art games needing pixel-perfect output
disabled"disabled"No automatic scaling; every Control node must handle its own layoutComplex custom scaling, 3D games with a Control HUD

When to choose each:

  • canvas_items — Default recommendation. Smooth scaling at any resolution. UI built with Control nodes and anchors responds naturally. Text and icons stay crisp at high DPI when combined with content_scale_factor.
  • viewport — Locks rendering to the design resolution. Combined with integer scaling and nearest-neighbour filtering it gives a classic pixel-perfect look. Avoid for high-DPI displays unless you intentionally want chunky pixels.
  • disabled — Use when you need full manual control, e.g. a 3D game where the UI must adapt to safe areas or unusual aspect ratios without Godot scaling it.

3. Aspect Ratio Handling

Set via Project > Project Settings > Display > Window > Stretch > Aspect or the window/stretch/aspect key.

ModeVisual ResultWhen to Use
keepLetterbox (black bars top/bottom) or pillarbox (bars left/right) — design rect is preserved exactlyGames with a fixed layout that must not be cropped (e.g. score-based arcade, puzzle)
expandScreen is fully filled; the visible game area grows on wider or taller displaysAction games, platformers — more visible play area is a bonus, not a problem
keep_widthWidth is fixed; height expands on taller screens (mobile portrait)Portrait mobile games where horizontal alignment is strict
keep_heightHeight is fixed; width expands on wider screens (landscape)Landscape games where vertical alignment is strict (e.g. side-scroller HUD)

expand with adaptive UI is the most versatile choice for games targeting both desktop and mobile. Anchor your HUD elements to screen edges so they follow the expanded visible area.


4. Pixel Art Setup

For crisp pixel-art games: Project Settings → Display → Window → Stretch → Mode = viewport, base resolution at native pixel size (e.g., 320×180), Window Size Override = 4× for editor preview. Use integer scaling to avoid sub-pixel blur.

See references/pixel-art-setup.md for full project settings, integer-scaling script, nearest-neighbour filter overrides.


5. DPI Scaling

For retina / high-DPI displays: set content_scale_factor to scale the entire UI proportionally. Query DisplayServer.screen_get_dpi() at runtime for adaptive scaling per device.

See references/dpi-scaling.md for the content_scale_factor recipe and DPI-querying patterns.


6. Mobile Considerations

Four mobile-specific concerns: touch input (tap, swipe, multi-touch), safe-area insets (notch / dynamic island avoidance), orientation lock (portrait/landscape pinning), virtual keyboard (handle show/hide to avoid covering UI).

See references/mobile.md for full GDScript on each concern, plus iOS / Android nuances.


7. Adaptive Layouts

Anchor presets + Container nodes do most of the work. Use size_flags_horizontal/vertical (FILL, EXPAND, SHRINK_CENTER, SHRINK_END) to control how children consume container space. Detect runtime resolution changes via get_viewport().size_changed.

See references/adaptive-layouts.md for the anchor + container strategy, resolution-change detection, and the full size_flags reference.


8. Testing Multiple Resolutions

Editor Preview Sizes

In the editor viewport, use Editor > Editor Settings > Run > Window Placement to start the game at specific sizes, or use the viewport size selector in the 2D editor toolbar.

Add common test sizes under Project > Project Settings > Display > Window > Size > Test Width/Height to preview in the editor.

--resolution CLI Flag

Launch from the command line with an override resolution:

bash
# Windows
godot.exe --path "C:/projects/mygame" --resolution 1280x720

# Linux / macOS
godot --path /projects/mygame --resolution 1280x720

# Run an exported binary at a specific size
./mygame.x86_64 --resolution 375x812

Common Test Resolutions

ResolutionAspectCommon Use
1920×108016:9Standard 1080p desktop / TV
2560×144016:91440p high-DPI desktop
1280×72016:9Low-end desktop / minimum target
640×36016:9Pixel art base resolution (2× of 320×180)
2732×20484:3iPad Pro — tests non-16:9 aspect ratios
390×844~19.5:9iPhone 14 portrait
844×390~19.5:9iPhone 14 landscape
1080×240020:9Android tall portrait
360×800~20:9Android low-end portrait

Strategy: Always test at your base design resolution, one resolution wider than 16:9 (e.g. 21:9 ultrawide), and one taller (e.g. mobile portrait). These three cases catch the most layout bugs.


9. Checklist

  • Base viewport size (viewport_width / viewport_height) matches the design canvas in the editor
  • Stretch mode chosen deliberately: canvas_items for most games, viewport for pixel art
  • Aspect ratio mode chosen: expand unless fixed-layout content requires keep
  • Pixel art games use viewport stretch + Nearest texture filter + integer content_scale_factor
  • All HUD Control nodes use anchors anchored to the nearest edge, not fixed position values
  • custom_minimum_size set on buttons and interactive elements to prevent collapse below tap target size (minimum 44×44 px recommended for mobile)
  • size_flags_horizontal / size_flags_vertical set to SIZE_EXPAND_FILL on elements that should fill space
  • get_viewport().size_changed signal connected where layout must respond to window resize
  • Safe area insets read from DisplayServer.get_display_safe_area() and applied to a root MarginContainer
  • content_scale_factor set at startup based on DisplayServer.screen_get_dpi() for high-DPI / Retina displays
  • Touch input handled via InputEventScreenTouch / InputEventScreenDrag, not mouse events alone
  • Orientation locked to the correct mode (SCREEN_LANDSCAPE / SCREEN_PORTRAIT) or SCREEN_SENSOR where rotation is intended
  • Virtual keyboard height queried after show and used to shift UI content upward on mobile
  • Tested at minimum: design resolution, one ultra-wide (21:9), and one mobile portrait resolution
  • --resolution flag used in CI or playtest scripts to automate multi-resolution smoke tests

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Responsive Ui AI skill do?

Use when handling multiple resolutions — stretch modes, aspect ratios, DPI scaling, and mobile/desktop adaptation

Why use Responsive Ui on TypingMind?

Because you install it once and use it with any model. Responsive Ui is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Responsive Ui in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/jame581/GodotPrompter/tree/master/skills/responsive-ui. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Responsive Ui?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Responsive Ui?

As many as you like. As long as a model supports skills, you can use Responsive Ui with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Responsive Ui AI skill free?

Yes. It is published on GitHub by jame581 under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇