auxText = g_Text.interruption auxYesText = g_Text.continue auxNoText = g_Text.exit function dialogText(_bForeGround) local fontStr = "fontTRN_bg.fnt" local layerFlag = LF_PANELS+3 local bgfgname = "bgDialogText" if _bForeGround then fontStr = "fontTRN_fg.fnt" layerFlag = LF_PANELS + 4 bgfgname = "fgDialogText" end log(bgfgname .. " _ " .. fontStr) --return { name = bgfgname , scale = 0.13, font = fontStr, overlap = g_TextOverlap, text = auxText, layer = LF_PANELS+2, align = E_ALIGN_LEFT } return { name = bgfgname , scale = math.min(13.0/string.len(auxText), 1.0)*0.125, font = fontStr, overlap = g_TextOverlap, text = auxText, align = E_ALIGN_CENTER, layer = layerFlag } end function yesText() local fontStr = "fontTRN_fg.fnt" return { name = "yesText", scale = 0.09, font = fontStr, overlap = g_TextOverlap, text = auxYesText, align = E_ALIGN_CENTER } end function noText() local fontStr = "fontTRN_fg.fnt" return { name = "noText", scale = 0.09, font = fontStr, overlap = g_TextOverlap, text = auxNoText, align = E_ALIGN_CENTER } end function launchMsg(_text, _yesText, _noText, _yesScript, _noScript) if (_text~=nil) then auxText = _text auxYesText = _yesText auxNoText = _noText end g_yesScript = _yesScript g_noScript = _noScript if g_yesScript == nil then g_yesScript = "" end if g_noScript == nil then g_noScript = "" end --cargar el background semitransparente CreateActor("ActorGeom", { name = "BackLayer", model = "menu/fade_to_black.mesh", camera = "default", layer = LF_PANELS+3 }) --cargar anims.. SetActorAnim("BackLayer", { anim = "menu/fade_black_from_0_to_06.anm", loop = false, }) --cargar el dialogo CreateActor("ActorGeom", { name ="MsgBox", model = "menu/yes_no_dialog.mesh", camera = "default", layer = LF_PANELS+3, touchable = true }) --cargar anims.. SetActorAnim("MsgBox", { anim = "menu/yes_no_dialog_start.anm", loop = false, velocity = 1.5, }) end