Widget Outline
See the widgets of a window as a tree, jump to their lines, and show, hide or fill them by hand.
provinceview.gui. Type Sample Text…, the pencil on that row, puts a long name in the header.The Widget Outline lists the widgets of a window as a tree, in the order of the file. It is a section of VS Code’s Explorer (Ctrl+Shift+E) named Widget Outline. When the section is folded, click its title to open it. Use it to find a widget, see why the preview shows or hides it, and change that by hand.
The tree
Section titled “The tree”While the preview is open, the outline shows the window the preview draws, the
previewed window. Without the preview, it follows the
cursor in the .gui file you edit. The window’s name stands next to the outline’s title. With no
.gui file open, it says “Open a .gui file to see the widgets of its window here.” Below that,
Open a .gui File… lists your mod’s .gui files, and Get started opens Etch’s
Get Started page.
Each row shows a widget’s name with an icon for its kind. After the name, in grey:
- its kind, such as
instantTextBoxType; - “hidden” when the preview hides it, and “not created” when the game does not create it at the preview’s screen height. Both rows are greyed out; a hidden widget has a closed eye in place of its icon, and a widget the game does not create is struck through. The row’s tooltip says why;
- “by hand” when you changed it, or “from the game” when the live game, EU4 running beside the editor, showed it differently from what the window profile says;
- for a text, the text the preview shows and where it comes from, such as “Northmarch” (generated). See Sample data.
Point at a row: a tooltip gives the widget’s path (the widgets it sits in, down to its own name), its place and size, and why it shows or not, such as the profile’s rule that hides it. Collapse All in the outline’s title bar folds the tree.
From the outline to the file and back
Section titled “From the outline to the file and back”- Click a row: the editor shows the line that defines the widget, and the preview outlines it.
- Move the cursor in the editor, or click a widget in the preview: the outline selects that widget.
Jump to a widget by name
Section titled “Jump to a widget by name”VS Code’s own tools for moving around a file know the widgets too, in every .gui file and
without the preview:
- The breadcrumbs, the path above the editor, show the widgets the cursor sits in, such as
provinceview › top_section_window › move_capitalininterface/provinceview.gui. Click one to list the widgets beside it and jump to one. - Press Ctrl+Shift+O (Go to Symbol in Editor…) and type a widget’s name: pick it to jump to it.
- VS Code’s Outline section in the Explorer shows all windows of the file, not only the previewed one.
A widget without a name shows as its kind in angle brackets, such as <iconType>. In a .gfx
file the same tools list its sprites and fonts by name, so Ctrl+Shift+O finds a
sprite such as GFX_provinceview_bg in interface/provinceview.gfx.
Show and hide widgets by hand
Section titled “Show and hide widgets by hand”In a window with a window profile, the outline has buttons at the end of each row. Point at a row to see them.
- Hide by Hand, an eye, hides a widget the preview shows.
- Show by Hand, a closed eye, shows a widget the preview hides.
- Choose by Hand, a circle, picks one of a set of widgets of which the game shows one.
Widgets of which the game shows only one at a time are grouped under a row “(one of)”. Its grey text names the set, such as a tab or a side panel. Each of them has a round button: a filled circle marks the one that shows. Choose another and the preview shows it instead, and hides the others. When the game may also show none of them, a “(none)” row lets you hide them all.
A widget the game does not create, such as a _large widget on a screen less than 814 pixels high,
is struck through and has no buttons. To draw it, change the preview resolution: see
Zoom and resolution.
Each change by hand is counted in the preview’s View ▾ button, such as “View: Own province · 2 by hand ▾”. A change that agrees with what the profile shows anyway does not count. Reset Hand Toggles in View ▾ takes them all back, with Undo in the notice it leaves, and Save as View… keeps them in your mod: see Views and window profiles.
Type a sample text
Section titled “Type a sample text”The rows of texts, edit boxes and buttons have one more button: Type Sample Text…, a pencil.
- Point at the row of a text, such as
provincename, and click the pencil. Or right-click the row and choose Type Sample Text…. - Type what the text should show and press Enter.
The preview shows your text over every other kind of sample data. To take it back, right-click the row and choose Clear Sample Text. Etch keeps typed texts for each window, also after you close VS Code.
What it doesn’t do
Section titled “What it doesn’t do”- A window without a profile has no buttons to show, hide, choose or fill widgets, unless you took a live snapshot of it in the live game. Without one, the preview draws every widget.
- Changes by hand last only until you close the preview. To keep them, save a view.
- You cannot add, move or rename widgets from the outline. Edit the file.