1. Post #81
    Gold Member
    Kill coDer's Avatar
    April 2006
    956 Posts
    Does chrome cache images? If so, does it cache between maps, and restarting the game?

    Would it be too hard to do that?

    I encode my images as 4kb gifs, in valve texture format they are like 17kb. That's not much for a few, but when you have hundreds of these, it makes a difference.

  2. Post #82

    March 2008
    29 Posts
    How the hell do you get this to work?

  3. Post #83
    Grocel's Avatar
    October 2008
    1,207 Posts
    Can you show me the lua hooks from the gm_chrome module?

  4. Post #84

    March 2008
    29 Posts
    It works perfectly fine for me, just when people join my server it says Module "chrome" not found blah blah blah.

  5. Post #85
    Turd92's Avatar
    March 2008
    182 Posts
    It works perfectly fine for me, just when people join my server it says Module "chrome" not found blah blah blah.
    Binary modules do not download to clients, since they could be potentially dangerous. It will only work for people that have the chrome module installed on their game.

  6. Post #86
    Gold Member
    AzuiSleet's Avatar
    September 2007
    758 Posts
    I've committed the browser_base ent with some examples to the svn.
    http://gmodmodules.googlecode.com/sv...hrome/example/

    You need a material to write to, which can be reused by multiple entities, but only one can use it at a time.
    You derive an entity from browser_base, as seen in the examples.

    As for controls, you can use aiming or the cursor, and click and shit. For typing, you need to select a text box. when you select a text box you enter typing mode, it brings up an invisible text box, which intercepts typing. you won't be able to move, so pressing tab exits you out of typing mode.

    The only issue is flash games have very weird focusing issues.

  7. Post #87
    kevkev's Avatar
    April 2007
    1,093 Posts
    Are those GMTower examples supposed to be there?
    Reply With Quote Edit / Delete Reply Netherlands Show Events Dumb Dumb x 2 (list)

  8. Post #88
    Grocel's Avatar
    October 2008
    1,207 Posts
    Can you make some examples thats not need Gmodtower?!?!
    Reply With Quote Edit / Delete Reply Germany Show Events Dumb Dumb x 2 (list)

  9. Post #89
    Gold Member
    AzuiSleet's Avatar
    September 2007
    758 Posts
    They don't need GmodTower... they're examples for you to look at. You call the same methods in your own entity, SetupBrowserMat, self:InitBrowser, self:RemoveBrowser, self.Browser:LoadURL, self:MouseThink, self:BaseBrowserDraw

  10. Post #90
    Gold Member
    blackops7799's Avatar
    December 2006
    1,714 Posts
    Can you make some examples thats not need Gmodtower?!?!
    It's not that hard to strip out the gmod tower crap..

    http://www.blackopslounge.com/blacko...glebrowser.rar
    http://img2.imagedash.com/llCg.jpg

  11. Post #91
    Grocel's Avatar
    October 2008
    1,207 Posts
    Can you make this whit the radio to? ;)
    Reply With Quote Edit / Delete Reply Germany Show Events Bad Spelling Bad Spelling x 1 (list)

  12. Post #92
    Gold Member
    blackops7799's Avatar
    December 2006
    1,714 Posts
    I'm not sure if this is my problem or not, but I made a webpage that would kinda act as a browser..

    http://blackopslounge.com/browser/

    It uses an iframe and it's not letting me type in any text box that's inside of the iframe. I can select it, but it doesn't lock the player up like it normally would to allow typing.

    Is this something on my end or something on the modules end?

  13. Post #93
    Gold Member
    AzuiSleet's Avatar
    September 2007
    758 Posts
    Iframes don't work well.

  14. Post #94
    Gold Member

    July 2006
    1,951 Posts
    Multiplayer seems a bit tricky, how did you manage to get it work on GMod Tower, and the videos on-sync for every player?

  15. Post #95
    Gold Member

    July 2006
    1,951 Posts
    Ah, so they aren't in-sync at all, and everyone has their own browser. I'm working on to make it synced, but for in-sync scrolling I'd need a new function.

    A function that allows me to get the current scroll of the scrollbar. Could this be implemented?

  16. Post #96
    Gold Member

    July 2006
    1,951 Posts
    Nevermind, I might be able to get around it.

  17. Post #97
    Amic's Avatar
    July 2008
    1,552 Posts
    How to use it @_@?
    Reply With Quote Edit / Delete Reply Poland Show Events Dumb Dumb x 2 (list)

  18. Post #98
    metromod.net
    ChewGum's Avatar
    October 2007
    1,087 Posts
    How to use it @_@?
    Learn Lua and watch the examples.
    Reply With Quote Edit / Delete Reply Sweden Show Events Disagree Disagree x 1 (list)

  19. Post #99
    Project Lead, Internet Explorer for Linux
    lavacano's Avatar
    October 2008
    14,420 Posts
    I downloaded the example browser_base and chrome entities (because I can't be fucked to do something on my own), and the browser part comes behind the TV screen on the chrome entity, and browser_base seems to do nothing when spawned with ULX ent.

    How do I fix the chrome entity?

  20. Post #100
    Gold Member

    July 2006
    1,951 Posts
    Make sure you downloaded the materials with browser_base, and you need to modify the GetBrowserPos (or something similiar) function to reposition the browser.

  21. Post #101
    Gold Member
    blackops7799's Avatar
    December 2006
    1,714 Posts
    Or download my example. I pretty much did that for.

  22. Post #102
    Minecraft Servers
    Jake1305's Avatar
    August 2007
    167 Posts
    This is what I get with blackops example.

    http://i25.tinypic.com/2m4wt3s.jpg

  23. Post #103
    Gold Member
    Megalan's Avatar
    October 2005
    561 Posts
    This is what I get with blackops example.

    http://i25.tinypic.com/2m4wt3s.jpg
    hm, i have same problem

    ] ent_create google
    Requesting browser 32 32 / 32 32
    Had to make new browser
    Attaching regen to texture "error"
    Stack Error: 1 values left on Stack!
    0> Type: number - Value: '-1'

    my awesomium dll at *username*\garrysmod and gm_chrome at lua\includes\modules, what's wrong with this?

  24. Post #104
    Gold Member
    AzuiSleet's Avatar
    September 2007
    758 Posts
    Attaching regen to texture "error"
    You need a procedural texture to attach to. Like the two I provided in the example folder.

  25. Post #105
    DawG_09's Avatar
    July 2009
    20 Posts
    Is the module needed to be on the client on multiplayer aswell as the server?

  26. Post #106
    Gold Member
    FoohyAB's Avatar
    July 2009
    936 Posts
    -snip-

  27. Post #107
    Gold Member

    July 2006
    1,951 Posts
    Not on the server, as this is clientside.

  28. Post #108
    Costest's Avatar
    November 2008
    127 Posts
    Snippity do dah

  29. Post #109
    Turd92's Avatar
    March 2008
    182 Posts
    I've only got it working clientside, streaming a mp3 from my website, but for some reason it stops after 10-20 seconds. No luck serverside yet.

    Some stuff I found out by reading the sources:

    require "bass"
    
    --Finds the sound file from garrysmod/sound
    local bassTest = BASS.StreamFile( "some/sound.wav" )
    if bassTest then bassTest:play() end
    
    local function bassCall( handle, someNum )
    	if not handle then return end
    	handle:play()
    end
    
    BASS.StreamFileURL( "http://randomsite.com/audio.mp3", 0 bassCall )
    

    List of functions:
    [list][*]BASS.StreamFile( string path ) --Returns BASS channel on success, false on fail[*]BASS.StreamFileURL( string path, int, function callback ) --Can't remember what it returns[*]BASS.SetPosition( vec Pos, vec Vel, vec Front, vec Up ) --Sets 3D position in world[*]BASS.p_PendingChannels --No idea what this is[/list]
    List of metafunctions for BASS channels:
    [list][*]play()[*]pause()[*]stop()[*]getlength()[*]getposition()[*]gettag( string Format ) --Returns formated tags http://gmodmodules.googlecode.com/sv...ags-readme.txt[*]getplaying()[*]getlevel()[*]setposition( number noIdeaWhat )[*]setvolume( float volume )[*]fft2048() --No idea[*]set3dposition( vec Pos, vec Orientation, vec Velocity)[*]getrawtag( int )[/list]
    I hope this helps someone.

    ON-TOPIC: I can't wait for the new version of gm_chrome :haw:
    This is off-topic I know but since Garry removed the voice_inputfromfile convar, I got interested in gm_bass. The reason your sound stops playing is because the handle is being garbage collected, I believe. You're using a local variable, so as soon as it goes out of scope, the garbage collector is free to remove it. You have to keep a reference to it.

    Azu, these are seriously badass modules you're pumping out, loving every one of them.

  30. Post #110
    Costest's Avatar
    November 2008
    127 Posts
    also
    function ENT:OpeningURL(url)
            self:ForcePlaySelect()
            print("opening", url)
    
                    return   --THIS LINE      
            end --this too
    
            self:RemoveBrowser()
            self.DrawTranslucent = self.MessageDraw
    end
    
    http://code.google.com/p/gmodmodules...io/cl_init.lua
    I don't think those should be there

  31. Post #111
    lilezek's Avatar
    February 2009
    209 Posts
    Or download my example. I pretty much did that for.
    I see everything so shiny in your example.

    EDIT: It fixed without doing nothing...

  32. Post #112
    Gold Member
    Firegod522's Avatar
    March 2008
    11,523 Posts
    -snip-

  33. Post #113
    EggNoggin's Avatar
    July 2009
    259 Posts
    Slap it on a Plasma TV as a VGUI? Serverside?? How would this be done?

  34. Post #114
    Costest's Avatar
    November 2008
    127 Posts
    I stripped out almost all of GMT's stuff in the radio
    The only part I can't figure out now, is which function starts the streaming... it looks like there's 3 different points it could start from... StartRadio, ChannelChanged, or this line that says "hook.Add("Location", "PlayerLeaveRoomRadio", function(ply, location)"

    Edited:

    I keep accidently gmod

    Edited:

    Also, trying to open an mp3 directly, opens this message box which says something like 'didRecieve'.
    I'm guessing that's what the 'self:ForcePlaySelect() ' prevented

    Edited:

    which prevents gmod from crashing

  35. Post #115
    lilezek's Avatar
    February 2009
    209 Posts
    It would be possible to add hooks with it? For example OnLoad, OnChange, OnFocus, etc...
    and it would be possible to augment the size of resolution?

  36. Post #116
    Costest's Avatar
    November 2008
    127 Posts
    don't know what you mean but it's not that hook... so now I just have 2... but I can't make a working ENT:CalculateEarShot() with find in sphere stuff. it self:GetPos() isn't working :/

    Edited:

    Screwing with values should fix it :/

    Edited:

    attempt to call method 'GetPos' (a nil value)
    from
    self.radiostream:set3dposition(self:GetPos(), zerovec, zerovec)

    :/ self is nothing.

  37. Post #117
    lilezek's Avatar
    February 2009
    209 Posts
    don't know what you mean but it's not that hook... so now I just have 2... but I can't make a working ENT:CalculateEarShot() with find in sphere stuff. it self:GetPos() isn't working :/

    Edited:

    Screwing with values should fix it :/
    I mean to execute a function when web ends loading, when you change the web, etc.. I did a console command to choose which web page I want, but I want to do a "come back" console command too.

  38. Post #118
    GreyIOutcast's Avatar
    April 2008
    477 Posts

    I made a little demonstration so people could see. I gave credit to Blackops since I used his little entity, as well as Azu in the description.

  39. Post #119
    Costest's Avatar
    November 2008
    127 Posts
    function ENT:FinishLoading()
    	print("I'm done loading")
    end
    
    ?

    Edited:

    that's a pretty cool video in the video, but the quality is bad.
    try using wegame recorder

    Edited:

    I got streaming music working :D

    Runnin' in the 90's.. yeah we're runnin' in the 90's
    :P I picked that to test it out

    Edit: But it's just not as awesome as GMT's radio

  40. Post #120
    GreyIOutcast's Avatar
    April 2008
    477 Posts
    that's a pretty cool video in the video, but the quality is bad.
    try using wegame recorder
    I had to use Fraps, because in the demo it merely shows the texture as unchanging, since, well, the Lua/binary isn't running, so Source Recorder was out

    And then, well, DivX codec refused to compress it since it was in a non-raw codec. I still have the old footage, so I could recompress it later with a less-crappy codec, but I'm too lazy at the moment.

    Edited:

    It also might be because my gmod settings weren't on max at the time. I'm running on a laptop, since my desktop has gotten a lot more out-of-date than my laptop (it's a new machine), so I'm on it for now. The only problem is it overheats a lot on max settings.
    Reply With Quote Edit / Delete Reply United States Show Events Dumb Dumb x 1 (list)