Teeworlds
IRC / bridge
One-way IRC channel bridge. If you want to be able to send messages to IRC, contact
@Dune
or
@heinrich5991
.
https://www.teeworlds.com/?page=docs&wiki=rules/irc_rules
Between 2019-05-06 00:00:00Z and 2019-05-07 00:00:00Z
[quakenet] heinrich5991
BOT
2019-05-06 12:11:53Z
does anyone have access to a freebsd machine? I'd like to know whether -lGL -lGLU -lX11 (without any -L) works there (and probably find out the reason why it doesn't)
12:12
related to this:
https://github.com/teeworlds/teeworlds/pull/2107/files
Fix platform-specific client libraries for Linux by AMDmi3 · Pull...
Do not hardcode library names, detect and depend on them properly instead.
[quakenet] Assa
BOT
2019-05-06 15:27:49Z
hey dune, as next feature i want to do the hover text - how do i get the mouse x/y?
[quakenet] Dune
BOT
2019-05-06 15:36:07Z
hey Assa, I don't think you need to know that
15:36
what do you mean by "hover text", you mean tips?
[quakenet] Assa
BOT
2019-05-06 16:06:01Z
yeah, show settings tips, if your mouse is over the setting
16:06
this is only possible if there is a function that knows the bounding box and the mouse position
16:07
I see you already have that ^.^
[quakenet] Dune
BOT
2019-05-06 16:07:49Z
you don't need to get the raw mouse x/y though, look how it's done in the server browser and other Button logic functions
LordSk 🦋
2019-05-06 18:04:03Z
Oy, not sure if you're here or not, I posted on the forum about the editor
[quakenet] Oy
BOT
2019-05-06 18:19:12Z
LordSk ok, will try to take a look
LordSk 🦋
2019-05-06 18:24:09Z
there is no rush, I'm just notifying you
[quakenet] Oy
BOT
2019-05-06 19:10:15Z
LordSk looks good so far, great job :)
19:10
will test it when i have more time and provide some feedback
Fudgy
2019-05-06 20:02:37Z
Is there a way to render text with a max width and an alignement?
[quakenet] Dune
BOT
2019-05-06 20:12:57Z
you should take a look at Assa's last PR, he does that
Fudgy
2019-05-06 20:17:51Z
I cant see any align
20:18
I want to use ALIGN_CENTER
[quakenet] Dune
BOT
2019-05-06 20:32:38Z
@Fudgy
so I just had a look at the function that does the aligning usually
20:32
DoLabel is in ui.cpp
20:32
switch(Align)
20:32
{
20:32
case ALIGN_CENTER:
20:32
{
20:32
float tw = TextRender()->TextWidth(0, Size, pText, -1, LineWidth);
20:32
TextRender()->Text(0, r->x + r->w/2-tw/2, r->y - Size/10, Size, pText, LineWidth, MultiLine);
20:32
break;
20:33
so it's just a call to TextWidth and then to Text
20:33
dolabel has a LineWidth parameter anyway can't you use that?
Fudgy
2019-05-06 20:34:48Z
I knew I could just do "r->x + r->w/2-tw/2" but I was wondering if there was a funciton somewhere for it already
20:34
Im using Cursor
20:35
But it doesnt take an alignement
[quakenet] Dune
BOT
2019-05-06 20:35:13Z
so you can't use DoLabel directly?
Fudgy
2019-05-06 20:35:14Z
I know about textwidth
[quakenet] Dune
BOT
2019-05-06 20:35:26Z
well if you already know how to do it, say it in the question :P
Fudgy
2019-05-06 20:35:29Z
DoLabel doesnt have a max width no?
20:35
Well
20:35
it has but
[quakenet] Dune
BOT
2019-05-06 20:35:40Z
"float LineWidth"
Fudgy
2019-05-06 20:35:49Z
it just switched to the next line
20:35
I want TEXTFLAG_STOP_AT_END
20:35
or an equivalent
[quakenet] Dune
BOT
2019-05-06 20:36:01Z
what if you remove MultiLine?
20:36
void CUI::DoLabel(const CUIRect *r, const char *pText, float Size, EAlignment Align, float LineWidth, bool MultiLine)
Fudgy
2019-05-06 20:36:45Z
didnt try wait
20:39
ok thats what I wanted
[quakenet] Assa
BOT
2019-05-06 22:29:06Z
xD
Fudgy
2019-05-06 23:20:20Z
I'm having a problem with TextWidth()
23:20
If my text is larger than linewidth, the cursor goes to a new line. Then it returns the cursor position at that new line
23:21
this means the width is wrong (it should return the width of the first line)
23:21
is there something I'm not seeing?
23:22
I tried with Cursor.m_Flags |= TEXTFLAG_STOP_AT_END; and Cursor.m_MaxLines = 1;
23:23
but in that case, TextEx() returns with the Cursor being at position 0
23:23
(if the text is larger than the m_LineWidth)
Exported 54 message(s)