Search the Community
Showing results for tags 'animate dx'.
-
I was scripting a radio system but there's no way to let me move the text, the animation of the rectangle is done but it doesn't make any effect with the text. Also I was trying to show all this for a period of 5 seconds, but when I added the timer, the rectangle and the text only appear but not dissapear, can someone help me? local sX, sY = guiGetScreenSize() local open = false local radio = playSound("http://www.energy981.com/playlist/Energy98_128WM.asx") setSoundVolume(radio, 0) function drawRadio() ls,rs = getSoundLevelData(radio) meta = getSoundMetaTags(radio); title = meta.stream_title or "Unknown" longTitle = dxGetTextWidth(title, (1/1920)*sX, "default-bold", false) dxDrawCircle ((1880/1920)*sX, (125/1080)*sY, 20, 0, 360, tocolor(9, 27, 79, 200), tocolor(9, 27, 79, 200), 32, 1, false) dxDrawCircle ((1880/1920)*sX, (125/1080)*sY, 100*((ls+rs)/230768), 0, 360, tocolor(0, 225, 255, 50), tocolor(0, 225, 255, 25), 32, 1, false) dxDrawImage((1868/1920)*sX, (113/1080)*sY, (24/1920)*sX, (23/1080)*sY, "radio.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) end function knowRadioSong() start = getTickCount() addEventHandler("onClientRender", root, outputRadioSongName) end addCommandHandler("radio", knowRadioSong) function outputRadioSongName() pos = ((1875-longTitle)/1920)*sX setTimer ( function() pos = (1925/1920)*sX end, 5000, 1) local now = getTickCount() local elapsedTime = now - start local endTime = start + 1000 local duration = endTime - start local progress = elapsedTime / duration local x, y, z = interpolateBetween(pos, (160/1080)*sY, 0, pos, (160/1080)*sY, 0, progress, "OutBack") local x1, y1, z1 = interpolateBetween((0/1920)*sX, (-365/1080)*sY, 0, (-35/1920)*sX, (-365/1080)*sY, 0, progress, "OutBack") dxDrawRoundedRectangle(x, y, ((15+longTitle)/1920)*sX, (30/1080)*sY, tocolor(255, 255, 255, 200), tocolor(255, 255, 255, 200), false) dxDrawText(title, (1848/1920)*sX, (159/1080)*sY, (1883/1920)*sX, (190/1080)*sY, tocolor(0, 0, 0, 255), (1/1920)*sX, "default-bold", "right", "center", false, false, false, false, false) end function openRadio() if open == false then open = true addEventHandler("onClientRender", root, drawRadio) setSoundVolume(radio, 1) else open = false removeEventHandler("onClientRender", root, drawRadio) removeEventHandler("onClientRender", root, outputRadioSongName) setSoundVolume(radio, 0) end end bindKey("m", "down", openRadio)
-
اتحدى جميع المبرمجين العرب في صنع كود فكرة كتالي الكود عبارة عن animate Dx فكرة الكود -- عند وضع مؤشر الماوس على زر الدي اكس يقوم بتأثير عليه و بزيد حجمه لاسفل و عند مغادرة المؤشر زر الدي اكس يقوم برجوع الزر كما هو من اول
- 13 replies
-
- السلام عليكم و رحمة والله و بركاتة
- animate dx
- (and 2 more)