Mirage Engine
Map Name in Title Bar - Printable Version

+- Mirage Engine (https://mirage-engine.uk/forums)
+-- Forum: Mirage Source (Nostalgia) (https://mirage-engine.uk/forums/forumdisplay.php?fid=61)
+--- Forum: Archive (2006-2011) (https://mirage-engine.uk/forums/forumdisplay.php?fid=18)
+---- Forum: Resources (https://mirage-engine.uk/forums/forumdisplay.php?fid=49)
+---- Thread: Map Name in Title Bar (/showthread.php?tid=53)



Map Name in Title Bar - Tutorial Bot - 01-06-2006

Author: derNalia
Difficulty: 1/5

This tutorial will show you how to put the map's name into the title bar.

:: CLIENT SIDE ::
In modGameLogic, find:
Code:
' Draw map name
              If Map(GetPlayerMap(MyIndex)).Moral = MAP_MORAL_NONE Then
                  Call DrawText(TexthDC, Int((20.5) * PIC_X / 2) - (Int(Len(Trim(Map(GetPlayerMap(MyIndex)).Name)) / 2) * 8) + sx, 2 + sx, Trim(Map(GetPlayerMap(MyIndex)).Name), QBColor(BrightRed))
              ElseIf Map(GetPlayerMap(MyIndex)).Moral = MAP_MORAL_SAFE Then
                  Call DrawText(TexthDC, Int((20.5) * PIC_X / 2) - (Int(Len(Trim(Map(GetPlayerMap(MyIndex)).Name)) / 2) * 8) + sx, 2 + sx, Trim(Map(GetPlayerMap(MyIndex)).Name), QBColor(White))
              ElseIf Map(GetPlayerMap(MyIndex)).Moral = MAP_MORAL_NO_PENALTY Then
                  Call DrawText(TexthDC, Int((20.5) * PIC_X / 2) - (Int(Len(Trim(Map(GetPlayerMap(MyIndex)).Name)) / 2) * 8) + sx, 2 + sx, Trim(Map(GetPlayerMap(MyIndex)).Name), QBColor(Black))
              End If
Comment that whole bit out.

Beneath that, add:
Code:
'Map Name in Title Bar
              If Map(GetPlayerMap(MyIndex)).Moral = MAP_MORAL_NONE Then
                  frmMirage.Caption = "GAME_NAME - " & (Map(GetPlayerMap(MyIndex)).Name) & " (No Morals)"
              ElseIf Map(GetPlayerMap(MyIndex)).Moral = MAP_MORAL_SAFE Then
                  If Map(GetPlayerMap(MyIndex)).Right = 36 And Map(GetPlayerMap(MyIndex)).Left = 366 And Map(GetPlayerMap(MyIndex)).Up = 2 Then
                  frmMirage.Caption = "GAME_NAME" & " (Safe Zone)"
                  Else
                  frmMirage.Caption = "GAME_NAME - " & (Map(GetPlayerMap(MyIndex)).Name) & " (Safe Zone)"
                  End If
              ElseIf Map(GetPlayerMap(MyIndex)).Moral = MAP_MORAL_NO_PENALTY Then
                 frmMirage.Caption = "GAME_NAME - " & (Map(GetPlayerMap(MyIndex)).Name) & " (No Death Penalty)"
              End If
That's all!