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

Extend the documentation for SetFloatingHelpTextStyle #856

Merged
merged 7 commits into from
Oct 30, 2023

Conversation

DerDevHD
Copy link
Contributor

@DerDevHD DerDevHD commented Jan 27, 2023

Introduction

I have done some research about the argument(-names) for the native SetFloatingHelpTextStyle.
For proper analysation I used several sources for the documentation, including the decompiled script freemode.c, aswell as a decompiled Scaleform from the base game.

Updates

p1 --> style
p2 --> hudColor
p3 --> alpha Thank you 4mmonium
p4 --> arrowPosition
p5 --> boxOffset

Example

A very simple little code snippet, used for testing the parameters

function DisplayHelpText(string)
    BeginTextCommandDisplayHelp("STRING")
    AddTextComponentSubstringPlayerName(string)
    EndTextCommandDisplayHelp(1, false, false, 0)
end

CreateThread(function()
    while true do
        Wait(0)

        local Ped = PlayerPedId()

        DisplayHelpText('Example Text')
        SetFloatingHelpTextStyle(0, 2, 2, 0, 3, 0)
        SetFloatingHelpTextToEntity(0, Ped, 0, 0)
    end
end)

Preview of the code above

// todo

@DerDevHD DerDevHD changed the title Updated params for SetFloatingHelpTextStyle Extend the documentation for SetFloatingHelpTextStyle Jul 23, 2023
Copy link
Contributor

@4mmonium 4mmonium left a comment

Choose a reason for hiding this comment

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

PR seems good, just needs a couple changes 😊
Thank you for your contribution!

@DerDevHD
Copy link
Contributor Author

PR seems good, just needs a couple changes 😊 Thank you for your contribution!

Made all the changes requested. Even made a small but pretty neat preview image. 😀

@4mmonium
Copy link
Contributor

PR seems good, just needs a couple changes 😊 Thank you for your contribution!

Made all the changes requested. Even made a small but pretty neat preview image. 😀

Looks good for the most part, except for the ordering, fixed it for you, download link below.
Download: SetFloatingHelpTextStyle.md

Here's the contribution guide by the way. It has examples showing you how documentation should be submitted and its ordering 😊

Great work nonetheless!

HUD/SetFloatingHelpTextStyle.md Outdated Show resolved Hide resolved
@DerDevHD
Copy link
Contributor Author

I've now updated everything and it should be in the correct order now. Also, I've uploaded the image to the forums for a reliable long-time appearance. If there is still something missing / wrong, feel free to tell me 😄.

@4mmonium
Copy link
Contributor

I've now updated everything and it should be in the correct order now. Also, I've uploaded the image to the forums for a reliable long-time appearance. If there is still something missing / wrong, feel free to tell me 😄.

Great, looking good, approving :-)

@thorium-cfx thorium-cfx merged commit 70003e6 into citizenfx:master Oct 30, 2023
1 check passed
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.

4 participants