After the Awesomium functions and hooks now work/exist, this control can now be fixed. It was pretty much broken at everything except entering URLs into it.
Side notes about the reasoning behind some of the changes:
A+ commit 👍+10
edit: Actually, after playing around with this in normal use scenarios, the history buttons seem quite glitchy to me. Have you tried this out?
Works fine for me. In what case is it glitchy for you?
Alright, so there aren't the bugs I'd thought I'd found.
Some flaws though:
Refreshing shouldn't add a new history entry
Doesn't happen for me.
When you refresh, instead of disabling the button, replace it with the "cancel loading" button as most browsers do. Then this button can be remoevd from the right side.
I didn't touch this but I agree that it's retarded so I'll add a commit for that.
There is a history corruption issue with fragment identifiers (the # part of some URLs that let you jump to sections - like on Wikipedia TOCs) but it is impossible to fix currently without constantly (eg. Think hook/timer) checking the URL property.
@willox Can we get Awesomium::WebViewListener::View::OnChangeAddressBar? Maybe even Awesomium::WebView::CanGoBack and CanGoForward too so we don't need to have our own copy of the history. Not sure whether CEF is anywhere near ready or not.
Merged DHTMLControls refresh & stop buttons.
This will need to be updated for http://wiki.garrysmod.com/page/Panel/StopLoading for the next update.
Fixed DHTMLControls Stop button after latest dev update
@zerfgog The merging of the stop and refresh buttons unfortunately won't happen (and thus is reverted) since apparently some addons relied on the internal view hierarchy of DHTMLControls for some reason and broke when the buttons were merged.
@Bo98 😐 that's quite unfortunate
Put a warning out next update, deprecate the behaviour, merge your PR
This control is eventually going to be deprecated and replaced in its entirety when CEF is implemented so we can wait until then and make sure the changes are there for the new control.
At least the critical bug fixes are merged - it was only the button merging part that was reverted.
Partially reverted PR #1116