Set a textdraw's "Stay-On-Top" priority? - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Set a textdraw's "Stay-On-Top" priority? (
/showthread.php?tid=274943)
Set a textdraw's "Stay-On-Top" priority? -
Sasino97 - 07.08.2011
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
.
Re: Set a textdraw's "Stay-On-Top" priority? -
Johnson_boy - 07.08.2011
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.
Re: Set a textdraw's "Stay-On-Top" priority? -
Sasino97 - 07.08.2011
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.
Re: Set a textdraw's "Stay-On-Top" priority? -
iPLEOMAX - 07.08.2011
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..
Re: Set a textdraw's "Stay-On-Top" priority? -
Sasino97 - 10.08.2011
Thanks iPLEOMAX
, I'm readed your mouse fs, and pasted something to my GM, (With your credits included).