Jump to content

زر دون الضغط عليه !


Recommended Posts

بسم الله الرحمن الرحيم

السلام عليكم ورحمة الله وبركاتهه

اذا ما عليكم امر ابي كود زر ينفتح لك بدون ما تضغط عليه

بس تلف عليه بالموس تفتح لك النافذهه

ملآحظهه :

Note :

هذا الموضوع فقط لمشاكلي !

يرجى عدم الاغلاق !

-------

This topic only to my problems!

Please do not close!

Edited by Guest
Link to comment
  • Replies 168
  • Created
  • Last Reply

Top Posters In This Topic

-- Show Picture 
addEventHandler ( "onClientMouseEnter", root, 
    function ( ) 
        if source == theButton then 
            guiSetVisible ( theImage, true ) 
        end 
    end 
) 
  
addEventHandler ( "onClientMouseLeave", root, 
    function ( ) 
        if source == theButton then 
            guiSetVisible ( theImage, false ) 
        end 
    end 
) 
  

Link to comment
-- Show Picture 
addEventHandler ( "onClientMouseEnter", root, 
    function ( ) 
        if source == theButton then 
            guiSetVisible ( theImage, true ) 
        end 
    end 
) 
  
addEventHandler ( "onClientMouseLeave", root, 
    function ( ) 
        if source == theButton then 
            guiSetVisible ( theImage, false ) 
        end 
    end 
) 
  

مشكور يعطيك الف عآفيه

بس ممكن كود تضغط على الزر يطلع لك صفحه ثانيه ^_* مع المثال لاهنت

Link to comment
مشكور يعطيك الف عآفيه

بس ممكن كود تضغط على الزر يطلع لك صفحه ثانيه ^_* مع المثال لاهنت

Event : "onClientGUIClick" 

والمثال نفس اللي فوق ذذ

اها تسلم

الله يعطيك الف عافيه ما قصررت

Edited by Guest
Link to comment
مشكور يعطيك الف عآفيه

بس ممكن كود تضغط على الزر يطلع لك صفحه ثانيه ^_* مع المثال لاهنت

addEventHandler ( "onClientMouseEnter", root, 
    function ( ) 
        if source == theButton then 
            guiSetVisible ( theImage, true ) 
        end 
    end 
) 
  
addEventHandler ( "onClientMouseLeave", root, 
    function ( ) 
        if source == theButton then 
            guiSetVisible ( theImage, false ) 
        end 
    end 
) 
  

اخوي عناد

thebutton احط اسم الزر ؟

the image احط اسم الصوره ؟

Link to comment
GUIEditor_Window = {} 
GUIEditor_Button = {} 
  
Win = guiCreateWindow(0.1025,0.0933,0.4375,0.4183,"...........",true) 
  
GUIEditor_Button[1] = guiCreateButton(0.1125,0.175,0.065,0.0817,"Info",true,Win) 
  
GUIEditor_Button[2] = guiCreateButton(0.1175,0.2983,0.0613,0.0783,"MyWin",true,Win) 
  
GUIEditor_Button[3] = guiCreateButton(0.1187,0.405,0.06,0.0817,"MyWin2",true,Win) 
  
  
  
  
  

ابي يكون تلف على زر انفو يطلع لك نافذه !

Link to comment
function VisibleWindow( ) 
    if eventName == 'onClientMouseEnter' then 
        guiSetVisible( اسم نافذتك الي تبي تظهرها, true ) 
    else  
        guiSetVisible( اسم نافذتك الي تبي تظهرها, false ) 
    end 
end 
addEventHandler( 'onClientMouseEnter', GUIEditor_Button[1], VisibleWindow, false ) 
addEventHandler( 'onClientMouseLeave', GUIEditor_Button[1], VisibleWindow, false ) 

مافيه نافذة ثانية عشان تظهرهآ !!

Link to comment
function VisibleWindow( ) 
    if eventName == 'onClientMouseEnter' then 
        guiSetVisible( اسم نافذتك الي تبي تظهرها, true ) 
    else  
        guiSetVisible( اسم نافذتك الي تبي تظهرها, false ) 
    end 
