refactor of modal dialogs based on changes in MateUnity, added content check in NGUILayoutFlow