UI Tab
The UI tab defines the four kinds of UI parts shown in-game: Window, Button, Bar, and Transition. The screen is split into four sub-tabs for management, and the user can freely add and edit parts in each.
In-game UI visuals are centralized here
In this tool, the visual appearance of UI referenced by various systems (message windows, choices, shops, HP bars, screen transitions, etc.) is managed in this tab. Other tabs reference it as "which UI design to use", so changing one design propagates to all referencing locations.
Overview
Purpose of the screen
- Window: Defines the background frame (nine-patch) used for messages, choices, shops, etc.
- Button: Defines the background frame (nine-patch) for various operation buttons.
- Bar: Defines the gauge images for HP / MP / EXP, etc.
- Transition: Defines fade/wipe effects for screen transitions.
Save destinations (4 files)
- Window:
addons/rpg_wizard/data/settings/window.json - Button:
addons/rpg_wizard/data/settings/button.json - Bar:
addons/rpg_wizard/data/settings/bar.json - Transition:
addons/rpg_wizard/data/settings/transition.json
Where it is referenced
| Reference source | What is defined in this tab |
|---|---|
| System tab | Basic presets such as bi_window / bi_button / menu_button / bi_transition_* |
| Parameter tab | The bar field per parameter such as HP/MP |
| Show Window | Window design to display |
| Show Selection Window | Design of the selection window |
| Add Button | Button design |
| Change Map | Transition effect |
| Start Battle | Transitions at battle start/end |
Screen layout
This tab has four sub-sections arranged vertically.
| Section | Part being defined |
|---|---|
| Window | Frame used for messages, choices, etc. |
| Button | Frame for various buttons |
| Bar | HP/MP gauge, etc. |
| Transition | Screen transition effect |
Each section shares a common structure: left-pane list + right-pane edit form + preview button.
Window
Defines the design of frames shown in-game, such as message windows, selection windows, and shop windows.
Screen layout
| Element | Purpose |
|---|---|
| Window list | ID list of all window designs |
| New button | Creates a new window design with the specified ID |
| Change ID button | Changes the ID of the selected design |
| Copy button | Duplicates the selected design (ID is auto-numbered) |
| Delete button | Deletes the selected design (with confirmation dialog) |
| Preview button | Shows the design being edited in a separate test window |
| Edit form | All properties on the right side |
Property list
| Item | Input format | Meaning |
|---|---|---|
| Name | Text | Window ID (only _a-zA-Z0-9) |
| Image | Text + file picker | 9-patch image for the window background |
| Theme | Text + file picker | .tres theme defining text color, font, etc. |
| Patch Margin Left | SpinBox | Left margin of 9-patch (px) |
| Patch Margin Top | SpinBox | Top margin of 9-patch (px) |
| Patch Margin Right | SpinBox | Right margin of 9-patch (px) |
| Patch Margin Bottom | SpinBox | Bottom margin of 9-patch (px) |
| Size X | SpinBox | Default width (px) |
| Size Y | SpinBox | Default height (px) |
| Position X | SpinBox | Default X coordinate (px) |
| Position Y | SpinBox | Default Y coordinate (px) |
Property details
Image
The path to the 9-patch image used as the window background.
- Use the file picker to choose an image from
data/sprites/windows/. - Recommended: a frame image with decorations on all four sides (corners and edges should be designed for stretching).
- 9-patch format: the outer parts (four corners, four edges) at the patch margins are not stretched; the center stretches according to window size.
Theme
A Godot Theme resource (.tres file) that defines the style of text and child elements shown within the window (text color, font, button decoration).
- Use the file picker to choose from
data/themes/. - If no theme is set, the Godot default style is used.
Patch Margin (Left / Top / Right / Bottom)
Specifies the stretch boundary of the 9-patch image in px.
- Example: if the four-sided frame decoration is 16px, set Left/Top/Right/Bottom = 16.
- The center stretches with the window size, while the four corners and edges remain fixed.
Size X / Y, Position X / Y
The default size and position when a window is displayed using this design.
- When this design is chosen in the Show Window event content, these values are applied automatically.
- They can also be overridden per event.
Preview
The Preview button displays the window design being edited in a separate test window. Since it looks close to the actual in-game screen, it is easier to tune through trial and error.
Button
Defines the background frame for various buttons (choices, menus, OK/Cancel, etc.).
Properties
The property structure is the same as Window (Image, Theme, Patch Margin, Size, Position).
- Save destination:
button.json - Independent dictionary structure from Window
Use cases
| Reference source | Purpose |
|---|---|
bi_button in System tab | Common button preset across all screens |
menu_button in System tab | Function button at upper-right (menu, etc.) |
| Add Button | Buttons placed dynamically in-game |
Bar
Defines gauge images for HP / MP / EXP, etc. It is a two-image set: a background image (base) and a progress image (full state). The displayed width of the progress image changes according to the current value.
Properties
| Item | Input format | Meaning |
|---|---|---|
| Name | Text | Bar ID |
| Progress Image | Text + file picker | Image displayed when the gauge is full |
| Under Image | Text + file picker | Base image always drawn underneath |
| Theme | Text + file picker | .tres theme related to the bar |
| Patch Margin Left / Top / Right / Bottom | SpinBox | 9-patch margins |
Property details
Progress Image / Under Image
- Under Image: Background image for the bar frame or empty state (always shown at full width).
- Progress Image: Foreground image whose width is clipped according to the current value ratio.
- When current value is 50%, only the left half of the progress image is visible, and the under image shows through the right half.
Patch Margin
Boundary settings for stretching the gauge image with 9-patch. Even when the bar width changes to fit the player's screen, the corner decorations are preserved.
How it is used
The Parameter tab has a field for selecting a bar image per parameter (HP / MP, etc.). The bar ID defined in this tab is assigned there. At runtime, the appropriate gauge is drawn per parameter based on that setting.
Transition
Defines fade effects for screen transitions (map changes, battle starts, game reset, etc.).
Properties
| Item | Input format | Meaning |
|---|---|---|
| Name | Text | Transition ID |
| Type | Choice | Color / Mask (two options) |
| Start Time | SpinBox | Seconds for fade-in (covering the screen) |
| Start Color R / G / B | SpinBox (0–255) | Target color for fade-out (when Type=Color) |
| Start Mask Texture | Text + file picker | Image used when Type=Mask |
| Start Mask Softness | SpinBox | Blur strength at the mask boundary (0–1 recommended) |
| End Time | SpinBox | Seconds for fade-out (restoring the screen) |
| End Color R / G / B | SpinBox (0–255) | Color for the ending fade |
| End Mask Texture | Text + file picker | Mask image for the ending fade |
| End Mask Softness | SpinBox | Blur of the end mask |
Property details
Type
Choose one of two drawing methods for the transition.
| Value | Meaning |
|---|---|
| Color | Single-color fade (cover screen with the specified color, then restore) |
| Mask | Complex transition using a grayscale image (wipe, dot-break, etc.) |
When Color is selected, the mask-related fields become inactive (grayed out); only when Mask is selected are they editable.
Start Time / End Time
Specifies the seconds for each phase of the transition.
- Start Time: Time during which the screen gets covered (fade-out).
- End Time: Time during which the screen returns to normal (fade-in).
Example: start 0.5 sec, end 0.5 sec -> total 1 sec transition effect.
Color (R / G / B)
The fade color used when Type=Color (RGB from 0 to 255).
- Example: Black (0, 0, 0) -> fades out to pitch black before the next screen.
- Example: White (255, 255, 255) -> white fade (for flashbacks, blackouts, etc.).
Mask Texture
The path to the grayscale image used when Type=Mask. The screen is gradually covered (or restored) according to the image's shading, enabling wipe or dot-break style transitions.
- Use the file picker to select an image.
- The transition proceeds in the order of gradually darkening from the white parts of the image.
Mask Softness
Specifies the blur strength at the mask boundary (0–1 recommended).
- 0: The mask image's shading is used as-is (hard edges).
- 0.5–1.0: The boundary blurs for a natural gradient-like transition.
Preview
The Preview button plays the transition being edited for real test playback. The entire flow of start -> middle -> end can be verified with the same behavior as runtime.
How it is used
| Reference source | Purpose |
|---|---|
System tab bi_transition_battle_start | Battle start effect |
System tab bi_transition_battle_end | Battle end effect |
System tab bi_transition_map_change | Map transition effect |
System tab bi_transition_reset_game | Game reset (return to title) effect |
| Change Map | Per-event transition designation |
| Start Battle | Per-event transition designation at battle start |
Common operations
New / Copy / Delete / Change ID
These operations are shared across all four sub-sections (Window / Button / Bar / Transition).
- New: Add a new design with a specified ID (only
_a-zA-Z0-9allowed). - Copy: Duplicate an existing design (ID is auto-numbered).
- Change ID: Change the ID of the selected design (note: references in-game are not auto-updated).
- Delete: Delete the selected design (with confirmation dialog).
Save
Use the Save button at the bottom of the tab, or the Save All button on the Home tab to save everything at once. The four JSON files are updated together.
Typical usage flows
Flow 1: Add a new message window design
- Open the UI tab.
- Press the New button in the Window section.
- Enter a new ID (e.g.,
window_scroll). - On the right, set Image to a scroll-style 9-patch image.
- Set Patch Margin appropriately.
- Check the appearance with Preview.
- Save.
Flow 2: Change the HP gauge to a custom image
- Open the UI tab.
- In the Bar section, press New or select the existing
hp_bar. - Set Under Image to an empty gauge frame image.
- Set Progress Image to the full gauge image.
- Save.
- In the Parameter tab, open the HP parameter and select the new bar ID in the Bar field.
- Save and launch the game to verify.
Flow 3: Make battle start use a custom wipe effect
- Open the UI tab.
- Press New in the Transition section (ID:
battle_zoom). - Set Type to Mask.
- Set Start Mask Texture to a zoom-style grayscale image.
- Set Start Time = 0.5, End Time = 0.5.
- Check with Preview, adjust Mask Softness if needed.
- Save.
- In System tab, select
battle_zoomforbi_transition_battle_start.
Flow 4: Change the common button design
- Open the UI tab.
- In the Button section, select the existing
bi_button(the default referenced by the system). - Adjust Image or Patch Margin.
- Check with Preview.
- Save.
-> Buttons on all screens are unified to the new design (applied everywhere the System tab references bi_button).
Impact on other tabs / runtime
Interaction with other tabs
- System tab references IDs from this tab (
bi_window/bi_button, etc.). - Parameter tab references bar IDs.
- Changing an ID in this tab does not auto-update references in other tabs or event content. You must manually update references.
Impact on runtime
- At game startup, the four JSON files (
window.json/button.json/bar.json/transition.json) are loaded. - At runtime, various systems reference designs defined in this tab to draw the UI.
FAQ
Q. Why do Window and Button have nearly the same properties?
Because this tool uses the same drawing method of nine-patch image + theme for both Window and Button. The implementation also uses a common UI generation helper.
Q. Can I delete an existing ID (e.g., default_1)?
Not recommended. If you delete an ID that is referenced as a default by the System tab (for example, default_1 set to bi_window), the window may not appear at game startup. Before deleting, change the reference to another ID in System tab first.
Q. Which folder are image paths picked from?
| Target | Recommended folder |
|---|---|
| Window image | data/sprites/windows/ |
| Button image | data/sprites/buttons/ |
| Bar image | data/sprites/ui/ |
| Mask image (transition) | data/sprites/ui/ or a custom folder |
Q. Where do I create themes (.tres)?
Create .tres files in the native Godot editor and place them in the project (recommended: data/themes/). This tool does not include a theme creation feature.
Q. I want to use multiple windows for different purposes
Even on the same message screen, you can use different window designs per scene (specify the design per event content in Show Window). You can mix usage like "normally wooden window, blood-red window right before a boss battle".
Q. Default properties are filled in right after creation
On new creation, initial values (sample image path, patch margins, etc.) defined in DefaultData are set automatically. Rewrite them as needed.
Q. Mask-type transition doesn't work well
- Verify the mask image is grayscale (color images may not behave as expected).
- If Start Time and End Time are 0, the transition is instant and the effect is invisible.
- If Mask Softness is too small, the boundary becomes too hard (recommended 0.3–0.7).
Related pages
- System tab — Basic preset settings for
bi_window/bi_button/menu_button/bi_transition_*, etc. - Parameter tab — Bar settings per parameter
- Show Window — Event content that displays a window in-game
- Show Selection Window — Display a selection window
- Add Button — Dynamically show buttons in-game
- Change Map — Transition can be specified
- Start Battle — Transition can be specified
- JSON data structure — File structure of
window.json/button.json/bar.json/transition.json
