Sign in Get 3 free credits

Try a job or a niche: tiktok captions, study notes, excel formulas. Press Esc to close.

Game menus in melonJS

Builds HUDs, menus, sliders, dialogue panels and text in melonJS, with working code that avoids common traps.

Claude's review

9/10 Specific melonJS UI and text traps with working code.

We asked Claude the question you would ask: would I be glad I installed this? We only sell skills it rates 7 or higher.

In detail

Use this skill for HUDs, buttons, menus, options screens, dialogue panels, progress bars and on-screen text in melonJS. Covers UIBaseElement/UISpriteElement/UITextButton, UICheckbox, UISlider, ProgressBar, UIPanel (skins, layout, scrolling), keyboard and gamepad focus, Draggable and DropTarget, the floating screen-space container pattern, which of two overlapping panels gets the pointer, Text and BitmapText, web font loading, and NineSliceSprite panels. Triggers on: UI, HUD, button, checkbox, radio button, slider, volume slider, options menu, settings screen, scrolling list, UI skin, progress bar, health bar, menu, dialogue, moveToTop, onOver, onClick, bindKey, keyboard shortcut, Tween, animate a label, wavy text, glyphEffect, rainbow text, typewriter, visibleRatio, drag and drop, isDraggable, focus, fillStyle, fillGradient, gradient text, tint, font, fontface, wordWrapWidth, score display, fullscreen, requestFullscreen, fullscreen button.

How you use it

  1. Add it to your pack, then download your pack (1 credit).
  2. In Claude, open Customize > Skills and upload the zip. Code execution needs to be on under Settings > Capabilities.
  3. Ask Claude for the job in your own words. It uses the skill when your request matches what it does. Step by step guide

Safety check

Nothing risky found: no hidden instructions, no download and run, no reading of saved passwords or keys.

An automated scan lowers risk but cannot promise zero risk. How we check skills

Preview

The first lines of SKILL.md
---
name: melonjs-ui-and-text
description: "Use this skill for HUDs, buttons, menus, options screens, dialogue panels, progress bars and on-screen text in melonJS. Covers UIBaseElement/UISpriteElement/UITextButton, UICheckbox, UISlider, ProgressBar, UIPanel (skins, layout, scrolling), keyboard and gamepad focus, Draggable and DropTarget, the floating screen-space container pattern, which of two overlapping panels gets the pointer, Text and BitmapText, web font loading, and NineSliceSprite panels. Triggers on: UI, HUD, button, checkbox, radio button, slider, volume slider, options menu, settings screen, scrolling list, UI skin, progress bar, health bar, menu, dialogue, moveToTop, onOver, onClick, bindKey, keyboard shortcut, Tween, animate a label, wavy text, glyphEffect, rainbow text, typewriter, visibleRatio, drag and drop, isDraggable, focus, fillStyle, fillGradient, gradient text, tint, font, fontface, wordWrapWidth, score display, fullscreen, requestFullscreen, fullscreen button."
license: MIT
---

# UI, HUD and text

## Outlined text: behind the glyphs, or over them

An outline is centred on the glyph's edge, so half of it lies inside the
glyph. `Text` paints it **behind** the glyphs by default (`paintOrder:
"stroke"`): the letters stay whole and the outline shows only around them, so
a thick outline works on any face. What shows is half of `lineWidth`: ask for
twice the width you want to see.

`paintOrder: "fill"` paints the glyphs first and the outline over them, as a
plain canvas does with `fillText` then `strokeText`, and as melonJS did before
20.13. Its inner half then covers the letters: on a small or thin face a
`lineWidth` of 3 already leaves them solid outline colour.

```js
const style = {
    font: "sans-serif", size: 32,
    fillStyle: "#ffd23f", strokeStyle: "#1b1b1b", lineWidth: 6,
};
new Text(x, y, { ...style, text: "BEHIND" });                     // the default
new Text(x, y, { ...style, paintOrder: "fill", text: "OVER" });   // the old look
```

The stroke used to cost you the top row of pixels as well, and a display face
whose glyphs overshoot the nominal ascent did the same on its own: the render
box was sized from the line height alone, with no allowance for either. **That
is fixed** — the bake is padded by the ink's real extent and the blit shifts
back by the same amount, so nothing is clipped and the reported bounds are
unchanged. Write the string you mean:

```js
new Text(x, y, { font: "Display", lineWidth: 1, lineHeight: 1.45, text: "" });
hud.setText("SCORE 100");
...

From melonjs's repository, MIT licence.

Related skills

  • Checked

    Godot game optimisation

    Profiles a Godot game and fixes common slowdowns in draw calls, physics and memory so it runs more smoothly.

    by jame581 1k
    7/101 credit
  • Checked

    Game camera tuning

    Builds and tunes follow, orbit and first person game cameras in Godot or Cinemachine so they stop jittering.

    by gamedev-skills 13k
    8/101 credit
  • Checked

    Game HUD and menus

    Sets rules for game HUDs and menus, from scaling to safe areas and gamepad focus, so screens fit any display.

    by gamedev-skills 13k
    7/101 credit
  • Checked

    Game controller input

    Sets up input actions, stick deadzones, buffered presses and rebinding in Godot, so controls feel reliable.

    by gamedev-skills 13k
    8/101 credit
  • Checked

    Blender asset optimisation

    Cuts Blender assets down to each platform's budget with LODs, decimation and texture atlases before export.

    by EL4CTEO 3.8k
    7/101 credit
  • Checked

    Three.js game UI

    Designs HUDs, menus, pause screens and touch controls for Three.js games that read well on any screen.

    by majidmanzarpour 3.3k
    7/101 credit

Secure checkout

Credits

AUD

  1. 1Choose
  2. 2Pay on Square
  3. 3Credits added