Compare commits
No commits in common. "3a3b5bfdff3d84fb307b6f92ed77afe79dbfabb2" and "7ce726f933432aae5f17f37f446675e034b5d21a" have entirely different histories.
3a3b5bfdff
...
7ce726f933
13 changed files with 55 additions and 22 deletions
|
@ -421,7 +421,7 @@ Application::drawTooltip(Containers::StringView text, float wrap_pos) {
|
|||
if(wrap_pos > 0.0f) {
|
||||
ImGui::PushTextWrapPos(wrap_pos);
|
||||
}
|
||||
ImGui::TextUnformatted(text.cbegin(), text.cend());
|
||||
ImGui::TextUnformatted(text.data());
|
||||
if(wrap_pos > 0.0f) {
|
||||
ImGui::PopTextWrapPos();
|
||||
}
|
||||
|
|
|
@ -360,7 +360,7 @@ Application::drawMaterialRow(Containers::StringView name, std::int32_t tier, Gam
|
|||
ImGui::TableSetColumnIndex(0);
|
||||
ImGui::Text("T%i", tier);
|
||||
ImGui::TableSetColumnIndex(1);
|
||||
ImGui::TextUnformatted(name.cbegin(), name.cend());
|
||||
ImGui::TextUnformatted(name.data());
|
||||
ImGui::TableSetColumnIndex(2);
|
||||
ImGui::Text("%i", _currentProfile->material(id));
|
||||
if(conf().cheatMode()) {
|
||||
|
@ -387,7 +387,7 @@ Application::drawUnavailableMaterialRow(Containers::StringView name, std::int32_
|
|||
ImGui::TableSetColumnIndex(0);
|
||||
ImGui::Text("T%i", tier);
|
||||
ImGui::TableSetColumnIndex(1);
|
||||
ImGui::TextUnformatted(name.cbegin(), name.cend());
|
||||
ImGui::TextUnformatted(name.begin(), name.end());
|
||||
ImGui::TableSetColumnIndex(2);
|
||||
ImGui::TextDisabled("Unavailable as of game version " SAVETOOL_SUPPORTED_GAME_VERSION);
|
||||
}
|
||||
|
@ -480,8 +480,7 @@ Application::drawMassManager() {
|
|||
ImGui::TextDisabled("<invalid>");
|
||||
break;
|
||||
case GameObjects::Mass::State::Valid:
|
||||
ImGui::TextUnformatted(_massManager->hangar(i).name().cbegin(),
|
||||
_massManager->hangar(i).name().cend());
|
||||
ImGui::TextUnformatted(_massManager->hangar(i).name().data());
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
@ -319,7 +319,7 @@ Application::drawCustomStyle(GameObjects::CustomStyle& style) {
|
|||
}
|
||||
|
||||
if(ImGui::BeginMenuBar()) {
|
||||
ImGui::TextUnformatted(style.name.cbegin(), style.name.cend());
|
||||
ImGui::TextUnformatted(style.name.data());
|
||||
|
||||
static Containers::StaticArray<33, char> name_buf{ValueInit};
|
||||
if(ImGui::SmallButton(ICON_FA_EDIT " Rename")) {
|
||||
|
@ -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::builtin_style_names) {
|
||||
for(const auto& style : GameData::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::builtin_style_names) {
|
||||
for(const auto& style : GameData::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::builtin_style_names.at(id);
|
||||
return GameData::style_names.at(id);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -121,7 +121,7 @@ Application::drawArmour() {
|
|||
if(ImGui::BeginCombo("##Style",
|
||||
getStyleName(part.styles[i], _currentMass->armourCustomStyles()).data()))
|
||||
{
|
||||
for(const auto& style : GameData::builtin_style_names) {
|
||||
for(const auto& style : GameData::style_names) {
|
||||
if(ImGui::Selectable(getStyleName(style.first, _currentMass->armourCustomStyles()).data(),
|
||||
part.styles[i] == style.first))
|
||||
{
|
||||
|
|
|
@ -179,7 +179,7 @@ Application::drawFrameStyles() {
|
|||
if(ImGui::BeginCombo("##Style",
|
||||
getStyleName(_currentMass->frameStyles()[i], _currentMass->frameCustomStyles()).data()))
|
||||
{
|
||||
for(const auto& style : GameData::builtin_style_names) {
|
||||
for(const auto& style : GameData::style_names) {
|
||||
if(ImGui::Selectable(getStyleName(style.first, _currentMass->frameCustomStyles()).data(),
|
||||
_currentMass->frameStyles()[i] == style.first))
|
||||
{
|
||||
|
|
|
@ -257,7 +257,7 @@ Application::drawWeaponCategory(Containers::StringView name, Containers::ArrayVi
|
|||
{
|
||||
ImGui::TableNextRow(ImGuiTableRowFlags_Headers);
|
||||
ImGui::TableNextColumn();
|
||||
ImGui::TextUnformatted(name.cbegin(), name.cend());
|
||||
ImGui::TextUnformatted(name.data());
|
||||
|
||||
ImGui::PushID(payload_type.data());
|
||||
|
||||
|
@ -458,7 +458,7 @@ Application::drawWeaponEditor(GameObjects::Weapon& weapon) {
|
|||
}
|
||||
|
||||
if(map->find(part.id) != map->cend()) {
|
||||
ImGui::TextUnformatted(map->at(part.id).cbegin(), map->at(part.id).cend());
|
||||
ImGui::TextUnformatted(map->at(part.id).data());
|
||||
}
|
||||
else if(part.id == -1) {
|
||||
ImGui::TextUnformatted("<none>");
|
||||
|
@ -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::builtin_style_names) {
|
||||
for(const auto& style: GameData::style_names) {
|
||||
if(ImGui::Selectable(getStyleName(style.first, weapon.customStyles).data(),
|
||||
part.styles[i] == style.first)) {
|
||||
part.styles[i] = style.first;
|
||||
|
|
|
@ -266,11 +266,11 @@ Application::drawBackupListPopup() {
|
|||
ImGui::TableNextRow();
|
||||
|
||||
ImGui::TableSetColumnIndex(0);
|
||||
ImGui::TextUnformatted(backup.company.cbegin(), backup.company.cend());
|
||||
ImGui::TextUnformatted(backup.company.data());
|
||||
if(ImGui::IsItemHovered()) {
|
||||
ImGui::BeginTooltip();
|
||||
for(const auto& file : backup.includedFiles) {
|
||||
ImGui::TextUnformatted(file.cbegin());
|
||||
ImGui::TextUnformatted(file.data());
|
||||
}
|
||||
ImGui::EndTooltip();
|
||||
}
|
||||
|
|
|
@ -92,7 +92,7 @@ Application::drawAbout() {
|
|||
if(ImGui::BeginChild("##GPL", {0.0f, float(windowSize().y()) * 0.3f}, ImGuiChildFlags_Border)) {
|
||||
static auto licence = _rs.getRaw("COPYING");
|
||||
ImGui::PushFont(ImGui::GetIO().Fonts->Fonts[1]);
|
||||
ImGui::TextUnformatted(licence.cbegin(), licence.cend());
|
||||
ImGui::TextUnformatted(licence.begin(), licence.end());
|
||||
ImGui::PopFont();
|
||||
}
|
||||
ImGui::EndChild();
|
||||
|
|
|
@ -27,9 +27,43 @@ using namespace Containers::Literals;
|
|||
|
||||
namespace mbst { namespace GameData {
|
||||
|
||||
extern const std::map<std::int32_t, Containers::StringView> builtin_style_names
|
||||
extern const std::map<std::int32_t, Containers::StringView> 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},
|
||||
|
|
2
third-party/corrade
vendored
2
third-party/corrade
vendored
|
@ -1 +1 @@
|
|||
Subproject commit 295bbba1f49887da060465f88b8501965f6acd7d
|
||||
Subproject commit 4922edf269ce77efe073f6b750a34892e1f3c30d
|
2
third-party/imgui
vendored
2
third-party/imgui
vendored
|
@ -1 +1 @@
|
|||
Subproject commit 3c435c029788cc26c52e835e2feb262a3057addc
|
||||
Subproject commit 7965494ff323c8a3232ac1233a08b984e3c981ae
|
2
third-party/magnum
vendored
2
third-party/magnum
vendored
|
@ -1 +1 @@
|
|||
Subproject commit 7d0a8215d38284f7b7ae041cfbb19d410e5988a6
|
||||
Subproject commit b91b0b24cde81a4eb9029cb2202b3a652c9bd0e9
|
2
third-party/magnum-integration
vendored
2
third-party/magnum-integration
vendored
|
@ -1 +1 @@
|
|||
Subproject commit f01593fc94556bff23a848ac71187c56e034b6d9
|
||||
Subproject commit bb8a4a870f217fc9ac15ff0ddc145974be49a5e7
|
Loading…
Reference in a new issue