What about relative positioning of textdraws and their multicolor?

EK.IceFlake

  • Hero Member
  • "We are the champions my fellahs" - Sufyan/VK.SuFy
  • Posts: 1,759

.

  • VC:MP Beta Tester
  • .
  • Posts: 1,801
.

EK.IceFlake

  • Hero Member
  • "We are the champions my fellahs" - Sufyan/VK.SuFy
  • Posts: 1,759

.

  • VC:MP Beta Tester
  • .
  • Posts: 1,801
Re: What about relative positioning of textdraws and their multicolor?
« Reply #3, on February 28th, 2015, 05:58 AM »Last edited on February 28th, 2015, 06:09 AM
Quote from NE.CrystalBlue on February 28th, 2015, 05:46 AM
Relative to the screen of players, so to can add textdraws in small screen and will not disappear. (And also sprites)
You mean like percentage? This could be done with floating points. 0.0 is the start position and 1.0 would be the maximum position. And on the client they'd have to multiply that by the associated resolution axis to obtain the requested position.

That means when you specify a position of (0.462, 0.764) and you have a resolution of (1024 x 768) then the following would be done on the client:
Code: [Select]
// Results in 473.088 and will get rounded to 473.
int x_pos = (int)(1024 * 0.462);

// Results in 586.752 and will get rounded to 586.
int y_pos = (int)(768 * 0.764);

That's how this should be implemented to fix this issue. They could also leave the older version for pixel perfect positioning but you get the idea of how relative positioning works on screens :)

Or at least give us a way to get the client resolution on the server and do the math our self's :)
.

Doom_Kill3R

  • VC:MP Beta Tester
  • Infinite loops defy infinity by overflowing memory
  • Posts: 1,093
Re: What about relative positioning of textdraws and their multicolor?
« Reply #4, on February 28th, 2015, 06:11 AM »
Well actually this can all be solved if only we get the oppertunity to get the resolution of a player, otherwise as someone suggested me that we have to manually take their resolution by force like we force them to register, thats how we can place things for them according to their resolution.

I hope developers might add that feature in official release.

Sebastian

  • VC:MP Beta Tester
  • Something like this: hga hga hga
  • Posts: 884

rww

  • VC:MP Beta Tester
  • LU-DM Team
  • Posts: 364

AdTec_224

  • LU Developer
  • Posts: 12
Re: What about relative positioning of textdraws and their multicolor?
« Reply #7, on February 28th, 2015, 09:46 AM »
Quote from Doom_Killer on February 28th, 2015, 06:11 AM
Well actually this can all be solved if only we get the oppertunity to get the resolution of a player, otherwise as someone suggested me that we have to manually take their resolution by force like we force them to register, thats how we can place things for them according to their resolution.

I hope developers might add that feature in official release.
I actually only thought of this the other day, it is indeed something that needs adding.
Quote from rwwpl on February 28th, 2015, 09:38 AM
Liberty Unleashed also needs this!
Liberty Unleashed already has constants to get the screen width and height ("ScreenWidth" and "ScreenHeight").

rww

  • VC:MP Beta Tester
  • LU-DM Team
  • Posts: 364
Re: What about relative positioning of textdraws and their multicolor?
« Reply #8, on February 28th, 2015, 09:51 AM »
Quote from AdTec_224 on February 28th, 2015, 09:46 AM
Quote from Doom_Killer on February 28th, 2015, 06:11 AM
Well actually this can all be solved if only we get the oppertunity to get the resolution of a player, otherwise as someone suggested me that we have to manually take their resolution by force like we force them to register, thats how we can place things for them according to their resolution.

I hope developers might add that feature in official release.
I actually only thought of this the other day, it is indeed something that needs adding.
Quote from rwwpl on February 28th, 2015, 09:38 AM
Liberty Unleashed also needs this!
Liberty Unleashed already has constants to get the screen width and height ("ScreenWidth" and "ScreenHeight").
I thought about the many colors in a single text in gui.

.

  • VC:MP Beta Tester
  • .
  • Posts: 1,801
.

Stormeus

  • VC:MP Developer
  • oh god how did i get here im not good w computer
  • Posts: 1,088
Re: What about relative positioning of textdraws and their multicolor?
« Reply #10, on February 28th, 2015, 06:24 PM »
0.4 lacks client-side scripting, so having a function to get a player's resolution would be incredibly inefficient for developers and scripters alike. Tracking changes in resolution is not fun.

I have relative positioning as a work-in-progress, though: textdraws can be created and marked as relatively positioned, with a base resolution of 1280x720. The client will handle position scaling to make sure a textdraw is placed in roughly the same spot it would be on a 1280x720 screen.

Multiple colors in one textdraw would be more of a hurdle since text processing is tied to the console, and not the basic font rendering system currently used for textdraws.