View Issue Details

IDProjectCategoryView StatusLast Update
0009887New Feature Requests[All Projects] Generalpublic2018-09-22 18:59
ReporterPirulaxAssigned To 
PrioritynormalSeverityfeatureReproducibilityhave not tried
Status newResolutionopen 
Summary0009887: Add bResponsiveCalculation to dxDraw*(Only 2D) functions and dxCreateFont. and isInRectangle functions.
Description

Actually, I want to create a PR for the mentioned functions, but im just curious that what you think about this guys(and girls)?
The concept would be, that you'll not need to use the screensize to position for ex. a rectangle to the center of the screen, instead you would just need to enter the coordinates on which the rectangle is in the center of the screen on your resolution of MTA.

So:
local v2S = Vector2(guiGetScreenSize())
dxDrawRectangle(v2S/2, 10, 10)

Would become(If your MTA's resolution is 1280*720):
dxDrawRectangle(1280/2, 720/2, 10, 10)

Of course, this is a very simple example, but in bigger scripts the readability would drastically improve, and it would be a lot easier for beginners to make responsive UIs.

Why is bResponsive needed for dxCreateFont?
Because of the font size.
Its just a thing that we make rectangles smaller(bigger) but for ex. on a 4k display you would't see the font with size of 15px.

I hope everyone likes this idea :D

TagsNo tags attached.

Activities

Pirulax

2018-06-28 22:20

reporter   ~~0026581

*Not functions, but argumnets in functions :D( I was just thinking about creating new functions called like: dxDrawResponsiveRectangle(), but thats unnecessary.)

I'll create a pr tomorrow hopefully.(Since its easy to do, and im a complete noob in Cpp)

Issue History

Date Modified Username Field Change