end 
addEventHandler( 'onClientMouseEnter', GUIEditor_Button[1], VisibleWindow, false ) 
addEventHandler( 'onClientMouseLeave', GUIEditor_Button[1], VisibleWindow, false ) 

مافيه نافذة ثانية عشان تظهرهآ !!

  
GUIEditor_Window = {} 
GUIEditor_Button = {} 
  
Win = guiCreateWindow(0.1025,0.0933,0.4375,0.4183,"...........",true) 
  
GUIEditor_Button[1] = guiCreateButton(0.1125,0.175,0.065,0.0817,"Info",true,Win) 
  
function VisibleWindow( ) 
    if eventName == 'onClientMouseEnter' then 
        guiSetVisible( Win2, true ) 
    else 
        guiSetVisible( Win2, false ) 
    end 
end 
addEventHandler( 'onClientMouseEnter', GUIEditor_Button[1], VisibleWindow, false ) 
addEventHandler( 'onClientMouseLeave', GUIEditor_Button[1], VisibleWindow, false ) 
  
GUIEditor_Button[2] = guiCreateButton(0.1175,0.2983,0.0613,0.0783,"MyWin",true,Win) 
  
GUIEditor_Button[3] = guiCreateButton(0.1187,0.405,0.06,0.0817,"MyWin2",true,Win) 

كذآ تصير ؟

Link to comment
؟ Win2 يب كذا بس وين النافذة
GUIEditor_Window = {} 
GUIEditor_Button = {} 
  
Win = guiCreateWindow(0.1025,0.0933,0.4375,0.4183,"...........",true) 
  
GUIEditor_Button[1] = guiCreateButton(0.1125,0.175,0.065,0.0817,"Info",true,Win) 
  
Win2 = guiCreateWindow(0.1025,0.0933,0.4375,0.4183,"Win2",true) 
  
function VisibleWindow( ) 
    if eventName == 'onClientMouseEnter' then 
        guiSetVisible( Win2, true ) 
    else 
        guiSetVisible( Win2, false ) 
    end 
end 
addEventHandler( 'onClientMouseEnter', GUIEditor_Button[1], VisibleWindow, false ) 
addEventHandler( 'onClientMouseLeave', GUIEditor_Button[1], VisibleWindow, false ) 
  
GUIEditor_Button[2] = guiCreateButton(0.1175,0.2983,0.0613,0.0783,"MyWin",true,Win) 
  
GUIEditor_Button[3] = guiCreateButton(0.1187,0.405,0.06,0.0817,"MyWin2",true,Win) 
  

كذآ ؟

Link to comment
GUIEditor_Button = {} 
  
Win = guiCreateWindow(0.1025,0.0933,0.4375,0.4183,"...........",true) 
GUIEditor_Button[1] = guiCreateButton(0.1125,0.175,0.065,0.0817,"Info",true,Win) 
GUIEditor_Button[2] = guiCreateButton(0.1175,0.2983,0.0613,0.0783,"MyWin",true,Win) 
GUIEditor_Button[3] = guiCreateButton(0.1187,0.405,0.06,0.0817,"MyWin2",true,Win) 
Win2 = guiCreateWindow(0.1025,0.0933,0.4375,0.4183,"Win2",true) 
guiSetVisible( Win2, false ) 
  
function VisibleWindow( ) 
    guiSetVisible( Win2, not guiGetVisible( Win2 ) ) 
end 
addEventHandler( 'onClientMouseEnter', GUIEditor_Button[1], VisibleWindow, false ) 

Link to comment
؟ Win2 يب كذا بس وين النافذة
GUIEditor_Window = {} 
GUIEditor_Button = {} 
  
Win = guiCreateWindow(0.1025,0.0933,0.4375,0.4183,"...........",true) 
  
GUIEditor_Button[1] = guiCreateButton(0.1125,0.175,0.065,0.0817,"Info",true,Win) 
  
