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

Hud remake #20

Closed
wants to merge 38 commits into from
Closed

Hud remake #20

wants to merge 38 commits into from

Conversation

TonybynMp4
Copy link
Contributor

@TonybynMp4 TonybynMp4 commented Jan 4, 2024

Description

Remade the whole resource #5,
This probably needs some fancy compat layer.

Features

  • "Compass" 'inspired' by something @AnishBplayz did
    • Direction
    • Street
    • Zone
  • Vehicle hud:
    • Speedometer
    • Fuel gauge
    • Blinkers
    • Headlights
    • Seatbelt / harness (same icon, different color)
    • Nitro gauge (using qbx_nitro)
  • Player hud:
    • Health & Armor using the native ui
    • Thirst, Hunger & Stress (using statebags!!!)
    • Voice distance / activation, has a different color for talking over radio
  • Money:
    • Bank & Cash
    • onMoneyChange event still works (kinda)
  • Toggle hud / Cinematic mode
    • Toggleable with an event (to put in the radialmenu)
  • Supports every stress feature of old hud

Disclaimers & stuff

It's kinda like qbx_hud lean edition, it has less bloat than qb_hud, and is way simpler/better!
(Player hud subject to being hated on 😢)

The nitrous gauge icon is a placeholder, couldn't find a nice svg for it :c

To avoid errors due to "we're not currently using statebags for those you idiot",
search for every Functions.SetMetaData related to hunger or thirst and add
Player(src).state:set('hunger', newHunger, true)
or
Player(src).state:set('thirst', newThirst, true)
(modify it to work with the situation ofc)

Also the onMoneyChange stuff needs a rework, it's really not great

image

Checklist

  • I have personally loaded this code into an updated Qbox project and checked all of its functionality.
  • My pull request fits the contribution guidelines & code conventions.

@TonybynMp4
Copy link
Contributor Author

TonybynMp4 commented Jan 4, 2024

Someone please make a compat layer for hunger & thirst 😓
(I'm too scared to try to do that)

@jonezkti
Copy link

jonezkti commented Jan 4, 2024

Any preview?

@TonybynMp4
Copy link
Contributor Author

Any preview?
:)

image
image
image

@AnishBplayz
Copy link

image
Try Removing this sleep variable... it should resolve the lint issue

@TonybynMp4
Copy link
Contributor Author

fixed :)

* locale updates

* prevent error when not logged in

* fix onMoneyChange slightly

* update onMoneyChange styling

* Remove unnecessary print statements in togglehud event

* Refactor compass display logic and variable names

* Fix vehicle indicator lights behavior and add audio notification for low fuel

* Fix progress bar background color and add garbage collection***

* feat: Oxygen font
@bicatcho11
Copy link

The old form is more beautiful and better at adding other interactions
I'm not into shape modification

@TonybynMp4
Copy link
Contributor Author

TonybynMp4 commented Mar 18, 2024

wth are you yapping about, i'm gonna rework it anyway

@TonybynMp4 TonybynMp4 linked an issue Mar 30, 2024 that may be closed by this pull request
@TonybynMp4
Copy link
Contributor Author

TonybynMp4 commented Apr 19, 2024

image
Current version

Copy link
Contributor

@BerkieBb BerkieBb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do you just delete some locales?

client/player.lua Outdated Show resolved Hide resolved
client/vehicle.lua Outdated Show resolved Hide resolved
client/vehicle.lua Outdated Show resolved Hide resolved
},
{
type = 'speedmax',
speed = GetVehicleEstimatedMaxSpeed(cache.vehicle) * 5.6 -- meh idk
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why the meh idk

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a kinda random value, just noticed i should check for the mph/kmh too, but yeah it's just trying to be a bit above the estimated max speed, which can and mostly isn't the actual max speed

client/voice.lua Outdated Show resolved Hide resolved
@TonybynMp4
Copy link
Contributor Author

Why do you just delete some locales?

Don't want to keep locales that i cannot verify to be valid, especially since i changed things so old locales may not be good anymore

@artur-michalak
Copy link

artur-michalak commented May 8, 2024

Great job, the code looks much more developer friendly 👍
I'll test it right now.

@artur-michalak
Copy link

there is no information about the damage to the vehicle
obraz

@TonybynMp4
Copy link
Contributor Author

there is no information about the damage to the vehicle obraz

idk if it's really necessary, if the engine is about to die you'll know anyway 🤔

@artur-michalak
Copy link

I don't have a problem with it if it was intentional

@TonybynMp4
Copy link
Contributor Author

I don't have a problem with it if it was intentional

👍🏻 Might consider adding an engine light or something like that tho 🤔

@artur-michalak
Copy link

artur-michalak commented May 9, 2024

or engine breaking noises

@artur-michalak
Copy link

artur-michalak commented May 10, 2024

I found this in smallresources. It might be worth integrating this into qbx_hud.
https://github.com/Qbox-project/qbx_smallresources/tree/main/qbx_hudcomponents

@TonybynMp4 TonybynMp4 closed this by deleting the head repository May 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[SUGGESTION] Make a New UI
6 participants