How to link MUI Royale's xml file?

Discuss GUI programming with the MUI Royale plugin here
Post Reply
User avatar
r-tea
Posts: 62
Joined: Wed Feb 17, 2016 12:48 am
Location: Zdzieszowice, Poland
Contact:

How to link MUI Royale's xml file?

Post by 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
airsoftsoftwair
Posts: 2483
Joined: Fri Feb 12, 2010 3:33 pm
Location: Germany
Contact:

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

Post by 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
jPV
Posts: 135
Joined: Sat Mar 26, 2016 11:44 am
Location: RNO
Contact:

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

Post by 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
r-tea
Posts: 62
Joined: Wed Feb 17, 2016 12:48 am
Location: Zdzieszowice, Poland
Contact:

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

Post by 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
airsoftsoftwair
Posts: 2483
Joined: Fri Feb 12, 2010 3:33 pm
Location: Germany
Contact:

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

Post by airsoftsoftwair » Sat Jun 03, 2017 12:03 am

Code: Select all

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

Post Reply