Jump to content

[REL] Custom Web Browser


Recommended Posts

Hello.

This resource adds to your server custom Web Browser. Here you can find custom browser settings, like web browser size, get page sources, Browser History, Search Engine, and server bookmarks on home tab. Whats not works perfectly - is tab navigation (previous, next page, and reload). In url you can write query for search engine, and it will be search. Do not recommend use this resource with clients on Linux (like me), bcs its crashs. On windows thats problem doesnt exists.

To move window, hold title bar, it works with tabs and black screen in settings and bookmarks

To add/replace bookmark press right mouse button on round. Bookmarks can create/edit only Admin and Console users.

To open window in fullscreen, press on second round button in titlebar, or double click on titlebar or any tab

On bookmark work Middle Mouse Button to open it in new tab.

Middle mouse click press on tab to close it

Scroll wheel on middle mouse on tabs to scroll them

F3 or /browser command to open/close browser.

Ctrl + N to create new tab

F3 to open browser

Screens album

 

 

Thanks all, and sorry for my bad english :D

Topic closed, links lost. 

Edited by AriosJentu
  • Like 2
Link to comment

Nice work! I like the clean design, but wouldn't it be better to make it so it's re-sizable using the cursor? Alternatively make it so if you double-click the top it'll fill the entire screen like a normal browser would?

Other than that, great work :)

Link to comment
but wouldn't it be better to make it so it's re-sizable using the cursor?

I have problems with it, because native gui-browser havent resize function, and i created custom resizing with coordinates with destroy old browser and creates new with new size.

Alternatively make it so if you double-click the top it'll fill the entire screen like a normal browser would?

Thats good idea, and i will add it soon

Thank you

Link to comment
I have problems with it, because native gui-browser havent resize function, and i created custom resizing with coordinates with destroy old browser and creates new with new size.

Why not use the DX browser? If I recall correctly you draw it as an image, making resizing very easy. And you can do other fancy DX stuff with it :)

Link to comment
I have problems with it, because native gui-browser havent resize function, and i created custom resizing with coordinates with destroy old browser and creates new with new size.

Why not use the DX browser? If I recall correctly you draw it as an image, making resizing very easy. And you can do other fancy DX stuff with it :)

One of the reason dont using dx - dx mouse features - the doesnt exists. And, of course, graphic interface, not working on dx so good than gui.

Link to comment
I have problems with it, because native gui-browser havent resize function, and i created custom resizing with coordinates with destroy old browser and creates new with new size.

Why not use the DX browser? If I recall correctly you draw it as an image, making resizing very easy. And you can do other fancy DX stuff with it :)

One of the reason dont using dx - dx mouse features - the doesnt exists. And, of course, graphic interface, not working on dx so good than gui.

You can use this:

https://wiki.multitheftauto.com/wiki/IsMouseInPosition

By the way, really nice work :D

Link to comment

Ok. Again - DX browser is not support mouse clicking on links. Of course, keyboard typing works perfectly, and with function FocusBrowser, but i think, all webpages want to use mouse. Here it doesnt works. About sizes of browser - on DX it work same as GUI - with changing size of browser - changing scale of picture. To change browser size you need to remove old browser and create new - same as GUI.

Just screens with changing DX image size.

VUzVjgV.png

AQcmsOG.png

I choose GUI browser, because here correctly works editboxes, memos, and with clicking on gui-element i dont want to calculate mouse coordinates, because it has an events. Thank you.

Link to comment

Of course you can click links using the DX browser, otherwise it would be utterly useless. :D To draw the DX Browser you use dxDrawImage, so you can easily change the size of it by storing the size as variables. You don't need to destroy it and re-create it. :)

Link to comment

Oki. But anyway - I prefer GUI development instead DX. GUI is more native functionally than DX. DX is good, but not for me. I want to make fast and easy to use, and GUI helps me with it. Im not interested with some DX features, for example - arguments, like "Post GUI", and etc. And animations with DX - its hard for me, but in GUI I use same event as DX - onClientRender.

And if you can - give me please code with working DX browser resizing and clicking inner dx image.

Thank you.

Link to comment

Looks fantastic! I'm glad to see what people made of the browser functions.

Again - DX browser is not support mouse clicking on links. Of course, keyboard typing works perfectly, and with function FocusBrowser, but i think, all webpages want to use mouse.

You have to inject the mouse events manually as MTA has no information about the way you draw the browser (i.e. it could be drawn into the world in 3D).

https://wiki.multitheftauto.com/wiki/In ... rMouseDown

https://wiki.multitheftauto.com/wiki/In ... rMouseMove

https://wiki.multitheftauto.com/wiki/In ... serMouseUp

And if you can - give me please code with working DX browser resizing and clicking inner dx image.

Internally, both MTA and CEF create a fixed-size texture when calling createBrowser/guiCreateBrowser. That means MTA has to re-create the texture each time you resize the browser which is a comparably expensive operation and would lead to FPS drops if you do it too frequently e.g. in the mouse move event handler.

As an alternative, I'd suggest drawing a dummy rectangle that represents the new size and actually resizing once you finish. The only way to resize the browser at the moment is by recreating it. Unfortunately, you'll lose its state then, but you can expect a proper resize function for the next MTA update.

Link to comment
Looks fantastic! I'm glad to see what people made of the browser functions.
Again - DX browser is not support mouse clicking on links. Of course, keyboard typing works perfectly, and with function FocusBrowser, but i think, all webpages want to use mouse.

You have to inject the mouse events manually as MTA has no information about the way you draw the browser (i.e. it could be drawn into the world in 3D).

https://wiki.multitheftauto.com/wiki/In ... rMouseDown

https://wiki.multitheftauto.com/wiki/In ... rMouseMove

https://wiki.multitheftauto.com/wiki/In ... serMouseUp

And if you can - give me please code with working DX browser resizing and clicking inner dx image.

Internally, both MTA and CEF create a fixed-size texture when calling createBrowser/guiCreateBrowser. That means MTA has to re-create the texture each time you resize the browser which is a comparably expensive operation and would lead to FPS drops if you do it too frequently e.g. in the mouse move event handler.

As an alternative, I'd suggest drawing a dummy rectangle that represents the new size and actually resizing once you finish. The only way to resize the browser at the moment is by recreating it. Unfortunately, you'll lose its state then, but you can expect a proper resize function for the next MTA update.

Thank you. Resize functions will be good for this web. But its hard for me to use DX with making multi-tab system. And this design based on my Window System with customs lib (quad edit, scroll panel, etc), what was written using CEGUI. I dont know how to make it with dx :D

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