Win2 = guiCreateWindow(0.1025,0.0933,0.4375,0.4183,"Win2",true) 
  
function VisibleWindow( ) 
    if eventName == 'onClientMouseEnter' then 
        guiSetVisible( Win2, true ) 
    else 
        guiSetVisible( Win2, false ) 
    end 
end 
addEventHandler( 'onClientMouseEnter', GUIEditor_Button[1], VisibleWindow, false ) 
addEventHandler( 'onClientMouseLeave', GUIEditor_Button[1], VisibleWindow, false ) 
  
GUIEditor_Button[2] = guiCreateButton(0.1175,0.2983,0.0613,0.0783,"MyWin",true,Win) 
  
GUIEditor_Button[3] = guiCreateButton(0.1187,0.405,0.06,0.0817,"MyWin2",true,Win) 
  

كذآ ؟

ابي افهم من وين جآآيه ذي !!

if eventName == 'onClientMouseEnter' then 

------------------------------------

GUIEditor_Window = {} 
GUIEditor_Button = {} 
  
GUIEditor_Window[1] = guiCreateWindow( 0.1025, 0.0933, 0.4375, 0.4183, "...........", true ) 
GUIEditor_Button[1] = guiCreateButton( 0.1125, 0.175, 0.065, 0.0817, "Info", true, GUIEditor_Window[1] ) 
GUIEditor_Button[2] = guiCreateButton( 0.1175, 0.2983, 0.0613, 0.0783, "MyWin", true, GUIEditor_Window[1] ) 
GUIEditor_Button[3] = guiCreateButton( 0.1187, 0.405, 0.06, 0.0817, "MyWin2", true, GUIEditor_Window[1] ) 
  
GUIEditor_Window[2] = guiCreateWindow( 0.1025, 0.0933, 0.4375, 0.4183, "Win2", true ) 
  
addEventHandler( 'onClientMouseEnter', guiRoot, 
    function( ) 
        if source == GUIEditor_Button[1] then 
            guiSetVisible( GUIEditor_Window[2], true ) 
        end 
    end 
) 
  
addEventHandler( 'onClientMouseLeave', guiRoot, 
    function( ) 
        if source == GUIEditor_Button[1] then 
            guiSetVisible( GUIEditor_Window[2], false ) 
        end 
    end 
) 

Link to comment
GUIEditor_Button = {} 
  
Win = guiCreateWindow(0.1025,0.0933,0.4375,0.4183,"...........",true) 
GUIEditor_Button[1] = guiCreateButton(0.1125,0.175,0.065,0.0817,"Info",true,Win) 
GUIEditor_Button[2] = guiCreateButton(0.1175,0.2983,0.0613,0.0783,"MyWin",true,Win) 
GUIEditor_Button[3] = guiCreateButton(0.1187,0.405,0.06,0.0817,"MyWin2",true,Win) 
Win2 = guiCreateWindow(0.1025,0.0933,0.4375,0.4183,"Win2",true) 
guiSetVisible( Win2, false ) 
  
function VisibleWindow( ) 
    guiSetVisible( Win2, not guiGetVisible( Win2 ) ) 
end 
addEventHandler( 'onClientMouseEnter', GUIEditor_Button[1], VisibleWindow, false ) 

يعطيك الف عافيه يالغالي

ما قصررت

بس ممكن طلب ابي صوره للزر مثلا

زر info

ابي يكون له صورهه

مثل

شوب ابو زهره يكون الاطار حق الزر محاط بلون تحط له صوره محدده

Link to comment

ططآلع الويكي :

guiCreateStaticImage ( x, y, width, height, path, relative, [ parent = nil ] ) 

الكود الاول مثآل ,الكود الثآني الطريقه الصحيحه

GUIEditor_Button[1] = guiCreateStaticImage( 606, 299, 95, 26, "Example.png", false, Win2 ) 
GUIEditor_Button[1] = guiCreateStaticImage( 606, 299, 95, 26, "imgname.imgtype", false, Win2 ) 

Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.

×
×
  • Create New...