Light-weight Chat Box Framework

This chat box framework is made for developers. If you came here looking for a complete solution you are probably in the wrong place.

Garry’s Mod Chat Mod

-all api features will be listed on github!-

This mod will allow modification of the way the !!DEFAULT!! chat box looks. No new panels necessary!

Example is included in the github repo.

Example codes:

http://a.pomf.se/jjftfh.gif

Updated the example to be a bit more involved.

Any feedback?



vgui.GetKeyboardFocus():GetParent():GetParent()


That’s quite neat, I’ve used vgui.GetHoveredPanel before :v:

I dont see why people voted you dumb, this is great

Was thinking the same thing but I was unsure and didnt wanna be called stupid xD

Because it’s kinda exploit.

Matt rates all my things dumb and LoodLord is revenge dumbing :v:

Yes, you can have unlimited RunConsoleCommand some way.

[editline]17th February 2015[/editline]

It’s fixed in Next Update, anyway.

You know I really think there should be more hooks for modifying how the chatbox functions, this is very helpful but it’s unfortunately a tiny bit of a hack at the same time.

who cares if it is a hack? The client doesnt :v

Interesting, but due to the fact the chat box is a pain to customize, i just removed it and replaced it by my own one, which works better.
I recoded the chat overlay too.

i hear u talkin shit like i wudnt find out

[editline]17th February 2015[/editline]


(User was banned for this post ("shitpost" - OvB))

It’s not that hard…

you can actually do something like this



local PANEL = {};

function PANEL:Init()
	self.Thought = false;
	print("init!");
end

function PANEL:PerformLayout()
	print("layout!");
end

function PANEL:Think()
	self.Thought = true;
end

function PANEL:Paint()
	surface.DrawRect(0, 0, self:GetSize());
end

hook.Add("ChatModInitialize", "Example!", function()
	table.Merge(chat.GetPanel():GetTable(), PANEL);
	
	chat.GetPanel():Init();
	chat.GetPanel():PerformLayout();
end);


warning: not my idea! willox always has these cool ideas.

Can you disable character limit in TextEntry?

probably not :frowning:

/lateresponse (rate me late)