Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Axis & Allies 1942 Online is now available in Early Access! Buy it on Steam. The FAQ is available.
New Premium Module: Tyrants of the Moonsea! Read More
Attention, new and old users! Please read the new rules of conduct for the forums, and we hope you enjoy your stay!

Dialogue Box Size With/Without Portrait

joshuar9476joshuar9476 Member Posts: 52
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,422
    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'"

    JuliusBorisovKilivitzjoshuar9476
  • joshuar9476joshuar9476 Member Posts: 52
    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: 52
    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,422
    Infinity_GetNumCharacters() should work. It's used in the sidebar for the portrait for example.

Sign In or Register to comment.