Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dxSetAspectRatioAdjustmentEnabled fix #333

Open
ClipperBled opened this issue Aug 23, 2018 · 0 comments
Open

dxSetAspectRatioAdjustmentEnabled fix #333

ClipperBled opened this issue Aug 23, 2018 · 0 comments
Labels
bug Something isn't working
Milestone

Comments

@ClipperBled
Copy link

ClipperBled commented Aug 23, 2018

Describe the bug

I am designing my HUD elements in a 16:9 screen (1366x768) and using this function, I want to align above the radar.
The thing is that setting second argument as "aspect ratio the dxDraws were originally designed in" (in my case 16:9) will cause problems with MTA aspect ratio option.

Example:

  • 1366x768 (native 16:9), MTA aspect ratio 16:9 (auto) positions correctly
    mta-screen_2018-08-23_10-43-14
  • 1366x768 (native 16:9), MTA aspect ratio 4:3 positions incorrectly
    mta-screen_2018-08-23_10-43-25
  • 800x600 (native 4:3), MTA aspect ratio 16:9 positions correctly
    mta-screen_2018-08-23_10-00-59
  • 800x600 (native 4:3), MTA aspect ratio 4:3 positions incorrectly
    mta-screen_2018-08-23_10-02-00

To Reproduce

  1. Using onClientRender event, call dxSetAspectRatioAdjustmentEnabled(true, 16/9).
  2. Create any dx element with positions above radar, like I did.
    Here's example:
    dxDrawText("Text", sW*(-0.73), sH*(0.32), sW, sH, tocolor(255, 255, 255, 255), 1, "bankgothic", "center", "center")
  3. Go to MTA Settings -> Video -> Aspect Ratio -> Change to see the difference.
  4. Change resolution to a different aspect ratio (800x600) and repeat step 3.

Expected behavior

What I want to see is the placement of dx elements above the radar at any screen aspect ratio, at any MTA aspect ratio, without doing checks. My method of avoiding the use of this function is:

  • Checking for screen aspect ratio (sW/sH)
  • Then, checking MTA aspect ratio using dxGetStatus.SettingAspectRatio
    • dxGetStatus.SettingHUDMatchAspectRatio is a strange check. does more "stretch" to the screen.
  • Finally, creating positions for every case;

Screenshots
posted in bug description

MTA Client:

  • Version: v1.5.5-release-13968
  • Running in Wine? No

MTA Server:

  • OS: Linux, Debian 9
  • Version: 1.5.5-9.12430.0
@qaisjp qaisjp added the bug Something isn't working label Aug 23, 2018
@botder botder added this to the Backlog milestone Mar 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants