How to link MUI Royale's xml file?

Discuss GUI programming with the MUI Royale plugin here

How to link MUI Royale's xml file?

Postby r-tea » Thu Jun 01, 2017 7:59 pm

About a week ago I finally got the Hollywood's CD into my trembling hands. Last night I played a while with code using MUI Royale plugin. I cut the Anim example of things I don't need for now.
I permanently linked the MUIRoyale plugin
Code: Select all
@REQUIRE "MUIRoyale", {Link = True}


Compiling and linking process went fine, but when I try to run the executable it yells for its gui xml file. I assumed it's linked by default but it's not.
Then I read about @FILE command and I did like this:
Code: Select all
@FILE 1, "hw_display.xml"

Again compiling and linking went fine but the executable still yells for xml.
How to link it permanently?
User avatar
r-tea
 
Posts: 40
Joined: Wed Feb 17, 2016 12:48 am
Location: Poland

Re: How to link MUI Royale's xml file?

Postby airsoftsoftwair » Thu Jun 01, 2017 11:51 pm

You need to create the GUI like this if you use @FILE:

Code: Select all
mui.CreateGUI(ReadString(1))
User avatar
airsoftsoftwair
 
Posts: 2098
Joined: Fri Feb 12, 2010 3:33 pm
Location: Germany

Re: How to link MUI Royale's xml file?

Postby jPV » Fri Jun 02, 2017 8:20 am

airsoftsoftwair wrote:You need to create the GUI like this if you use @FILE:

Code: Select all
mui.CreateGUI(ReadString(1))


BTW. according the documentation ReadString would require the length input too, so I've always put length with FileLength(1) there, but good to know it can be used without too :)
User avatar
jPV
 
Posts: 66
Joined: Sat Mar 26, 2016 11:44 am
Location: RNO

Re: How to link MUI Royale's xml file?

Postby r-tea » Fri Jun 02, 2017 9:41 am

jPV wrote:BTW. according the documentation ReadString would require the length input too, so I've always put length with FileLength(1) there, but good to know it can be used without too :)


Indeed. Docs state it's not optional.
User avatar
r-tea
 
Posts: 40
Joined: Wed Feb 17, 2016 12:48 am
Location: Poland

Re: How to link MUI Royale's xml file?

Postby airsoftsoftwair » Sat Jun 03, 2017 12:03 am

Code: Select all
- Fix [Doc]: ReadString() documentation didn't mention that the length argument was optional
User avatar
airsoftsoftwair
 
Posts: 2098
Joined: Fri Feb 12, 2010 3:33 pm
Location: Germany


Return to MUI Royale

Who is online

Users browsing this forum: No registered users and 1 guest