Git Product home page Git Product logo

Comments (31)

ZirconiumUE avatar ZirconiumUE commented on August 30, 2024 1

I'm in 1920x1080...

from vrp.

ZirconiumUE avatar ZirconiumUE commented on August 30, 2024 1

So ?

from vrp.

ImagicTheCat avatar ImagicTheCat commented on August 30, 2024

It is a known issue, waiting to find a generic way to place it correctly on all resolutions.

from vrp.

ZirconiumUE avatar ZirconiumUE commented on August 30, 2024

U have a solution for deplaced the hud ??

from vrp.

ImagicTheCat avatar ImagicTheCat commented on August 30, 2024

I don't know yet what are the factors for the position and the width of the minimap, and I don't have time to search them right now. If you want to have this feature, try to help by finding those factors, comparing the screens of a maximum of players, to understand how to place it. FRFuel seems to nicely manage the position, so it's a start.

from vrp.

ZirconiumUE avatar ZirconiumUE commented on August 30, 2024

Ok ;)

from vrp.

ZirconiumUE avatar ZirconiumUE commented on August 30, 2024

I have found this: https://github.com/thers/FRFuel/blob/master/HUD.cs

from vrp.

T3rg0s avatar T3rg0s commented on August 30, 2024

I've fixed manually for 1920x1080, I need to make conditions for each resolution, do you have any idea about to retrieve current res ingame ?

from vrp.

ZirconiumUE avatar ZirconiumUE commented on August 30, 2024

I search this ;)

from vrp.

ZirconiumUE avatar ZirconiumUE commented on August 30, 2024

https://wiki.fivem.net/w/index.php?title=GetScreenActiveResolution&action=edit&redlink=1 i have found this native

from vrp.

T3rg0s avatar T3rg0s commented on August 30, 2024

So try yourself and contribute :)

from vrp.

ZirconiumUE avatar ZirconiumUE commented on August 30, 2024

Yep i try ;)

from vrp.

Aleweadan avatar Aleweadan commented on August 30, 2024

Zuqaa do you find something ?

from vrp.

ZirconiumUE avatar ZirconiumUE commented on August 30, 2024

For set the hud for any resolution... no but for the resolution 1920x1080 yes ^^ i publish this after

from vrp.

Aleweadan avatar Aleweadan commented on August 30, 2024

Ok

from vrp.

ZirconiumUE avatar ZirconiumUE commented on August 30, 2024

Ok, so if u use FrFuel use this code:
Goto Gui\ProgressBar.js and repace the line 63 and 64 by

Line 63: this.div.style.left = (28+anchor_index*width)+"px";
Line 64: this.div.style.top = (document.body.offsetHeight-233)+"px";

PS: THIS CODE IS FOR 1920x1080

from vrp.

ZirconiumUE avatar ZirconiumUE commented on August 30, 2024

And @ImagicTheCat, There is a problem with the size of the bar no ?
I send a screen soon

from vrp.

ZirconiumUE avatar ZirconiumUE commented on August 30, 2024

Screenshot: http://prntscr.com/f5akmv

from vrp.

T3rg0s avatar T3rg0s commented on August 30, 2024

There is no problems with size, the parameter to change it is:
//set size
this.div.style.width = this.div_label.style.width = (width-2)+"px";
this.div_inner.style.height = this.div.style.height = this.div_label.style.height = (12)+"px";
this.div_label.style.lineHeight = this.div_label.style.height;

But I think it's not a FIX, because we need to find a solution for to adapt it for each resolution.
I will pull soon a modification that use JS for adapt directly all positions of progressbar and other UI frame for each resolution.

from vrp.

ZirconiumUE avatar ZirconiumUE commented on August 30, 2024

Ok nice ;)

from vrp.

ZirconiumUE avatar ZirconiumUE commented on August 30, 2024

I have found this : https://wiki.rage.mp/index.php?title=Events::callRemote

I'm dont can work on this, i go to my work :/

from vrp.

T3rg0s avatar T3rg0s commented on August 30, 2024

@ImagicTheCat its ok for you if we only use CSS style instead of creating width and other styling parameters directly in JS?.
For example, I set the div container and styled my "money" div that will be directly injected by JS, with value setted, so now I have the money hud correctly displayed a the top right of display, for each resolution.

from vrp.

ImagicTheCat avatar ImagicTheCat commented on August 30, 2024

I don't understand the question. About the vRP.setDiv ?

from vrp.

T3rg0s avatar T3rg0s commented on August 30, 2024

Nop, I created a #container directly in the index.html, styled my #money in .css, and created the #money div directly from JS, with value injection. So now, when I change resolution, everything is scaled fine :).
I made same things for Bank account and "future" job name.
I just want to know if its interesting for you if pull it ?

from vrp.

ZirconiumUE avatar ZirconiumUE commented on August 30, 2024

3rg00, Gg dude ^^

from vrp.

ImagicTheCat avatar ImagicTheCat commented on August 30, 2024

I discourage you to do the hud by modifying vRP directly, because each update will break your work.
Also, vRP is generic, there is no such things as money to be pre-built client-side, so I can't accept the pull.
But, if you succeeded to have a resolution independent code, it could be interesting to share your work somewhere, so I can understand it and apply it to the progress bars.

from vrp.

T3rg0s avatar T3rg0s commented on August 30, 2024

Yep, I will convert it to an external mod and link it to here tomorrow. Thanks :)

from vrp.

ZirconiumUE avatar ZirconiumUE commented on August 30, 2024

So ? ^^

You have a news for the issue ?

from vrp.

ZirconiumUE avatar ZirconiumUE commented on August 30, 2024

So @ImagicTheCat ?? :D

from vrp.

Aleweadan avatar Aleweadan commented on August 30, 2024

So wait or done it yourself xD

from vrp.

ImagicTheCat avatar ImagicTheCat commented on August 30, 2024

So, until I find a great way to do this (something changed in FiveM in the last update about the UI scaling), you can configure the progress bar position in cfg/gui.lua, using left and bottom position.

from vrp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.