Add more colors to LS Customs menu (#3484)
Some checks failed
Nightly Build / Check Recent Commit (push) Failing after 1m30s
Nightly Build / Build Nightly (push) Has been skipped
Nightly Build / Recreate Release (push) Has been skipped

This commit is contained in:
Вирусиен 2024-08-02 10:09:26 +02:00 committed by GitHub
parent 80af2d7c6a
commit b92a41bd84
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 218 additions and 28 deletions

View File

@ -48,7 +48,7 @@ static const std::map<int, std::string> lsc_classic_colors = {
{COLOR_CLASSIC_BLACK, "Black"},
{COLOR_CLASSIC_CARBON_BLACK, "Carbon Black"},
{COLOR_CLASSIC_GRAPHITE, "Graphite"},
{COLOR_CLASSIC_ANHRACITE_BLACK, "Anthracite Black"},
{COLOR_CLASSIC_ANTHRACITE_BLACK, "Anthracite Black"},
{COLOR_CLASSIC_BLACK_STEEL, "Black Steel"},
{COLOR_CLASSIC_DARK_STEEL, "Dark Steel"},
{COLOR_CLASSIC_SILVER, "Silver"},
@ -102,7 +102,7 @@ static const std::map<int, std::string> lsc_classic_colors = {
{COLOR_CLASSIC_LIGHT_BLUE, "Light Blue"},
{COLOR_CLASSIC_CHOCOLATE_BROWN, "Chocolate Brown"},
{COLOR_CLASSIC_BISON_BROWN, "Bison Brown"},
{COLOR_CLASSIC_CREEEN_BROWN, "Creek Brown"},
{COLOR_CLASSIC_CREEK_BROWN, "Creek Brown"},
{COLOR_CLASSIC_FELTZER_BROWN, "Feltzer Brown"},
{COLOR_CLASSIC_MAPLE_BROWN, "Maple Brown"},
{COLOR_CLASSIC_BEECHWOOD_BROWN, "Beechwood Brown"},
@ -120,6 +120,18 @@ static const std::map<int, std::string> lsc_classic_colors = {
{COLOR_CLASSIC_CREAM, "Cream"},
{COLOR_CLASSIC_ICE_WHITE, "Ice White"},
{COLOR_CLASSIC_FROST_WHITE, "Frost White"},
{COLOR_CLASSIC_CLASSIC_GOLD, "Classic Gold"},
{COLOR_CLASSIC_GREEN, "Green"},
{COLOR_CLASSIC_HUNTER_GREEN, "Hunter Green"},
{COLOR_CLASSIC_SECURICOR_GREEN, "Securicor Green"},
{COLOR_CLASSIC_EPSILON_BLUE, "Epsilon Blue"},
{COLOR_CLASSIC_FLOURESCENT_BLUE, "Flourescent Blue"},
{COLOR_CLASSIC_V_DARK_BLUE, "V Dark Blue"},
{COLOR_CLASSIC_POLICE_BLUE, "Police Blue"},
{COLOR_CLASSIC_CHAMPAGNE, "Champagne"},
{COLOR_CLASSIC_PURE_WHITE, "Pure White"},
{COLOR_CLASSIC_DEFAULT_ALLOY, "Default Alloy"},
{COLOR_CLASSIC_SECRET_GOLD, "Secret Gold"},
};
static const std::map<int, std::string> lsc_matte_colors = {
@ -140,9 +152,10 @@ static const std::map<int, std::string> lsc_matte_colors = {
{COLOR_MATTE_GREEN, "Green"},
{COLOR_MATTE_FOREST_GREEN, "Forest Green"},
{COLOR_MATTE_FOLIAGE_GREEN, "Foliage Green"},
{COLOR_MATTE_OLIVE_DARB, "Olive Drab"},
{COLOR_MATTE_OLIVE_DRAB, "Olive Drab"},
{COLOR_MATTE_DARK_EARTH, "Dark Earth"},
{COLOR_MATTE_DESERT_TAN, "Desert Tan"},
{COLOR_MATTE_BROWN, "Brown"},
};
static const std::map<int, std::string> lsc_metal_colors = {
@ -153,6 +166,60 @@ static const std::map<int, std::string> lsc_metal_colors = {
{COLOR_METALS_BRUSHED_GOLD, "Brushed Gold"},
};
static const std::map<int, std::string> lsc_util_colors = {
{COLOR_UTIL_BLACK, "Black"},
{COLOR_UTIL_BLACK_POLY, "Black Poly"},
{COLOR_UTIL_DARK_SILVER, "Dark Silver"},
{COLOR_UTIL_SILVER, "Silver"},
{COLOR_UTIL_GUN_METAL, "Gun Metal"},
{COLOR_UTIL_SHADOW_SILVER, "Shadow Silver"},
{COLOR_UTIL_RED, "Red"},
{COLOR_UTIL_BRIGHT_RED, "Bright Red"},
{COLOR_UTIL_GARNET_RED, "Garnet Red"},
{COLOR_UTIL_DARK_GREEN, "Dark Green"},
{COLOR_UTIL_GREEN, "Green"},
{COLOR_UTIL_DARK_BLUE, "Dark Blue"},
{COLOR_UTIL_MIDNIGHT_BLUE, "Midnight Blue"},
{COLOR_UTIL_BLUE, "Blue"},
{COLOR_UTIL_SEA_FOAM_BLUE, "Sea Foam Blue"},
{COLOR_UTIL_LIGHTNING_BLUE, "Lightning Blue"},
{COLOR_UTIL_MAUI_BLUE_POLY, "Maui Blue Poly"},
{COLOR_UTIL_BRIGHT_BLUE, "Bright Blue"},
{COLOR_UTIL_BROWN, "Brown"},
{COLOR_UTIL_MEDIUM_BROWN, "Medium Brown"},
{COLOR_UTIL_LIGHT_BROWN, "Light Brown"},
{COLOR_UTIL_OFF_WHITE, "Off White"},
};
static const std::map<int, std::string> lsc_worn_colors = {
{COLOR_WORN_BLACK, "Black"},
{COLOR_WORN_GRAPHITE, "Graphite"},
{COLOR_WORN_SILVER_GREY, "Silver Grey"},
{COLOR_WORN_SILVER, "Silver"},
{COLOR_WORN_BLUE_SILVER, "Blue Silver"},
{COLOR_WORN_SHADOW_SILVER, "Shadow Silver"},
{COLOR_WORN_RED, "Red"},
{COLOR_WORN_GOLDEN_RED, "Golden Red"},
{COLOR_WORN_DARK_RED, "Dark Red"},
{COLOR_WORN_DARK_GREEN, "Dark Green"},
{COLOR_WORN_GREEN, "Green"},
{COLOR_WORN_SEA_WASH, "Sea Wash"},
{COLOR_WORN_DARK_BLUE, "Dark blue"},
{COLOR_WORN_BLUE, "Blue"},
{COLOR_WORN_BABY_BLUE, "Light blue"},
{COLOR_WORN_HONEY_BEIGE, "Honey Beige"},
{COLOR_WORN_BROWN, "Brown"},
{COLOR_WORN_DARK_BROWN, "Dark Brown"},
{COLOR_WORN_STRAW_BEIGE, "straw beige"},
{COLOR_WORN_OFF_WHITE, "Off White"},
{COLOR_WORN_ORANGE, "Orange"},
{COLOR_WORN_LIGHT_ORANGE, "Light Orange"},
{COLOR_WORN_TAXI_YELLOW, "Taxi Yellow"},
{COLOR_WORN_PALE_ORANGE, "Pale Orange"},
{COLOR_WORN_WHITE, "White"},
{COLOR_WORN_OLIVE_ARMY_GREEN, "Olive Army Green"},
};
static const std::map<int, std::string> lsc_headlight_colors = {
{XENON_DEFAULT, "Default"},
{XENON_WHITE, "White"},

View File

@ -546,7 +546,7 @@ enum VehicleColorsClassic
COLOR_CLASSIC_BLACK = 0,
COLOR_CLASSIC_CARBON_BLACK = 147,
COLOR_CLASSIC_GRAPHITE = 1,
COLOR_CLASSIC_ANHRACITE_BLACK = 11,
COLOR_CLASSIC_ANTHRACITE_BLACK = 11,
COLOR_CLASSIC_BLACK_STEEL = 2,
COLOR_CLASSIC_DARK_STEEL = 3,
COLOR_CLASSIC_SILVER = 4,
@ -600,7 +600,7 @@ enum VehicleColorsClassic
COLOR_CLASSIC_LIGHT_BLUE = 74,
COLOR_CLASSIC_CHOCOLATE_BROWN = 96,
COLOR_CLASSIC_BISON_BROWN = 101,
COLOR_CLASSIC_CREEEN_BROWN = 95,
COLOR_CLASSIC_CREEK_BROWN = 95,
COLOR_CLASSIC_FELTZER_BROWN = 94,
COLOR_CLASSIC_MAPLE_BROWN = 97,
COLOR_CLASSIC_BEECHWOOD_BROWN = 103,
@ -617,7 +617,19 @@ enum VehicleColorsClassic
COLOR_CLASSIC_BRIGHT_PURPLE = 145,
COLOR_CLASSIC_CREAM = 107,
COLOR_CLASSIC_ICE_WHITE = 111,
COLOR_CLASSIC_FROST_WHITE = 112
COLOR_CLASSIC_FROST_WHITE = 112,
COLOR_CLASSIC_CLASSIC_GOLD = 37,
COLOR_CLASSIC_GREEN = 139,
COLOR_CLASSIC_HUNTER_GREEN = 144,
COLOR_CLASSIC_SECURICOR_GREEN = 125,
COLOR_CLASSIC_EPSILON_BLUE = 157,
COLOR_CLASSIC_FLOURESCENT_BLUE = 140,
COLOR_CLASSIC_V_DARK_BLUE = 146,
COLOR_CLASSIC_POLICE_BLUE = 127,
COLOR_CLASSIC_CHAMPAGNE = 93,
COLOR_CLASSIC_PURE_WHITE = 134,
COLOR_CLASSIC_DEFAULT_ALLOY = 156,
COLOR_CLASSIC_SECRET_GOLD = 160
};
enum VehicleColorsMatte
@ -639,20 +651,75 @@ enum VehicleColorsMatte
COLOR_MATTE_GREEN = 128,
COLOR_MATTE_FOREST_GREEN = 151,
COLOR_MATTE_FOLIAGE_GREEN = 155,
COLOR_MATTE_OLIVE_DARB = 152,
COLOR_MATTE_OLIVE_DRAB = 152,
COLOR_MATTE_DARK_EARTH = 153,
COLOR_MATTE_DESERT_TAN = 154
COLOR_MATTE_DESERT_TAN = 154,
COLOR_MATTE_BROWN = 129
};
enum VehicleColorsMetals
{
//COLOR_METALS_PEARLESCENT_STEEL = 18,
COLOR_METALS_BRUSHED_STEEL = 117,
COLOR_METALS_BRUSHED_BLACK_STEEL = 118,
COLOR_METALS_BRUSHED_ALUMINUM = 119,
COLOR_METALS_PURE_GOLD = 158,
COLOR_METALS_BRUSHED_GOLD = 159,
//COLOR_METALS_PEARLESCENT_GOLD = 160
COLOR_METALS_BRUSHED_GOLD = 159
};
enum VehicleColorsUtil
{
COLOR_UTIL_BLACK = 15,
COLOR_UTIL_BLACK_POLY = 16,
COLOR_UTIL_DARK_SILVER = 17,
COLOR_UTIL_SILVER = 18,
COLOR_UTIL_GUN_METAL = 19,
COLOR_UTIL_SHADOW_SILVER = 20,
COLOR_UTIL_RED = 43,
COLOR_UTIL_BRIGHT_RED = 44,
COLOR_UTIL_GARNET_RED = 45,
COLOR_UTIL_DARK_GREEN = 56,
COLOR_UTIL_GREEN = 57,
COLOR_UTIL_DARK_BLUE = 75,
COLOR_UTIL_MIDNIGHT_BLUE = 76,
COLOR_UTIL_BLUE = 77,
COLOR_UTIL_SEA_FOAM_BLUE = 78,
COLOR_UTIL_LIGHTNING_BLUE = 79,
COLOR_UTIL_MAUI_BLUE_POLY = 80,
COLOR_UTIL_BRIGHT_BLUE = 81,
COLOR_UTIL_BROWN = 108,
COLOR_UTIL_MEDIUM_BROWN = 109,
COLOR_UTIL_LIGHT_BROWN = 110,
COLOR_UTIL_OFF_WHITE = 122
};
enum VehicleColorsWorn
{
COLOR_WORN_BLACK = 21,
COLOR_WORN_GRAPHITE = 22,
COLOR_WORN_SILVER_GREY = 23,
COLOR_WORN_SILVER = 24,
COLOR_WORN_BLUE_SILVER = 25,
COLOR_WORN_SHADOW_SILVER = 26,
COLOR_WORN_RED = 46,
COLOR_WORN_GOLDEN_RED = 47,
COLOR_WORN_DARK_RED = 48,
COLOR_WORN_DARK_GREEN = 58,
COLOR_WORN_GREEN = 59,
COLOR_WORN_SEA_WASH = 60,
COLOR_WORN_DARK_BLUE = 85,
COLOR_WORN_BLUE = 86,
COLOR_WORN_BABY_BLUE = 87,
COLOR_WORN_HONEY_BEIGE = 113,
COLOR_WORN_BROWN = 114,
COLOR_WORN_DARK_BROWN = 115,
COLOR_WORN_STRAW_BEIGE = 116,
COLOR_WORN_OFF_WHITE = 121,
COLOR_WORN_ORANGE = 123,
COLOR_WORN_LIGHT_ORANGE = 124,
COLOR_WORN_TAXI_YELLOW = 126,
COLOR_WORN_PALE_ORANGE = 130,
COLOR_WORN_WHITE = 132,
COLOR_WORN_OLIVE_ARMY_GREEN = 133
};
enum PlateTextIndexs

View File

@ -572,19 +572,19 @@ namespace big
if (ImGui::Selectable("PEARLESCENT"_T.data(), color_to_change == 2))
{
color_to_change = 2;
color_type = 4;
color_type = 6;
}
if (ImGui::Selectable("INTERIOR"_T.data(), color_to_change == 3))
{
color_to_change = 3;
color_type = 6;
color_type = 9;
}
if (ImGui::Selectable("DASHBOARD"_T.data(), color_to_change == 4))
{
color_to_change = 4;
color_type = 7;
color_type = 10;
}
if (!owned_mods[MOD_TYRE_SMOKE])
@ -604,7 +604,7 @@ namespace big
if (ImGui::Selectable("WHEEL_COLOR"_T.data(), color_to_change == 6))
{
color_to_change = 6;
color_type = 5;
color_type = 7;
}
if (!owned_mods[MOD_XENON_LIGHTS])
@ -615,7 +615,7 @@ namespace big
if (ImGui::Selectable("HEADLIGHT"_T.data(), color_to_change == 7))
{
color_to_change = 7;
color_type = 9;
color_type = 11;
}
ImGui::PopID();
if (!owned_mods[MOD_XENON_LIGHTS])
@ -635,7 +635,7 @@ namespace big
if (color_to_change == 0 || color_to_change == 1)
{
if (color_type > 3)
if (color_type > 5)
{
color_type = 8;
}
@ -680,6 +680,14 @@ namespace big
{
color_type = 3;
}
if (ImGui::Selectable("UTIL"_T.data(), color_type == 4))
{
color_type = 4;
}
if (ImGui::Selectable("WORN"_T.data(), color_type == 5))
{
color_type = 5;
}
ImGui::EndListBox();
}
}
@ -800,16 +808,16 @@ namespace big
int selected_color = 0;
switch (color_type)
{
case 4: selected_color = owned_mods[MOD_PEARLESCENT_COL]; break;
case 5: selected_color = owned_mods[MOD_WHEEL_COL]; break;
case 6: selected_color = owned_mods[MOD_INTERIOR_COL]; break;
case 7: selected_color = owned_mods[MOD_DASHBOARD_COL]; break;
case 9: selected_color = owned_mods[MOD_XENON_COL]; break;
case 6: selected_color = owned_mods[MOD_PEARLESCENT_COL]; break;
case 7: selected_color = owned_mods[MOD_WHEEL_COL]; break;
case 9: selected_color = owned_mods[MOD_INTERIOR_COL]; break;
case 10: selected_color = owned_mods[MOD_DASHBOARD_COL]; break;
case 11: selected_color = owned_mods[MOD_XENON_COL]; break;
default:
selected_color = (color_to_change == 0) ? owned_mods[MOD_PRIMARY_COL] : owned_mods[MOD_SECONDARY_COL];
}
if (color_type != 9)
if (color_type != 11)
{
ImGui::SameLine();
}
@ -909,7 +917,55 @@ namespace big
}
break;
}
case 4: //Pearlescent
case 4: //Util
{
for (const auto& [color, name] : lsc_util_colors)
{
if (ImGui::Selectable(name.c_str(), selected_color == color))
{
selected_color = color;
if (color_to_change == 0)
{
owned_mods[MOD_PRIMARY_COL] = color;
}
else
{
owned_mods[MOD_SECONDARY_COL] = color;
}
g_fiber_pool->queue_job([] {
VEHICLE::SET_VEHICLE_COLOURS(player_vehicle, owned_mods[MOD_PRIMARY_COL], owned_mods[MOD_SECONDARY_COL]);
});
}
}
break;
}
case 5: //Worn
{
for (const auto& [color, name] : lsc_worn_colors)
{
if (ImGui::Selectable(name.c_str(), selected_color == color))
{
selected_color = color;
if (color_to_change == 0)
{
owned_mods[MOD_PRIMARY_COL] = color;
}
else
{
owned_mods[MOD_SECONDARY_COL] = color;
}
g_fiber_pool->queue_job([] {
VEHICLE::SET_VEHICLE_COLOURS(player_vehicle, owned_mods[MOD_PRIMARY_COL], owned_mods[MOD_SECONDARY_COL]);
});
}
}
break;
}
case 6: //Pearlescent
{
for (const auto& [color, name] : lsc_classic_colors)
{
@ -925,7 +981,7 @@ namespace big
}
break;
}
case 5: //Wheel Color
case 7: //Wheel Color
{
for (const auto& [color, name] : lsc_classic_colors)
{
@ -941,7 +997,7 @@ namespace big
}
break;
}
case 6: //Interior Color
case 9: //Interior Color
{
for (const auto& [color, name] : lsc_classic_colors)
{
@ -957,7 +1013,7 @@ namespace big
}
break;
}
case 7: //Dashboard Color
case 10: //Dashboard Color
{
for (const auto& [color, name] : lsc_classic_colors)
{
@ -973,7 +1029,7 @@ namespace big
}
break;
}
case 9: //Headlight Color
case 11: //Headlight Color
{
for (const auto& [color, name] : lsc_headlight_colors)
{