function TestFrameEvent takes nothing returns nothing
//call BJDebugMsg("TestFrameEvent")
//call BJDebugMsg("Player: "+GetPlayerName(GetTriggerPlayer()))
if BlzGetTriggerFrameEvent() ==FRAMEEVENT_CONTROL_CLICK then
call BJDebugMsg("FRAMEEVENT_CONTROL_CLICK")
elseif BlzGetTriggerFrameEvent() == FRAMEEVENT_MOUSE_ENTER then
call BJDebugMsg("FRAMEEVENT_MOUSE_ENTER")
elseif BlzGetTriggerFrameEvent() == FRAMEEVENT_MOUSE_LEAVE then
call BJDebugMsg("FRAMEEVENT_MOUSE_LEAVE")
endif
endfunction
function TestClickableButton takes nothing returns nothing
local trigger trig = CreateTrigger()
local framehandle mainbutton = BlzCreateFrame("ScoreScreenBottomButtonTemplate", BlzGetOriginFrame(ORIGIN_FRAME_GAME_UI,0), 0, 0)
local framehandle imgFrame = BlzGetFrameByName("ScoreScreenButtonBackdrop", 0)
local framehandle tooltipBox = BlzCreateFrame("ListBoxWar3", mainbutton, 0, 0)
local framehandle tooltip = BlzCreateFrameByType("TEXT", "StandardInfoTextTemplate", tooltipBox, "StandardInfoTextTemplate", 0)
call BlzFrameSetSize(mainbutton, 0.04, 0.04)
call BlzFrameSetSize(tooltipBox, 0.3, 0.1)
call BlzFrameSetSize(tooltip, 0.28, 0.08)//tooltip-Text is smaller than the box, so it wont touch the border.
call BlzFrameSetTexture(imgFrame, "ReplaceableTextures\\CommandButtons\\BTNPeasant.blp", 0, true) //set the image of the imgFrame, with 0 the texture is streched with 1 the frame is filled with that texture.
call BlzFrameSetAbsPoint(mainbutton, FRAMEPOINT_TOPLEFT, 0.4, 0.3) //positionate button on the screen
call BlzFrameSetPoint(tooltip, FRAMEPOINT_CENTER, tooltipBox, FRAMEPOINT_CENTER, 0.0, 0.0) //place tooltip into tooltipBox
call BlzFrameSetPoint(tooltipBox, FRAMEPOINT_BOTTOM, mainbutton, FRAMEPOINT_TOP, 0.0, 0.0) //place tooltipBox with its bottom to the mainButtons TOP. tooltipBox will be over the mainbutton
call BlzFrameSetTooltip(mainbutton, tooltipBox) //show tooltipBox only when mainbutton is hovered with the mouse.
call BlzFrameSetText(tooltip, "Sound\\Music\\mp3Music\\Credits.mp3|nSound\\Music\\mp3Music\\PH.mp3|n|cffffcc00Sound\\Music\\mp3Music\\War2IntroMusic.mp3") //text of the tooltip
call TriggerAddAction(trig, function TestFrameEvent)
call BlzTriggerRegisterFrameEvent(trig, fh, FRAMEEVENT_CONTROL_CLICK)
call BlzTriggerRegisterFrameEvent(trig, fh, FRAMEEVENT_MOUSE_ENTER)
call BlzTriggerRegisterFrameEvent(trig, fh, FRAMEEVENT_MOUSE_LEAVE)
endfunction
У меня похожие баги появлялись в JNGP после копирования кусков ланда. Решал через
После регулировки, если можно свободно повышать/понижать уровень уклона нужно ручками всё править. Можете прикрепить карту, попробую зафиксить. Желательно без триггеров ибо последний патч.
» WarCraft 3 / Как с помощью фрэймов отобразить модель героя?
» WarCraft 3 / Как закрепить плавающий текст вверху экрана?
» WarCraft 3 / Как закрепить плавающий текст вверху экрана?
» WarCraft 3 / Как закрепить плавающий текст вверху экрана?
» WarCraft 3 / Как закрепить плавающий текст вверху экрана?
» WarCraft 3 / WC3 Gothic User Interface Widescreen
» WarCraft 3 / проблема с ландшафтом
» WarCraft 3 / как разбить фигуры на прямоугольники?
Ред. nazarpunk
» WarCraft 3 / Как закрепить плавающий текст вверху экрана?
» WarCraft 3 / как разбить фигуры на прямоугольники?
» WarCraft 3 / Как отловить срабатывание пассивки
» WarCraft 3 / как разбить фигуры на прямоугольники?
» WarCraft 3 / проблема с ландшафтом
» WarCraft 3 / как разбить фигуры на прямоугольники?
Ред. nazarpunk
» WarCraft 3 / Как с помощью фрэймов отобразить модель героя?
» WarCraft 3 / Как в кинематике спрятать юнитов кроме героя
» The Witcher new Empires / The Witcher new Empires
» WarCraft 3 / Неужели триггерно нельзя удалять и двигать декорации вида камни?
» The Witcher new Empires / The Witcher new Empires
» WarCraft 3 / Использования юнита как снаряд
Ред. nazarpunk
» WarCraft 3 / Использования юнита как снаряд
» WarCraft 3 / Использования юнита как снаряд
» Love2D / Lua за 15 минут
Ред. nazarpunk
» Love2D / Lua за 15 минут
» Love2D / Lua за 15 минут