[T]|O|[P]George Posted July 18, 2018 Share Posted July 18, 2018 الحين مسوي لوحة دي اكس و المفروض يوم احط الماوس يفعل الحدث المشكلة اول واحدة بس تنفع ثاني واحدة لا if (isCursorOverText(gw * 0.3623, gh * 0.2604, gw * 0.6377, gh * 0.2995)) then dxDrawText("# Shop System #", gw * 0.3623, gh * 0.2604, gw * 0.6377, gh * 0.2995, tocolor(255, 0, 0, 255), 2, "default-bold", "center", "center", false, false, true, false, false) else dxDrawText("# Shop System #", gw * 0.3623, gh * 0.2604, gw * 0.6377, gh * 0.2995, tocolor(0, 0, 0, 255), 1.50, "default-bold", "center", "center", false, false, true, false, false) end ------------------------------------------------------------------------------------------------------------------------- if (isCursorOverText(gw * 0.3623, gh * 0.3763, gw * 0.6377, gh * 0.2995)) then dxDrawText("# VIP System #", gw * 0.3623, gh * 0.3763, gw * 0.6377, gh * 0.2995, tocolor(255, 0, 0, 255), 2, "default-bold", "center", "center", false, false, true, false, false) else dxDrawText("# VIP System #", gw * 0.3623, gh * 0.3763, gw * 0.6377, gh * 0.2995, tocolor(0, 0, 0, 255), 1.50, "default-bold", "center", "center", false, false, true, false, false) end end الي يعرف الحل يكرمنا بحله Link to comment
+1HidroNex Posted July 18, 2018 Share Posted July 18, 2018 (edited) 3 hours ago, [T]|O|[P]George said: الحين مسوي لوحة دي اكس و المفروض يوم احط الماوس يفعل الحدث المشكلة اول واحدة بس تنفع ثاني واحدة لا if (isCursorOverText(gw * 0.3623, gh * 0.2604, gw * 0.6377, gh * 0.2995)) then dxDrawText("# Shop System #", gw * 0.3623, gh * 0.2604, gw * 0.6377, gh * 0.2995, tocolor(255, 0, 0, 255), 2, "default-bold", "center", "center", false, false, true, false, false) else dxDrawText("# Shop System #", gw * 0.3623, gh * 0.2604, gw * 0.6377, gh * 0.2995, tocolor(0, 0, 0, 255), 1.50, "default-bold", "center", "center", false, false, true, false, false) end ------------------------------------------------------------------------------------------------------------------------- if (isCursorOverText(gw * 0.3623, gh * 0.3763, gw * 0.6377, gh * 0.2995)) then dxDrawText("# VIP System #", gw * 0.3623, gh * 0.3763, gw * 0.6377, gh * 0.2995, tocolor(255, 0, 0, 255), 2, "default-bold", "center", "center", false, false, true, false, false) else dxDrawText("# VIP System #", gw * 0.3623, gh * 0.3763, gw * 0.6377, gh * 0.2995, tocolor(0, 0, 0, 255), 1.50, "default-bold", "center", "center", false, false, true, false, false) end end الي يعرف الحل يكرمنا بحله عندك end زايده في الكود الثاني على حسب ما اشوف لاني اساعدك من الجوال End 1 = if End 2 =? Edited July 18, 2018 by +1HidroNex Link to comment
[T]|O|[P]George Posted July 18, 2018 Author Share Posted July 18, 2018 7 minutes ago, +1HidroNex said: عندك end زايده في الكود الثاني على حسب ما اشوف لاني اساعدك من الجوال End 1 = if End 2 =? حق الفنكشن الاصلي بس ما نسخته Link to comment
MrBiG Posted July 18, 2018 Share Posted July 18, 2018 13 minutes ago, +1HidroNex said: isCursorOverText اطرح اكواد الوظيفة ذي Link to comment
[T]|O|[P]George Posted July 18, 2018 Author Share Posted July 18, 2018 3 minutes ago, Debo15 said: اطرح اكواد الوظيفة ذي function isMouseInPosition ( x, y, width, height ) if ( not isCursorShowing( ) ) then return false end local sx, sy = guiGetScreenSize ( ) local cx, cy = getCursorPosition ( ) local cx, cy = ( cx * sx ), ( cy * sy ) if ( cx >= x and cx <= x + width ) and ( cy >= y and cy <= y + height ) then return true else return false end end -- Modified version for DX Text function isCursorOverText(posX, posY, sizeX, sizeY) if(isCursorShowing()) then local cX, cY = getCursorPosition() local screenWidth, screenHeight = guiGetScreenSize() local cX, cY = (cX*screenWidth), (cY*screenHeight) if(cX >= posX and cX <= posX+(sizeX - posX)) and (cY >= posY and cY <= posY+(sizeY - posY)) then return true else return false end else return false end end isCursorOverText(posX, posY, sizeX, sizeY) Link to comment
MrBiG Posted July 18, 2018 Share Posted July 18, 2018 1 minute ago, [T]|O|[P]George said: --#Usefull function function isMouseInPosition ( x, y, width, height ) if ( not isCursorShowing( ) ) then return false end local sx, sy = guiGetScreenSize ( ) local cx, cy = getCursorPosition ( ) local cx, cy = ( cx * sx ), ( cy * sy ) if ( cx >= x and cx <= x + width ) and ( cy >= y and cy <= y + height ) then return true else return false end end --# Variables local gw , gh = guiGetScreenSize ( ) --[[Your Code Down ]]-- if ( isMouseInPosition ( gw * 0.3623, gh * 0.2604, gw * 0.6377, gh * 0.2995 ) ) then dxDrawText ( "# Shop System #", gw * 0.3623, gh * 0.2604, gw * 0.6377, gh * 0.2995, tocolor(255, 0, 0, 255), 2, "default-bold", "center", "center", false, false, true, false, false ) else dxDrawText ( "# Shop System #", gw * 0.3623, gh * 0.2604, gw * 0.6377, gh * 0.2995, tocolor(0, 0, 0, 255), 1.50, "default-bold", "center", "center", false, false, true, false, false ) end if ( isMouseInPosition ( gw * 0.3623, gh * 0.3763, gw * 0.6377, gh * 0.2995 ) ) then dxDrawText ( "# VIP System #", gw * 0.3623, gh * 0.3763, gw * 0.6377, gh * 0.2995, tocolor(255, 0, 0, 255), 2, "default-bold", "center", "center", false, false, true, false, false ) else dxDrawText ( "# VIP System #", gw * 0.3623, gh * 0.3763, gw * 0.6377, gh * 0.2995, tocolor(0, 0, 0, 255), 1.50, "default-bold", "center", "center", false, false, true, false, false ) end end Link to comment
[T]|O|[P]George Posted July 18, 2018 Author Share Posted July 18, 2018 5 minutes ago, Debo15 said: --#Usefull function function isMouseInPosition ( x, y, width, height ) if ( not isCursorShowing( ) ) then return false end local sx, sy = guiGetScreenSize ( ) local cx, cy = getCursorPosition ( ) local cx, cy = ( cx * sx ), ( cy * sy ) if ( cx >= x and cx <= x + width ) and ( cy >= y and cy <= y + height ) then return true else return false end end --# Variables local gw , gh = guiGetScreenSize ( ) --[[Your Code Down ]]-- if ( isMouseInPosition ( gw * 0.3623, gh * 0.2604, gw * 0.6377, gh * 0.2995 ) ) then dxDrawText ( "# Shop System #", gw * 0.3623, gh * 0.2604, gw * 0.6377, gh * 0.2995, tocolor(255, 0, 0, 255), 2, "default-bold", "center", "center", false, false, true, false, false ) else dxDrawText ( "# Shop System #", gw * 0.3623, gh * 0.2604, gw * 0.6377, gh * 0.2995, tocolor(0, 0, 0, 255), 1.50, "default-bold", "center", "center", false, false, true, false, false ) end if ( isMouseInPosition ( gw * 0.3623, gh * 0.3763, gw * 0.6377, gh * 0.2995 ) ) then dxDrawText ( "# VIP System #", gw * 0.3623, gh * 0.3763, gw * 0.6377, gh * 0.2995, tocolor(255, 0, 0, 255), 2, "default-bold", "center", "center", false, false, true, false, false ) else dxDrawText ( "# VIP System #", gw * 0.3623, gh * 0.3763, gw * 0.6377, gh * 0.2995, tocolor(0, 0, 0, 255), 1.50, "default-bold", "center", "center", false, false, true, false, false ) end end لو استعملت ذا isMouseInPosition ( x, y, width, height ) احداثيات الكلام ما تيجي صحيحة Link to comment
MrBiG Posted July 18, 2018 Share Posted July 18, 2018 function isMouseInPosition ( x, y, width, height ) if ( not isCursorShowing( ) ) then return false end local sx, sy = guiGetScreenSize ( ) local cx, cy = getCursorPosition ( ) local cx, cy = ( cx * sx ), ( cy * sy ) if ( ( cx >= x and cx <= ( ( width - x ) + x ) ) and ( cy >= y and cy <= ( ( height - y ) + y ) ) ) then return true else return false end end جرب هذا 1 Link to comment
[T]|O|[P]George Posted July 18, 2018 Author Share Posted July 18, 2018 10 minutes ago, Debo15 said: function isMouseInPosition ( x, y, width, height ) if ( not isCursorShowing( ) ) then return false end local sx, sy = guiGetScreenSize ( ) local cx, cy = getCursorPosition ( ) local cx, cy = ( cx * sx ), ( cy * sy ) if ( ( cx >= x and cx <= ( ( width - x ) + x ) ) and ( cy >= y and cy <= ( ( height - y ) + y ) ) ) then return true else return false end end جرب هذا كفو عليك يا بطل تستاهل لايك Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now