'LinKin Posted April 28, 2014 Posted April 28, 2014 Hello, Do you know what a modal dialog is? - In Java, a modal dialog is the one which does't allow the user to click on the windows form the back. I want to do this with MTA GUI. I was taking a look at this resource: msgbox. But sadly, that only makes a confirm dialog, and that's not what I need. I need to display a window where the client inputs some text. In msgbox resource, there's something called forceShowing which is making the window behave like a modal dialog. But there's something that I don't understand... How is it working? I got this piece of code: if ( forceShowing ) then cover = guiCreateButton ( 0, 0, 1, 1, "", true ) guiSetAlpha ( cover, 0 ) addEventHandler ( "onClientGUIClick", cover, bringMsgBoxToFront ) end Is that button occuping the whole screen?
'LinKin Posted April 28, 2014 Author Posted April 28, 2014 Sorry mate, but that's not what I'm looking for / asking for
tosfera Posted April 28, 2014 Posted April 28, 2014 Hello,Do you know what a modal dialog is? - In Java, a modal dialog is the one which does't allow the user to click on the windows form the back. I want to do this with MTA GUI. I was taking a look at this resource: msgbox. But sadly, that only makes a confirm dialog, and that's not what I need. I need to display a window where the client inputs some text. In msgbox resource, there's something called forceShowing which is making the window behave like a modal dialog. But there's something that I don't understand... How is it working? I got this piece of code: if ( forceShowing ) then cover = guiCreateButton ( 0, 0, 1, 1, "", true ) guiSetAlpha ( cover, 0 ) addEventHandler ( "onClientGUIClick", cover, bringMsgBoxToFront ) end Is that button occuping the whole screen? Correct me if I'm wrong but it is a dialogBox, showing a 'loading', or a message whenever you're doing something in the background of another thread. right? To actually do this, you can achieve this by creating a small new window with the required things on it and toggle its visibility. I'm just not quite sure how to make it unable to click back to the other one. you can disable the onClientClick when the dialog is active, maybe that's a thing ( cancelEvent() ).
'LinKin Posted April 28, 2014 Author Posted April 28, 2014 No. Anyway, I've already done it. Just use this code: if ( forceShowing ) then cover = guiCreateButton ( 0, 0, 1, 1, "", true ) guiSetAlpha ( cover, 0 ) addEventHandler ( "onClientGUIClick", cover, bringMsgBoxToFront ) end And some logic
Toffbrown Posted April 30, 2014 Posted April 30, 2014 I need to display a window where the client inputs some text. sorry that's what i thought you meant
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