Here you go !
type TitleData
TextID
ObjectID
Visible
endtype
global Title as TitleData[]
function Title_Add(Title$,ObjectID)
local TempTitle as TitleData
TempTitle.TextID=CreateText(Title$)
SetTextAlignment(TempTitle.TextID,1)
SetTextSize(TempTitle.TextID,24)
SetTextColor(TempTitle.TextID,255,255,255,255)
TempTitle.ObjectID=ObjectID
TempTitle.Visible=1
Title.insert(TempTitle)
endfunction Title.length
function Title_Update()
for TitleID=0 to Title.length
SizeY#=GetObjectSizeMaxY(Title[TitleID].ObjectID)
X#=GetObjectX(Title[TitleID].ObjectID)
Y#=GetObjectY(Title[TitleID].ObjectID)+SizeY#+2
Z#=GetObjectZ(Title[TitleID].ObjectID)
ScreenX#=GetScreenXFrom3D(X#,Y#,Z#)
ScreenY#=GetScreenYFrom3D(X#,Y#,Z#)
if GetObjectInScreen(Title[TitleID].ObjectID)=1 and ScreenX#>GetScreenBoundsLeft() and ScreenX#<GetScreenBoundsRight() and ScreenY#>GetScreenBoundsTop() and ScreenY#<GetScreenBoundsBottom()
SetTextPosition(Title[TitleID].TextID,ScreenX#,ScreenY#)
SetTextVisible(Title[TitleID].TextID,Title[TitleID].Visible)
else
SetTextVisible(Title[TitleID].TextID,0)
endif
next TitleID
endfunction
function Title_SetAllVisible(Visible)
for TitleID=0 to Title.length
Title[TitleID].Visible=Visible
next TitleID
endfunction
I made it for my
Shader Pack