Is there a dialog starts/ends eventhandler or some similar?

  • #1, by PanSThursday, 11. March, 15:34 9 months ago
    I am searching in the forum and used google, but cant find anything like a dialog starts/ ends eventhandler.

    I want to fade out (parts of) my interface everytime a dialog starts and fade in when a dialog ends. Yes, I could do that everytime I start a dialog manually, but thats not the way I want to do that.

    How I could check if a dialog starts (or the Dialog Box is shown)?

    Sry, there where an answer anywhere, but I coulnd't found it.

    Newbie

    73 Posts


  • #2, by SimonSMonday, 15. March, 11:36 9 months ago
    There's no eventhandler but you can check for game.Dialog, if there's an object the dialog is shown.

    Thread Captain

    1476 Posts

  • #3, by PanSTuesday, 16. March, 11:46 9 months ago
    Thx. "if game.Dialog == emptyObject then" in MainLoop works so far. Could that become a problem somehow?

    Newbie

    73 Posts

  • #4, by afrlmeTuesday, 16. March, 11:50 9 months ago
    No, that's what he meant. You could also use:

    if game.Dialog:isEmpty() then
    1

    Imperator

    7036 Posts

  • #5, by PanSTuesday, 16. March, 13:23 9 months ago
    Thx. Works fine so far:
      if game.Dialog == emptyObject then
        if dialogStart == true then
          Interfaces.int_interactions.Visibility = 100
          --Interfaces.int_interactions.TimeToDestVisibility = 250
          --Interfaces.int_interactions.DestVisibility = 100
          dialogStart = false
          print("fadein interface - dialogend")
        end
      else
        if dialogStart == false then
          Interfaces.int_interactions.Visibility = 0
          --Interfaces.int_interactions.TimeToDestVisibility = 250
          --Interfaces.int_interactions.DestVisibility = 0
          dialogStart = true
          print("fadeout interface - dialogstart")
        end

      end
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18

    Newbie

    73 Posts

Write post