Hello guys, im want to revive some of my maps where i started years ago working on frames and buttons.
But now with the new patch, half of things arent working or buggy.
Originaly i was trying to use the gluebuttons and click events/enter mouse events with invisible buttons and backdrops with texture for simulate an icon, and everything was working fine. But now are glitchs like, clicking the button the mouse instant position in weird zones of the screen for 1 sec, or infinity loop clicking with enter Mouse event.
1) So reading a few posts, seems that simplybuttons are not affected by those glitchs. But im struggling finding a way to change the texture using a variable and make it dinamic, and not static. i guess i need to use child parent but i dont know how or if im missing something. I was trying using backdrop behind the button and is working fine, but that way the glowing inherit struggles with position or something and it doesnt work. its not seeable.
@Tasyen
2) how can i detect which button was clicked? does this codes afect sync in multiplayer? should i use it only in 1 player games?
3) Change Smooth Camera Factor doesnt work neither?
This is an example, please help me with GUI or JASS:
But now with the new patch, half of things arent working or buggy.
Originaly i was trying to use the gluebuttons and click events/enter mouse events with invisible buttons and backdrops with texture for simulate an icon, and everything was working fine. But now are glitchs like, clicking the button the mouse instant position in weird zones of the screen for 1 sec, or infinity loop clicking with enter Mouse event.
1) So reading a few posts, seems that simplybuttons are not affected by those glitchs. But im struggling finding a way to change the texture using a variable and make it dinamic, and not static. i guess i need to use child parent but i dont know how or if im missing something. I was trying using backdrop behind the button and is working fine, but that way the glowing inherit struggles with position or something and it doesnt work. its not seeable.
@Tasyen
2) how can i detect which button was clicked? does this codes afect sync in multiplayer? should i use it only in 1 player games?
3) Change Smooth Camera Factor doesnt work neither?
This is an example, please help me with GUI or JASS:
JASS:
globals
framehandle Button01 = null
framehandle Button01Dialog = null
framehandle BackdropButton01 = null
trigger TriggerButton01 = null
trigger TriggerButton02 = null
endglobals
library REFORGEDUIMAKER initializer init
private function Button01Func takes nothing returns nothing
call BlzLoadTOCFile("war3mapImported\\MySimpleButton.toc")
call BlzLoadTOCFile("war3mapImported\\MyStatusBar.toc")
call BlzFrameSetEnable(Button01, false)
call BlzFrameSetEnable(Button01, true)
call BJDebugMsg("Click")
call PlaySoundBJ( gg_snd_MouseClick1 )
endfunction
private function Button02Func takes nothing returns nothing
call StopSoundBJ( gg_snd_MouseClick1, false )
call PlaySoundBJ( gg_snd_MouseClick1 )
endfunction
function init takes nothing returns nothing
call BlzLoadTOCFile("war3mapImported\\MySimpleButton.toc")
call BlzLoadTOCFile("war3mapImported\\MyStatusBar.toc")
set Button01 = BlzCreateSimpleFrame("MySimpleButtonGlowing", BlzGetOriginFrame(ORIGIN_FRAME_GAME_UI, 0), 0)
set BackdropButton01 = BlzCreateFrameByType("BACKDROP", "BackdropButton01", BlzGetOriginFrame(ORIGIN_FRAME_GAME_UI, 0), "", 0)
call BlzFrameSetAllPoints(BackdropButton01, Button01)
//set BackdropButton01 = BlzFrameGetChild(Button01, 0)
//call BlzFrameSetTexture(BlzGetFrameByName("MySimpleButtonTexture", 0), "ReplaceableTextures\\CommandButtons\\BTNHeroPaladin", 0, true)
call BlzFrameSetTexture(BackdropButton01, "ReplaceableTextures\\CommandButtons\\BTNSelectHeroOn", 0, true)
call BlzFrameSetAbsPoint(BackdropButton01, FRAMEPOINT_CENTER, 0.4, 0.3)
call BlzFrameSetAbsPoint(Button01, FRAMEPOINT_CENTER, 0.4, 0.3)
call BlzFrameSetSize(BackdropButton01, 0.025, 0.025)
call BlzFrameSetSize(Button01, 0.025, 0.025)
set TriggerButton01 = CreateTrigger()
call BlzTriggerRegisterFrameEvent(TriggerButton01, Button01, FRAMEEVENT_CONTROL_CLICK)
call TriggerAddAction(TriggerButton01, function Button01Func)
set TriggerButton02 = CreateTrigger()
call BlzTriggerRegisterFrameEvent(TriggerButton02, Button01, FRAMEEVENT_MOUSE_ENTER)
call TriggerAddAction(TriggerButton02, function Button02Func)
endfunction
endlibrary
Last edited: