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

Gradient and leveled bars #15

Open
Crayder opened this issue Aug 31, 2016 · 3 comments
Open

Gradient and leveled bars #15

Crayder opened this issue Aug 31, 2016 · 3 comments

Comments

@Crayder
Copy link

Crayder commented Aug 31, 2016

Two suggestions:

  1. Gradient bars. Function that gives input of up to 10 colors and each color's level. You will make the gradient where each color is full at its level.
  2. Leveled bars. Same as the first suggestion, but the color just switches at once.
@Southclaws
Copy link
Owner

Shouldn't be too hard, I'll try and get this in the next update, thanks!

@Crayder
Copy link
Author

Crayder commented Aug 31, 2016

Yeah, I actually have the gradient code basically. It's simple stuff though.

@Crayder
Copy link
Author

Crayder commented Sep 12, 2016

enum
{
    BAR_COLOUR_MODE_SINGLE = 1,
    BAR_COLOUR_MODE_LEVELED,
    BAR_COLOUR_MODE_GRADIENT
}

pbar_colourMode

// pbar_colourMode
stock GetPlayerProgressBarColourMode(playerid, PlayerBar:barid)
{
    if(!IsValidPlayerProgressBar(playerid, barid))
        return 0;

    return pbar_Data[playerid][_:barid][pbar_colourMode];
}

stock SetPlayerProgressBarDirection(playerid, PlayerBar:barid, mode)
{
    if(!IsValidPlayerProgressBar(playerid, barid))
        return 0;

    pbar_Data[playerid][_:barid][pbar_colourMode] = mode;

    _RenderBar(playerid, _:barid);

    return 1;
}

This is what I've done in the past 5 minutes... planned on doing more but leaving... xD

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants