### Creating the Simplest GMUI Page - XML Source: https://github.com/godothub/gmui/blob/master/docs/1.1/README.md This snippet demonstrates how to create the most basic GMUI page by defining an empty `.gmui` file. Running the project with this file will display a blank page, highlighting GMUI's minimal setup requirement where no additional code is needed to start a UI. ```XML ``` -------------------------------- ### Navigating Between Pages with jump_to - XML/GDScript Source: https://github.com/godothub/gmui/blob/master/docs/1.3/README.md This example illustrates how to implement page navigation in GMUI. It shows a button that, when pressed, uses the 'self.jump_to' method to transition to another GMUI page specified by its file path. ```XML ``` ```GDScript func _mounted(): gmui.refs['btn'].rnode.pressed.connect( func(): self.jump_to('res://pages/page2.gmui') ) ``` -------------------------------- ### Navigating Between Pages Source: https://github.com/godothub/gmui/blob/master/docs/1.2/README.ZH.md Shows how to perform page navigation using the `jump_to` method. The example demonstrates connecting a button's `pressed` signal to a function that calls `self.jump_to` with the target .gmui file path, enabling seamless page transitions. ```XML ``` -------------------------------- ### Building a Registration/Login UI with GMUI Source: https://github.com/godothub/gmui/blob/master/docs/1.2/README.ZH.md Illustrates how to construct a basic registration and login interface using GMUI's built-in components like Row, Column, Label, LineEdit, and Button. This example showcases the declarative UI definition using an XML-like syntax. ```XML ``` -------------------------------- ### Navigating Between Pages in GMUI Source: https://github.com/godothub/gmui/blob/master/README.md This example illustrates how to implement page navigation in GMUI. A button's `pressed` signal is connected to a function that calls `self.jump_to`, directing the application to a specified `.gmui` file path within the pages directory. ```XML ``` -------------------------------- ### Simple Two-Way Data Binding for LineEdit Source: https://github.com/godothub/gmui/blob/master/docs/1.3/README.ZH.md A concise example demonstrating two-way data binding for a LineEdit component using the 'g-model' directive and a reactive data variable defined in the script. ```XML ``` ```GDScript @onready var data = await reactive({'text': 'new text'}) ``` -------------------------------- ### Accessing Component Instances by Reference in GMUI Source: https://github.com/godothub/gmui/blob/master/README.md This example shows how to declare a `ref` on a custom component (`UsernameInput`) and then access its internal virtual nodes by chaining `refs` calls. It requires importing the custom component definition. ```XML ``` -------------------------------- ### List Rendering with g-for on Components - XML/GDScript Source: https://github.com/godothub/gmui/blob/master/docs/1.3/README.md This example extends list rendering to custom components. It uses 'g-for' to iterate over a reactive array ('arr') and instantiate a 'Component' for each item, passing the item as a property. ```XML ``` ```GDScript @import('Component', 'res://components/component.gmui') @onready var data = await reactive({'arr': [1,2,3,4]}) ``` -------------------------------- ### Using Named Slots in Components - XML/GDScript Source: https://github.com/godothub/gmui/blob/master/docs/1.3/README.md This example illustrates how to use components with multiple named slots. The '