Login / Registrieren
DE EN FR ES IT CZ
Zurück Nach oben

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

  • #1, by PanS 5 years ago Zitieren
    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.
  • #2, by SimonS 5 years ago Zitieren
    There's no eventhandler but you can check for game.Dialog, if there's an object the dialog is shown.
  • #3, by PanS 5 years ago Zitieren
    Thx. "if game.Dialog == emptyObject then" in MainLoop works so far. Could that become a problem somehow?
  • #4, by afrlme 5 years ago Zitieren
    No, that's what he meant. You could also use:

    if game.Dialog:isEmpty() then
  • #5, by PanS 5 years ago Zitieren
    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