Tessalator Posted October 12, 2022 Share Posted October 12, 2022 (edited) Is it possible to create a UserInterface from a string? The constructor `UserInterface ui = new UserInterface(gui, "Gui/Hud.ui");` takes a path to a .ui file. I would like to template some things using raw string literals interface Gui { UserInterface Create(string hName, string vName) => new UserInterface(gui, $$""" <?xml version="1.0" encoding="utf-8"?> <ui version="1.00"> <hbox name="{{hName}}" width="1920" height="1080"> <vbox name="{{vName}}" height="1080" width="100" align="left"> </vBox> </hBox> </ui> """); } Edited October 12, 2022 by Tessalator Link to comment
karpych11 Posted October 13, 2022 Share Posted October 13, 2022 Hello. No, currently it is not possible to create a user interface from a string. Creation is only available via .ui files. Link to comment
Recommended Posts