1.5: Fuckin' UE5... #38

Manually merged
williamjcm merged 126 commits from one-point-five into master 2024-07-22 11:06:13 +02:00
5 changed files with 7 additions and 41 deletions
Showing only changes of commit 3a3b5bfdff - Show all commits

View file

@ -672,7 +672,7 @@ Application::drawAccessoryEditor(GameObjects::Accessory& accessory, Containers::
ImGui::BeginGroup();
ImGui::PushMultiItemsWidths(2, ImGui::CalcItemWidth());
if(ImGui::BeginCombo("##Style1", getStyleName(accessory.styles[0], style_view).data())) {
for(const auto& style : GameData::style_names) {
for(const auto& style : GameData::builtin_style_names) {
if(ImGui::Selectable(getStyleName(style.first, style_view).data(), accessory.styles[0] == style.first)) {
accessory.styles[0] = style.first;
}
@ -683,7 +683,7 @@ Application::drawAccessoryEditor(GameObjects::Accessory& accessory, Containers::
ImGui::PopItemWidth();
ImGui::SameLine(0.0f, ImGui::GetStyle().ItemInnerSpacing.x);
if(ImGui::BeginCombo("##Style2", getStyleName(accessory.styles[1], style_view).data())) {
for(const auto& style : GameData::style_names) {
for(const auto& style : GameData::builtin_style_names) {
if(ImGui::Selectable(getStyleName(style.first, style_view).data(), accessory.styles[1] == style.first)) {
accessory.styles[1] = style.first;
}
@ -762,7 +762,7 @@ Application::getStyleName(std::int32_t id, Containers::ArrayView<GameObjects::Cu
return _currentMass->globalStyles()[id - 50].name;
}
else {
return GameData::style_names.at(id);
return GameData::builtin_style_names.at(id);
}
}

View file

@ -121,7 +121,7 @@ Application::drawArmour() {
if(ImGui::BeginCombo("##Style",
getStyleName(part.styles[i], _currentMass->armourCustomStyles()).data()))
{
for(const auto& style : GameData::style_names) {
for(const auto& style : GameData::builtin_style_names) {
if(ImGui::Selectable(getStyleName(style.first, _currentMass->armourCustomStyles()).data(),
part.styles[i] == style.first))
{

View file

@ -179,7 +179,7 @@ Application::drawFrameStyles() {
if(ImGui::BeginCombo("##Style",
getStyleName(_currentMass->frameStyles()[i], _currentMass->frameCustomStyles()).data()))
{
for(const auto& style : GameData::style_names) {
for(const auto& style : GameData::builtin_style_names) {
if(ImGui::Selectable(getStyleName(style.first, _currentMass->frameCustomStyles()).data(),
_currentMass->frameStyles()[i] == style.first))
{

View file

@ -515,7 +515,7 @@ Application::drawWeaponEditor(GameObjects::Weapon& weapon) {
ImGui::PushID(i);
if(ImGui::BeginCombo("##Style", getStyleName(part.styles[i], weapon.customStyles).data())) {
for(const auto& style: GameData::style_names) {
for(const auto& style: GameData::builtin_style_names) {
if(ImGui::Selectable(getStyleName(style.first, weapon.customStyles).data(),
part.styles[i] == style.first)) {
part.styles[i] = style.first;

View file

@ -27,43 +27,9 @@ using namespace Containers::Literals;
namespace mbst { namespace GameData {
extern const std::map<std::int32_t, Containers::StringView> style_names
extern const std::map<std::int32_t, Containers::StringView> builtin_style_names
#ifdef STYLENAMES_DEFINITION
{
{0, "Custom Style 1"_s},
{1, "Custom Style 2"_s},
{2, "Custom Style 3"_s},
{3, "Custom Style 4"_s},
{4, "Custom Style 5"_s},
{5, "Custom Style 6"_s},
{6, "Custom Style 7"_s},
{7, "Custom Style 8"_s},
{8, "Custom Style 9"_s},
{9, "Custom Style 10"_s},
{10, "Custom Style 11"_s},
{11, "Custom Style 12"_s},
{12, "Custom Style 13"_s},
{13, "Custom Style 14"_s},
{14, "Custom Style 15"_s},
{15, "Custom Style 16"_s},
{50, "Global Style 1"_s},
{51, "Global Style 2"_s},
{52, "Global Style 3"_s},
{53, "Global Style 4"_s},
{54, "Global Style 5"_s},
{55, "Global Style 6"_s},
{56, "Global Style 7"_s},
{57, "Global Style 8"_s},
{58, "Global Style 9"_s},
{59, "Global Style 10"_s},
{60, "Global Style 11"_s},
{61, "Global Style 12"_s},
{62, "Global Style 13"_s},
{63, "Global Style 14"_s},
{64, "Global Style 15"_s},
{65, "Global Style 16"_s},
{100, "Iron"_s},
{101, "Silver"_s},
{102, "Gold"_s},