How to link MUI Royale's xml file?

Discuss GUI programming with the MUI Royale plugin here
Post Reply
User avatar
r-tea
Posts: 133
Joined: Tue Feb 16, 2016 11:48 pm
Location: Zdzieszowice, Poland
Contact:

How to link MUI Royale's xml file?

Post by r-tea »

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
airsoftsoftwair
Posts: 5433
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

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

Post by airsoftsoftwair »

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

Code: Select all

mui.CreateGUI(ReadString(1))
User avatar
jPV
Posts: 603
Joined: Sat Mar 26, 2016 10:44 am
Location: RNO
Contact:

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

Post by jPV »

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
r-tea
Posts: 133
Joined: Tue Feb 16, 2016 11:48 pm
Location: Zdzieszowice, Poland
Contact:

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

Post by r-tea »

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
airsoftsoftwair
Posts: 5433
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

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

Post by airsoftsoftwair »

Code: Select all

- Fix [Doc]: ReadString() documentation didn't mention that the length argument was optional 
Post Reply