Jump to content

Help , Button to open New Window


Hoka1234

Recommended Posts

Hi All , i need when i press on "Button" that show me new Widnow GUI

my Code

  
       GUIEditor_Window = {} 
        GUIEditor_Button = {} 
  
    function test() 
        GUIEditor_Window[1] = guiCreateWindow(275,102,581,569,"",false) 
        GUIEditor_Button[1] = guiCreateButton(36,61,181,93,"SHOW",false,GUIEditor_Window[1]) 
        GUIEditor_Button[2] = guiCreateButton(372,63,197,95,"SHOW New Window",false,GUIEditor_Window[1]) 
    end 
  

it is just a test

When i press on Button[2] Create New WINDOW Gui

PS: Congratz Castillo :D

Thanks.

Edited by Guest
Link to comment
Use function bindKey i said before. No one will write code for you. You should write yourself.

Fixed the format..

i dont want to bindkey ...

and why u telling to me no one will write for you?

maybe some body can do that , it is too easy , but i cant remember cuz i left the scripting from many months...

i added the window with visible ...

i just want when i press the button it show me that window just the code.

Link to comment
Use function bindKey i said before. No one will write code for you. You should write yourself.

Fixed the format..

i dont want to bindkey ...

and why u telling to me no one will write for you?

maybe some body can do that , it is too easy , but i cant remember cuz i left the scripting from many months...

i added the window with visible ...

i just want when i press the button it show me that window just the code.

He's telling you that nobody wants to write your script for you, because nobody wants to write your script for you.

It's a matter of 2 function calls, it's not a major chore, but nobody wants to write anything for people who are too lazy to do this kind of extremely basic scripting for themselves.

Link to comment

Thank You Castillo :)

i forgot the Wiki page :/

it is the button only :)

  
function initGUI( ) 
    btnOutput = guiCreateButton( 0.7, 0.1, 0.2, 0.1, "Output!", true ) 
  
     -- And attach our button to the outputEditBox function 
    addEventHandler ( "onClientGUIClick", btnOutput, outputEditBox, false ) 
  
 end 
addEventHandler( "onClientResourceStart", getResourceRootElement( getThisResource( ) ), initGUI ) 
  
-- Setup our function to output the message to the chatbox 
function outputEditBox ( button ) 
    if button == "left" then 
         GUIEditor_Window[2] = guiCreateWindow(0.3086,0.2188,0.457,0.4206,"EMAIL SYSTEM",true) 
         guiSetVisible(GUIEditor_Window[2],false) 
         guiWindowSetSizable(GUIEditor_Window[2],false) 
    end 
end 
  
addEventHandler("onClientResourceStart",resourceRoot, 
function() 
    bindKey ("F3", "down", openGui ) 
end ) 
  
function openGui() 
    if not isElement(btnOutput) then initGUI() end 
    if not guiGetVisible(btnOutput) then 
  
        guiSetVisible ( btnOutput, true ) 
    else 
        guiSetVisible ( btnOutput, false ) 
    end 
end 

here's the code for who have same problem :/

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

@rohbol : if he gived to me the wiki pages like castillo did , with out (no body will make for u) .. i would like hes helping. , so see Castillo gived me the wiki page with all i understand .. in just 1 line.

and i said at first i've another code i just put that as Test :)

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

anyway thank you all , Lock it please.

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...