| Mirage Source http://miragesource.net/forums/ |
|
| Bolding http://miragesource.net/forums/viewtopic.php?f=201&t=3754 |
Page 1 of 1 |
| Author: | Ramsey [ Fri May 23, 2008 3:56 pm ] |
| Post subject: | Bolding |
How do I make the text blt in bold? And how do i make the texts in text boxes bold? |
|
| Author: | Pbcrazy [ Fri May 23, 2008 4:41 pm ] |
| Post subject: | Re: Bolding |
well for a text box i believe you just put Code: txtBox.FontBold = True but if your planning on using it for a chat system i would suggest switching it to a richtext box instead, that allows for colors and such. as for blt i have no clue |
|
| Author: | Asrrin29 [ Fri May 23, 2008 4:47 pm ] |
| Post subject: | Re: Bolding |
you are going to have to mess around with Sub AddText in modText client side. that much I do know. |
|
| Author: | Pbcrazy [ Fri May 23, 2008 4:54 pm ] |
| Post subject: | Re: Bolding |
ok just took a look at the AddText sub. that would be very easy to put in. all you have to do is add this Code: frmMirage.txtChat.SelBold = True but other wise idk. |
|
| Author: | GIAKEN [ Fri May 23, 2008 9:13 pm ] |
| Post subject: | Re: Bolding |
Bolding is easy. Code: Public Sub DrawText(ByVal hdc As Long, _ ByVal X, _ ByVal Y, _ ByVal Text As String, _ Color As Long, _ Optional ByVal Bold As Boolean = False) SelectObject hdc, GameFont SetBkMode hdc, vbTransparent SetTextColor hdc, Color If Bold Then TextOut hdc, X - 1, Y, Text, Len(Text) TextOut hdc, X + 1, Y, Text, Len(Text) TextOut hdc, X, Y - 1, Text, Len(Text) TextOut hdc, X, Y + 1, Text, Len(Text) End If TextOut hdc, X, Y, Text, Len(Text) End Sub You can still keep the normal DrawText around, but if you want to do something bold then just do DrawText(blahblah, True). Not sure how it would look...probably really hard to read (depending on font). |
|
| Author: | Ramsey [ Sat May 24, 2008 3:12 am ] |
| Post subject: | Re: Bolding |
Is that the only way to do it? I looks really crappy when I do it. Thanks Pbcrazy, that did the trick. |
|
| Author: | Rezeyu [ Sat May 24, 2008 3:24 am ] |
| Post subject: | Re: Bolding |
Wouldn't.. it be easier to just CreateFont with a bold setting? o.O |
|
| Author: | Robin [ Sat May 24, 2008 12:31 pm ] |
| Post subject: | Re: Bolding |
Lmao GIAKEN, that's some stroke effect code. For the font, go to the top of GameLoop, where it should show the font name in quotations. Still within the quotations afters the font name, simply add 'Bold'. |
|
| Author: | Ramsey [ Sat May 24, 2008 8:01 pm ] |
| Post subject: | Re: Bolding |
It works |
|
| Author: | Pbcrazy [ Sun May 25, 2008 1:21 am ] |
| Post subject: | Re: Bolding |
Ramsey wrote: Is that the only way to do it? I looks really crappy when I do it. Thanks Pbcrazy, that did the trick. np glad i could help. |
|
| Author: | GIAKEN [ Mon May 26, 2008 1:17 am ] |
| Post subject: | Re: Bolding |
Well I don't do what I posted, because I don't use Bold...but I just put that together because I read that the default font MS uses doesn't support bold... |
|
| Author: | Rezeyu [ Mon May 26, 2008 1:43 am ] |
| Post subject: | Re: Bolding |
You can stil lset it to bold, I think bold is like.. 700, and Italic is 400. |
|
| Page 1 of 1 | All times are UTC |
| Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |
|