HyUI icon indicating copy to clipboard operation
HyUI copied to clipboard

Loading a .ui file does not load the objects

Open ToufouMaster opened this issue 10 months ago • 2 comments

Or more precisely, i can't get the object by ids when loading the ui from .ui file but when loaded from html string it does add them.

I'd like to load my .ui file and still handle events by using objects ids

2026-01-30 00:00:10.1757|WARN||ERROR - java.lang.IllegalArgumentException: No element found with ID '#StatsButton'.

$C = "../Common.ui"; Group { LayoutMode: Top; Background: (PatchStyle(TexturePath: "Book.png")); Anchor: (Width: 720, Height: 584); Group #StatisticsButton { LayoutMode: Full; Background: (PatchStyle(TexturePath: "Stats.png")); } Button #StatsButton { Anchor: (Width: 128, Height: 128, Left: 30, Top: 30, Bottom: 8); Background: (PatchStyle(TexturePath: "Stats.png")); TooltipText: "Statistiques"; Style: ( Hovered: (Background: (PatchStyle(TexturePath: "StatsHovered.png"))), Pressed: (Background: (PatchStyle(TexturePath: "StatsPressed.png"))) ); Label { Anchor: (Width: 128, Left: 0, Top: 125); Style: (TextColor: #000000); Text: "Statistiques"; } } }

ToufouMaster avatar Jan 29 '26 23:01 ToufouMaster

Correct.

This is not a feature of HyUI until the UI parser is built and ready for general use.

Elliesaur avatar Jan 30 '26 01:01 Elliesaur

Added in 0.9.0

Elliesaur avatar Feb 24 '26 03:02 Elliesaur