Mirage Source http://miragesource.net/forums/ |
|
[Feature] NPC names not going off screen http://miragesource.net/forums/viewtopic.php?f=183&t=6275 |
Page 1 of 74 |
Author: | AkselJ [ Tue Oct 06, 2009 11:40 am ] |
Post subject: | [Feature] NPC names not going off screen |
So, I noticed when using the "Stop player names from going off screen" - fix on NPC's their names would get stuck 4 tiles away from the end. So I found out how to fix it, which is quite simple and I thought I'd share it. In Sub BltNpcName Add: Code: If TextY <= 0 Then TextY = 0 If TextX <= 0 Then TextX = 0 If TextX + (Len(.Name) * 8) >= DDSD_BackBuffer.lWidth + 128 Then TextX = DDSD_BackBuffer.lWidth + 128 - (Len(.Name) * 8) Below: Code: ' Determine loaction for name TextX = MapNpc(Index).X * PIC_X + MapNpc(Index).XOffset + CLng(PIC_X / 2) - ((Len(Trim$(.Name)) / 2) * 8) TextY = MapNpc(Index).Y * PIC_Y + MapNpc(Index).YOffset - CLng(PIC_Y / 2) - 4 And MUST be before Code: ' Draw name DrawText TexthDC, TextX, TextY, Trim$(.Name), vbWhite End With Enjoy. |
Author: | wanai [ Sun Jan 09, 2022 8:25 am ] |
Post subject: | Re: [Feature] NPC names not going off screen |
Econ |
Author: | wanai [ Sun Jan 09, 2022 8:26 am ] |
Post subject: | Re: [Feature] NPC names not going off screen |
126.3 |
Author: | wanai [ Sun Jan 09, 2022 8:27 am ] |
Post subject: | Re: [Feature] NPC names not going off screen |
Bett |
Author: | wanai [ Sun Jan 09, 2022 8:28 am ] |
Post subject: | Re: [Feature] NPC names not going off screen |
Bett |
Author: | wanai [ Sun Jan 09, 2022 8:29 am ] |
Post subject: | Re: [Feature] NPC names not going off screen |
Shir |
Author: | wanai [ Sun Jan 09, 2022 8:30 am ] |
Post subject: | Re: [Feature] NPC names not going off screen |
Shad |
Author: | wanai [ Sun Jan 09, 2022 8:31 am ] |
Post subject: | Re: [Feature] NPC names not going off screen |
Jewe |
Author: | wanai [ Sun Jan 09, 2022 8:32 am ] |
Post subject: | Re: [Feature] NPC names not going off screen |
Coch |
Author: | wanai [ Sun Jan 09, 2022 8:34 am ] |
Post subject: | Re: [Feature] NPC names not going off screen |
Roma |
Author: | wanai [ Sun Jan 09, 2022 8:35 am ] |
Post subject: | Re: [Feature] NPC names not going off screen |
Mich |
Author: | wanai [ Sun Jan 09, 2022 8:36 am ] |
Post subject: | Re: [Feature] NPC names not going off screen |
Mill |
Author: | wanai [ Sun Jan 09, 2022 8:37 am ] |
Post subject: | Re: [Feature] NPC names not going off screen |
Tesc |
Author: | wanai [ Sun Jan 09, 2022 8:38 am ] |
Post subject: | Re: [Feature] NPC names not going off screen |
Citi |
Author: | wanai [ Sun Jan 09, 2022 8:39 am ] |
Post subject: | Re: [Feature] NPC names not going off screen |
Orie |
Author: | wanai [ Sun Jan 09, 2022 8:40 am ] |
Post subject: | Re: [Feature] NPC names not going off screen |
Judi |
Author: | wanai [ Sun Jan 09, 2022 8:41 am ] |
Post subject: | Re: [Feature] NPC names not going off screen |
Rond |
Author: | wanai [ Sun Jan 09, 2022 8:42 am ] |
Post subject: | Re: [Feature] NPC names not going off screen |
Jewe |
Author: | wanai [ Sun Jan 09, 2022 8:44 am ] |
Post subject: | Re: [Feature] NPC names not going off screen |
Dorm |
Author: | wanai [ Sun Jan 09, 2022 8:45 am ] |
Post subject: | Re: [Feature] NPC names not going off screen |
Thun |
Author: | wanai [ Sun Jan 09, 2022 8:46 am ] |
Post subject: | Re: [Feature] NPC names not going off screen |
Lenn |
Author: | wanai [ Sun Jan 09, 2022 8:47 am ] |
Post subject: | Re: [Feature] NPC names not going off screen |
Juli |
Author: | wanai [ Sun Jan 09, 2022 8:48 am ] |
Post subject: | Re: [Feature] NPC names not going off screen |
John |
Author: | wanai [ Sun Jan 09, 2022 8:49 am ] |
Post subject: | Re: [Feature] NPC names not going off screen |
Gran |
Page 1 of 74 | All times are UTC |
Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |