FAHD+18 Posted June 30, 2016 Share Posted June 30, 2016 (edited) السلام عليكم انا اتعلم برمجة الدي اكس جديد بس عندي مشكلة لماذا اللوحة لا تفتح 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 GUIEditor = { button = {}, } GUIEditor.button[1] = guiCreateButton(277, 231, 35, 54, "", true) guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFAAAAAA") addEventHandler("onClientRender", root, function edit () dxDrawRectangle(203, 174, 298, 186, tocolor(0, 113, 255, 255), true) dxDrawRectangle(277, 232, 139, 63, tocolor(255, 255, 255, 255), true) end ) sShowing = false bindKey("f1","down", function ( ) if ( sShowing == true ) then removeEventHandler("onClientRender",root,dx_test) showCursor ( false ) else addEventHandler("onClientRender",root,edit) showCursor ( true ) end sShowing = not sShowing end ) Edited June 30, 2016 by Guest Link to comment
Mr.CoR Posted June 30, 2016 Share Posted June 30, 2016 الرجاء تعديل عنوان موضوعك إلى x[ مشكلة ]x في فتح لوحة الدي أكس -- على شان الي له خبره بأمور الدي اكس يجي يفيدك وشكراً Link to comment
The moVer Posted June 30, 2016 Share Posted June 30, 2016 function dx_test () dxDrawRectangle(203, 174, 298, 186, tocolor(0, 113, 255, 255), true) dxDrawRectangle(277, 232, 139, 63, tocolor(255, 255, 255, 255), true) end sShowing = false bindKey("f1","down", function ( ) if ( sShowing == true ) then removeEventHandler("onClientRender",root,dx_test) showCursor ( false ) else addEventHandler("onClientRender",root,dx_test) showCursor ( true ) end sShowing = not sShowing end ) خطأك كان editانك حاطط اسم فنكشن dx_testواسم الفنكشن بالحدث كمان انت عامل الفنكشن مع حدث اول ما نشغل المود وحدث بس نضغط على اف 1 فاذا ضغطت اف 1 راح يجي خطأ انو الحدث مشغل من قبل 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