Skip to content

Dialogue Box Size With/Without Portrait

joshuar9476joshuar9476 Member Posts: 55
Id there a way in the UI.menu to make the dialogue boxes different sizes if there is a portrait or not? In other words can it be 600 px wide when there is no portrait for the NPC talking vs. 400 px wide when there is a portrait?

Comments

  • lefreutlefreut Member Posts: 1,462
    The portrait name is stored in the variable worldNPCDialogPortrait. You can check the content of this variable to know if there is a portrait or not.

    The easiest way to do what you want is probably to duplicate the dialog box code and show only the good one.

    You can use this on the UI element for when there is a portrait:
    enabled "worldNPCDialogPortrait ~= nil and worldNPCDialogPortrait ~= '' and worldNPCDialogPortrait ~= 'NONE'"

    And this when there is none:
    enabled "worldNPCDialogPortrait == nil or worldNPCDialogPortrait == '' or worldNPCDialogPortrait == 'NONE'"
  • joshuar9476joshuar9476 Member Posts: 55
    Thank you very much. It took a lot of trial and error ... lots of crashing ... but I managed to use those lines where needed so that the dialog boxes are different with and without portraits.
  • joshuar9476joshuar9476 Member Posts: 55
    Another more question if I may?

    What do I use to hide a label or button once NPC2 has joined? I tried messing around with the enabled "Infinity GetNumCharacters() > 1" string but can't get that to work. I want the element there if solo, but to "move" (disappear with a clone element in a new spot) once NPC2 joins.
  • lefreutlefreut Member Posts: 1,462
    Infinity_GetNumCharacters() should work. It's used in the sidebar for the portrait for example.
Sign In or Register to comment.