Set a textdraw's "Stay-On-Top" priority?
#1

Hi, I'm making a PC system. I designed it and it's similar to Windows XP. But there are some problems, some textdraws should stay down and other to stay on top of all the others. The mouse cursor sometime is on the desktop, and sometimes it's hidden by the start menu. Thanks .
Reply
#2

As far as I know there isn't really proper way to set the "z-index", like its called in CSS on textdraws. I believe newest textdraws always go on the top, and you can't really do anything for it, except change the order of creating textdraws.
Reply
#3

Quote:
Originally Posted by Johnson_boy
Посмотреть сообщение
As far as I know there isn't really proper way to set the "z-index", like its called in CSS on textdraws. I believe newest textdraws always go on the top, and you can't really do anything for it, except change the order of creating textdraws.
I have a mouse cursor TextDraws that gets deleted and recreated every 40 milliseconds, but it doesn't go on top of all.
Reply
#4

When you create the textdraws, make sure you add the Mouse Textdraw at the last part.

pawn Код:
new Text:Cursor;

//OnFSInit:
a = TextDrawCreate(...);
b = TextDrawCreate(...);
c = TextDrawCreate(...);
x = TextDrawCreate(...);
y = TextDrawCreate(...);
z = TextDrawCreate(...);

Cursor = TextDrawCreate(...); //At the last part, this will create it at the top layer of all others.
Whenever you recreate the textdraw, use Cursor = TextDrawCreate...

Haven't tried it but I guess it should be like this..
Reply
#5

Thanks iPLEOMAX , I'm readed your mouse fs, and pasted something to my GM, (With your credits included).
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)