Aller au contenu

Photo

DisplayMessageBox function question


  • Veuillez vous connecter pour répondre
5 réponses à ce sujet

#1
GhostOfGod

GhostOfGod
  • Members
  • 863 messages
I was just wondering about the parameter for sScreenName. The only option I've been able to find is the default SCREEN_MESSAGEBOX_DEFAULT. So I was just wondering if there are any more options for this and if so where are they listed or located.

Thanks in advance for any help.

#2
Lance Botelle

Lance Botelle
  • Members
  • 1 480 messages

GhostOfGod wrote...

I was just wondering about the parameter for sScreenName. The only option I've been able to find is the default SCREEN_MESSAGEBOX_DEFAULT. So I was just wondering if there are any more options for this and if so where are they listed or located.

Thanks in advance for any help.


Hi GoG,

The parameter sScreenName can take the name of *any* screen already defined in any XML code written for a GUI. Every GUI is defined first by its Screen Name and then extra code is added to work with the screen. (By the way, each bit of extra code can also be given a name to work with.)

Open up any XML file and you will see the screen name defined at the top of the code.

Check out my tutorial to get a beter understanding of XML coding.

Lance.

Modifié par Lance Botelle, 29 mars 2011 - 01:43 .


#3
GhostOfGod

GhostOfGod
  • Members
  • 863 messages
Thanks for the reply Lance. I will check out that tut. I guess what I was just wondering though was if there were any more NWN2 ones already listed somewhere that I could work with or check out. Or was this the only one?
Thanks again.

#4
Lance Botelle

Lance Botelle
  • Members
  • 1 480 messages

GhostOfGod wrote...

Thanks for the reply Lance. I will check out that tut. I guess what I was just wondering though was if there were any more NWN2 ones already listed somewhere that I could work with or check out. Or was this the only one?
Thanks again.


Hi GoG,

A lot of XML files can be found in your C:\\Program Files (x86)\\Atari\\Neverwinter Nights 2\\UI\\default or equivilent folder. There are dozens there. Every XML file will have a screen name.

Lance.

#5
GhostOfGod

GhostOfGod
  • Members
  • 863 messages
Ok thanks Lance. Wasn't sure If I'd have to delve into those XMLs since it looked like SCREEN_MESSAGEBOX_DEFAULT was a constant. I figured if it was, then there might be a list of constants somewhere in a script or the globals or what not. Thanks again.

#6
Lance Botelle

Lance Botelle
  • Members
  • 1 480 messages

GhostOfGod wrote...

Ok thanks Lance. Wasn't sure If I'd have to delve into those XMLs since it looked like SCREEN_MESSAGEBOX_DEFAULT was a constant. I figured if it was, then there might be a list of constants somewhere in a script or the globals or what not. Thanks again.


Hi GoG,

That particular name is used inside two XML files as far as I can see: messageboxdefault.xml and messageboxmotd.xml. The reason it is one of the more obvious names mentioned in the toolset is because Obsidian have created a generic message box facility that a builder can use in a number of ways that refers to this particular XML script. i.e. They are scriptable by default, whereas many (all) the others are not.

As I say, this will make more sense working through the tutorial and opening up a few of the other XML files. Image IPB

And when you end up making your own XML files, the screenname can be anything you like. E.g. GOG_GHOST_OF_GOD, which you would then refer to in your own scripts to work with that XML screen.

Lance.