[Fretta] CLASS.Description and Class Menu Buttons' Hovertext

My problem isnt necessarily with CLASS.Description, but when you’re in the class menu and the hover text shows, why is it cut off at like, 24 characters or so?

For Example



CLASS.Description = [[Lorem ipsum dolor sit amet, consectetur adipiscing elit. 

Maecenas massa odio, tempor in porta vel, posuere vitae arcu. 

Praesent suscipit, leo eget dapibus imperdiet, turpis.]]


Hovertext output: Lorem ipsum dolor sit am

So why is it getting cut off? What can I do to fix this?

Anyone? :frowning:

bumpity bumpity? :V

I’m not promising that this is a helpful post, but it may be informative (if you haven’t seen the fretta source before).

I found the select screen’s source code here, and the code that invokes the select screen is here. There’s nothing in either of those which limits the description string length. I did notice that the hovertext’s size is limited to 300, 300. Perhaps you’re overstepping that boundary?

Is there anything in your code that may alter the description (and cause it to be clamped)?

Not at all. I’ve tried overwriting everything in cl_selectscreen with my own stuff (I’m assuming you can overwrite panels like you can hooks,) but I just can’t figure out how the text is being clamped.

Also: self.lblHoverText:SetWrap( true ). Even if I were overstepping the boundary, shouldn’t it wrap?

EDIT: Woot, I figured it out. For some reason, the hovertext being AddItem’d into pnlMain was causing it to be clamped. So I commented out lines 57 and 120, then I edited line 227 to set the pos of the label to (self.pnlButtons.x + self.pnlButtons:GetWide() + 10, self.pnlButtons.y). I’m assuming this made the hovertext independent of everything else.

Lastly, on line 228 instead of setting the size, I just did SizeToContents() because OHFUCKIBROKEIT.

Lastly, on line 228 I just changed the size to whatever the fuck I wanted to because I’m a boss. SizeToContents was being dumb. If I weren’t lazy, I’d figure out how much of the screen I had left and work with that.

So Here’s what I’ve got.

Neither Fretta nor Derma are my strong points, though I’ve been using Derma a lot for my own project. After checking the definition for SetWrap, it sounds like you really shouldn’t be having any problems.

Is the string clamped by character count or pixel length? At risk of sounding condescending (sorry), have you tried other strings, or adding line breaks where (or before) the limitation occurs?

To self-diagnose the problem, you could extract the fretta gamemode from the gmod gcf and modify the source code to try finding the limitation (add self.lblHoverText:SizeToContents() wherever its contents are changed, for one example).

At least, until a Fretta expert finds this thread :v:

Looks like you posted that before my victory edit. :v:

But yeah, anything visual definitely is not my forte. I’m better with the things you don’t see.

I had checked all the shit you mentioned, but you got my mind to working somehow. Thanks :stuck_out_tongue: