Jump to content

Dx browser vs gui browser


Piorun

Recommended Posts

-Wiki

createBrowser = This function creates a new web browser element.

guiCreateBrowser = This function creates a new CEGUI web browser element.

So,the difference between them is the 'CEGUI', this CEGUI exist only in guiCreateBrowser but it doesn't exist in createBrowser.

For more infos about what does CEGUI mean click Here

Link to comment

Differences aren't too big as far as I'm aware. I'd argue that the CEGUI one is easier to work with, since mouse input and all that stuff is already working.

Whereas with the DX Browser, you'll have to inject it manually(though this also gives a bit more control). It's also drawn using dxDrawImage so you can do fancy stuff with it.

I've found that text inputs do not seem to work with the DX browser at all and I can't figure out why. Thus, I've been using the CEGUI version instead.

Link to comment

It's almost as Dealman said. You have to use the CEGUI element (CEGUI is the GUI system that MTA uses internally to create GUI elements that are prefixed with 'gui*') if you want to attach it to a GUI window.

Otherwise you'd have to render the browser on top of e.g. a GUI window which is either not possible properly or a very time-expensive task.

A DX browser by contrast provides more control and is thus more suitable for your own, custom GUI system (drawn via DX functions).

Even though, you can easily get a (nearly full-featured) DX browser from a GUI browser via guiGetBrowser

I've found that text inputs do not seem to work with the DX browser at all and I can't figure out why.

As you normally want to pass input to only one browser at the same time, you have to select the browser that should retrieve input first.

This can be done via focusBrowser (the GUI browser does that automatically by binding the onClientGUIClick event internally).

Link to comment
As you normally want to pass input to only one browser at the same time, you have to select the browser that should retrieve input first.

This can be done via focusBrowser (the GUI browser does that automatically by binding the onClientGUIClick event internally).

Ooh interesting, I was really confused as to why it wasn't working for me. Now that I look at that function I guess it makes sense.

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