ViRuZGamiing Posted December 14, 2016 Posted December 14, 2016 Is there a way to make the CSS hover effect work, my HTML is fully function and can I make everything except for my <div> to be shown (it has a border radius) so without the white background being the body. "If debugging is the process of removing software bugs, then programming must be the process of putting them in."
dugasz1 Posted December 14, 2016 Posted December 14, 2016 https://wiki.multitheftauto.com/wiki/CreateBrowser Set the 4.th argument to true and it will disapear. And the CSS hover should work. (In my case it worked) Sorry for lot of questions and thanks for the answers!
coNolel Posted December 14, 2016 Posted December 14, 2016 I've tried this before with the HTMK LOGIN PANEL But the hover work very slowely IT Projet Manager
ViRuZGamiing Posted December 16, 2016 Author Posted December 16, 2016 Hover doesn't work even slowly, transparency is added. Client x, y = guiGetScreenSize() browser = createBrowser(x, y, true, true, false) addCommandHandler("lgn", function() loadBrowserURL(browser, "http://mta/local/login.html") guiSetInputEnabled(true) showCursor(true) addEventHandler("onClientRender", getRootElement(), function() dxDrawImage((x/2)-200, (y/2)-100, x, y, browser, 0, 0, 0, tocolor(255, 255, 255), true) end) end) Meta <meta> <script src="client.lua" type="client" /> <file src="login.html" /> <file src="user.png" /> <file src="lock.png" /> <min_mta_version server="1.5.0-9.07439" /> </meta> Login Form HTML http://pastebin.com/nHLriSYp "If debugging is the process of removing software bugs, then programming must be the process of putting them in."
tosfera Posted December 16, 2016 Posted December 16, 2016 Neither does your input or hover work because you've used CreateBrowser which the wiki states as, and highlighted the part which is your problem: Quote This example shows you how to create a fullscreen web browser (showing a local html file) without input-handling. You're looking for input-handled functions, which can be done with GuiCreateBrowser. This would do: local browser = guiCreateBrowser ( ( x / 2 ) - 200, ( y / 2 ) - 100, x, y, true, true, false ); local theBrowser = guiGetBrowser ( browser ); addEventHandler ( "onClientBrowserCreated", theBrowser, function () loadBrowserURL ( source, "http://mta/local/login.html" ); end ); Also, you know that you can position the div with css itself and create the browser with '0, 0, x, y'. right? simply add this to your body element as a class: top: calc(50% - 100px); left: calc(50% - 200px); position: absolute; 1 If you want to contact me directly concerning Advanced-Gaming, please contact me at [email protected]
ViRuZGamiing Posted December 16, 2016 Author Posted December 16, 2016 Thanks didn't even realise I wasn't using guiCreateBrowser since I was looking at that page the whole time "If debugging is the process of removing software bugs, then programming must be the process of putting them in."
tosfera Posted December 16, 2016 Posted December 16, 2016 guiCreateBrowser should be used for interactive websites, where people can use the website theirself. If you still want to have the dxRender for your browser then simply draw the render over the guiCreateBrowser. the browser will do the functionality while the render does the overlay of it. No idea why you would want that but oh well, you never know! If you want to contact me directly concerning Advanced-Gaming, please contact me at [email protected]
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