Compare commits
No commits in common. "d9755a31fee2c8d003e32c46f9e4fc793884527b" and "819e144410baf5bacf7409259d622aee0c810e59" have entirely different histories.
d9755a31fe
...
819e144410
18 changed files with 115 additions and 81 deletions
2
.gitmodules
vendored
2
.gitmodules
vendored
|
@ -21,7 +21,7 @@
|
|||
[submodule "libzip"]
|
||||
path = third-party/libzip
|
||||
url = https://github.com/nih-at/libzip
|
||||
branch = main
|
||||
branch = master
|
||||
[submodule "efsw"]
|
||||
path = third-party/efsw
|
||||
url = https://github.com/SpartanJ/efsw
|
||||
|
|
|
@ -58,7 +58,7 @@ Application::drawManager() {
|
|||
|
||||
if(ImGui::BeginChild("##ProfileInfo",
|
||||
{ImGui::GetContentRegionAvail().x * 0.60f, 0.0f},
|
||||
ImGuiChildFlags_Border, ImGuiWindowFlags_MenuBar))
|
||||
true, ImGuiWindowFlags_MenuBar))
|
||||
{
|
||||
if(ImGui::BeginMenuBar()) {
|
||||
ImGui::TextUnformatted("Profile information");
|
||||
|
@ -85,7 +85,7 @@ Application::drawManager() {
|
|||
ImGui::SameLine();
|
||||
|
||||
if(ImGui::BeginChild("##MASSManager", {0.0f, 0.0f},
|
||||
ImGuiChildFlags_Border, ImGuiWindowFlags_MenuBar))
|
||||
true, ImGuiWindowFlags_MenuBar))
|
||||
{
|
||||
if(ImGui::BeginMenuBar()) {
|
||||
ImGui::TextUnformatted("M.A.S.S. management");
|
||||
|
|
|
@ -52,7 +52,7 @@ Application::drawMassViewer() {
|
|||
|
||||
if(ImGui::BeginChild("##MassInfo",
|
||||
{0.0f, 0.0f},
|
||||
ImGuiChildFlags_Border, ImGuiWindowFlags_MenuBar))
|
||||
true, ImGuiWindowFlags_MenuBar))
|
||||
{
|
||||
if(ImGui::BeginMenuBar()) {
|
||||
if(ImGui::BeginTable("##MassViewerMenuTable", 4)) {
|
||||
|
@ -303,9 +303,7 @@ Application::drawCustomStyle(GameObjects::CustomStyle& style) {
|
|||
|
||||
DCSResult return_value = DCS_Fail;
|
||||
|
||||
if(!ImGui::BeginChild("##CustomStyle", {}, ImGuiChildFlags_Border|ImGuiChildFlags_AutoResizeY,
|
||||
ImGuiWindowFlags_MenuBar))
|
||||
{
|
||||
if(!ImGui::BeginChild("##CustomStyle", {0.0f, 244.0f}, true, ImGuiWindowFlags_MenuBar)) {
|
||||
ImGui::EndChild();
|
||||
return DCS_Fail;
|
||||
}
|
||||
|
|
|
@ -34,7 +34,7 @@ Application::drawArmour() {
|
|||
_currentMass->getBulletLauncherAttachments();
|
||||
}
|
||||
|
||||
if(!ImGui::BeginChild("##ArmourParts", {}, ImGuiChildFlags_Border)) {
|
||||
if(!ImGui::BeginChild("##ArmourParts", {0.0f, 0.0f}, true)) {
|
||||
ImGui::EndChild();
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -36,13 +36,11 @@ Application::drawFrameInfo() {
|
|||
|
||||
if(ImGui::BeginChild("##JointSliders",
|
||||
{(ImGui::GetContentRegionAvail().x / 2.0f) - (ImGui::GetStyle().WindowPadding.x / 2.0f),
|
||||
0.0f},
|
||||
ImGuiChildFlags_Border|ImGuiChildFlags_AutoResizeY, ImGuiWindowFlags_MenuBar))
|
||||
(ImGui::GetContentRegionAvail().y / 1.75f) - (ImGui::GetStyle().WindowPadding.y / 2.0f)},
|
||||
true, ImGuiWindowFlags_MenuBar))
|
||||
{
|
||||
if(ImGui::BeginMenuBar()) {
|
||||
ImGui::TextUnformatted("Joint sliders");
|
||||
drawHelpMarker("In-game values are multiplied by 100. For example, 0.500 here is equal to 50 in-game.",
|
||||
static_cast<float>(windowSize().x()) / 4.0f);
|
||||
|
||||
ImGui::EndMenuBar();
|
||||
}
|
||||
|
@ -53,7 +51,7 @@ Application::drawFrameInfo() {
|
|||
|
||||
if(ImGui::BeginChild("##FrameStyles",
|
||||
{(ImGui::GetContentRegionAvail().x / 2.0f) - (ImGui::GetStyle().WindowPadding.x / 2.0f), 0.0f},
|
||||
ImGuiChildFlags_Border, ImGuiWindowFlags_MenuBar))
|
||||
true, ImGuiWindowFlags_MenuBar))
|
||||
{
|
||||
if(ImGui::BeginMenuBar()) {
|
||||
ImGui::TextUnformatted("Frame styles");
|
||||
|
@ -69,7 +67,7 @@ Application::drawFrameInfo() {
|
|||
|
||||
ImGui::SameLine();
|
||||
|
||||
if(ImGui::BeginChild("##EyeFlare", {}, ImGuiChildFlags_Border, ImGuiWindowFlags_MenuBar)) {
|
||||
if(ImGui::BeginChild("##EyeFlare", {0.0f, 0.0f}, true, ImGuiWindowFlags_MenuBar)) {
|
||||
if(ImGui::BeginMenuBar()) {
|
||||
ImGui::TextUnformatted("Eye flare colour");
|
||||
drawHelpMarker("Right-click the picker for more options.", 250.0f);
|
||||
|
@ -90,53 +88,98 @@ Application::drawJointSliders() {
|
|||
return;
|
||||
}
|
||||
|
||||
ImGui::BeginGroup();
|
||||
drawAlignedText("Neck:");
|
||||
drawAlignedText("Body:");
|
||||
drawAlignedText("Shoulders:");
|
||||
drawAlignedText("Hips:");
|
||||
drawAlignedText("Arms:");
|
||||
drawAlignedText("Legs:");
|
||||
ImGui::EndGroup();
|
||||
ImGui::TextWrapped("In-game values are multiplied by 100.\nFor example, 0.500 here is equal to 50 in-game.");
|
||||
|
||||
ImGui::SameLine();
|
||||
if(ImGui::BeginTable("##JointSliderTable", 2, ImGuiTableFlags_Borders)) {
|
||||
ImGui::TableSetupColumn("##SliderLabel", ImGuiTableColumnFlags_WidthFixed);
|
||||
ImGui::TableSetupColumn("##Sliders", ImGuiTableColumnFlags_WidthStretch);
|
||||
|
||||
ImGui::BeginGroup();
|
||||
ImGui::PushItemWidth(-1.0f);
|
||||
if(ImGui::SliderFloat("##NeckSlider", &_currentMass->jointSliders().neck, 0.0f, 1.0f)) {
|
||||
_jointsDirty = true;
|
||||
ImGui::TableNextRow();
|
||||
ImGui::TableSetColumnIndex(0);
|
||||
drawAlignedText("Neck");
|
||||
ImGui::TableSetColumnIndex(1);
|
||||
ImGui::SetNextItemWidth(-1.0f);
|
||||
if(ImGui::SliderFloat("##NeckSlider", &_currentMass->jointSliders().neck, 0.0f, 1.0f)) {
|
||||
_jointsDirty = true;
|
||||
}
|
||||
|
||||
ImGui::TableNextRow();
|
||||
ImGui::TableSetColumnIndex(0);
|
||||
drawAlignedText("Body");
|
||||
ImGui::TableSetColumnIndex(1);
|
||||
ImGui::SetNextItemWidth(-1.0f);
|
||||
if(ImGui::SliderFloat("##BodySlider", &_currentMass->jointSliders().body, 0.0f, 1.0f)) {
|
||||
_jointsDirty = true;
|
||||
}
|
||||
|
||||
ImGui::TableNextRow();
|
||||
ImGui::TableSetColumnIndex(0);
|
||||
drawAlignedText("Shoulders");
|
||||
ImGui::TableSetColumnIndex(1);
|
||||
ImGui::SetNextItemWidth(-1.0f);
|
||||
if(ImGui::SliderFloat("##ShouldersSlider", &_currentMass->jointSliders().shoulders, 0.0f, 1.0f)) {
|
||||
_jointsDirty = true;
|
||||
}
|
||||
|
||||
ImGui::TableNextRow();
|
||||
ImGui::TableSetColumnIndex(0);
|
||||
drawAlignedText("Hips");
|
||||
ImGui::TableSetColumnIndex(1);
|
||||
ImGui::SetNextItemWidth(-1.0f);
|
||||
if(ImGui::SliderFloat("##HipsSlider", &_currentMass->jointSliders().hips, 0.0f, 1.0f)) {
|
||||
_jointsDirty = true;
|
||||
}
|
||||
|
||||
ImGui::TableNextRow();
|
||||
ImGui::TableSetColumnIndex(0);
|
||||
drawAlignedText("Arms");
|
||||
ImGui::TableSetColumnIndex(1);
|
||||
ImGui::PushStyleVar(ImGuiStyleVar_CellPadding, ImVec2{2.0f, 1.0f});
|
||||
if(ImGui::BeginTable("##UpperLowerArmsLayoutTable", 2)) {
|
||||
ImGui::TableSetupColumn("##UpperArms", ImGuiTableColumnFlags_WidthStretch);
|
||||
ImGui::TableSetupColumn("##LowerArms", ImGuiTableColumnFlags_WidthStretch);
|
||||
|
||||
ImGui::TableNextColumn();
|
||||
ImGui::SetNextItemWidth(-1.0f);
|
||||
if(ImGui::SliderFloat("##UpperArmsSlider", &_currentMass->jointSliders().upperArms, 0.0f, 1.0f, "Upper: %.3f")) {
|
||||
_jointsDirty = true;
|
||||
}
|
||||
ImGui::TableNextColumn();
|
||||
ImGui::SetNextItemWidth(-1.0f);
|
||||
if(ImGui::SliderFloat("##LowerArmsSlider", &_currentMass->jointSliders().lowerArms, 0.0f, 1.0f, "Lower: %.3f")) {
|
||||
_jointsDirty = true;
|
||||
}
|
||||
|
||||
ImGui::EndTable();
|
||||
}
|
||||
ImGui::PopStyleVar();
|
||||
|
||||
ImGui::TableNextRow();
|
||||
ImGui::TableSetColumnIndex(0);
|
||||
drawAlignedText("Legs");
|
||||
ImGui::TableSetColumnIndex(1);
|
||||
ImGui::PushStyleVar(ImGuiStyleVar_CellPadding, ImVec2{2.0f, 1.0f});
|
||||
if(ImGui::BeginTable("##UpperLowerLegsLayoutTable", 2)) {
|
||||
ImGui::TableSetupColumn("##UpperLegs", ImGuiTableColumnFlags_WidthStretch);
|
||||
ImGui::TableSetupColumn("##LowerLegs", ImGuiTableColumnFlags_WidthStretch);
|
||||
|
||||
ImGui::TableNextColumn();
|
||||
ImGui::SetNextItemWidth(-1.0f);
|
||||
if(ImGui::SliderFloat("##UpperLegsSlider", &_currentMass->jointSliders().upperLegs, 0.0f, 1.0f, "Upper: %.3f")) {
|
||||
_jointsDirty = true;
|
||||
}
|
||||
ImGui::TableNextColumn();
|
||||
ImGui::SetNextItemWidth(-1.0f);
|
||||
if(ImGui::SliderFloat("##LowerLegsSlider", &_currentMass->jointSliders().lowerLegs, 0.0f, 1.0f, "Lower: %.3f")) {
|
||||
_jointsDirty = true;
|
||||
}
|
||||
|
||||
ImGui::EndTable();
|
||||
}
|
||||
ImGui::PopStyleVar();
|
||||
|
||||
ImGui::EndTable();
|
||||
}
|
||||
if(ImGui::SliderFloat("##BodySlider", &_currentMass->jointSliders().body, 0.0f, 1.0f)) {
|
||||
_jointsDirty = true;
|
||||
}
|
||||
if(ImGui::SliderFloat("##ShouldersSlider", &_currentMass->jointSliders().shoulders, 0.0f, 1.0f)) {
|
||||
_jointsDirty = true;
|
||||
}
|
||||
if(ImGui::SliderFloat("##HipsSlider", &_currentMass->jointSliders().hips, 0.0f, 1.0f)) {
|
||||
_jointsDirty = true;
|
||||
}
|
||||
ImGui::PushMultiItemsWidths(2, ImGui::CalcItemWidth());
|
||||
if(ImGui::SliderFloat("##UpperArmsSlider", &_currentMass->jointSliders().upperArms, 0.0f, 1.0f, "Upper: %.3f")) {
|
||||
_jointsDirty = true;
|
||||
}
|
||||
ImGui::PopItemWidth();
|
||||
ImGui::SameLine(0.0f, ImGui::GetStyle().ItemInnerSpacing.x);
|
||||
if(ImGui::SliderFloat("##LowerArmsSlider", &_currentMass->jointSliders().lowerArms, 0.0f, 1.0f, "Lower: %.3f")) {
|
||||
_jointsDirty = true;
|
||||
}
|
||||
ImGui::PopItemWidth();
|
||||
ImGui::PushMultiItemsWidths(2, ImGui::CalcItemWidth());
|
||||
if(ImGui::SliderFloat("##UpperLegsSlider", &_currentMass->jointSliders().upperLegs, 0.0f, 1.0f, "Upper: %.3f")) {
|
||||
_jointsDirty = true;
|
||||
}
|
||||
ImGui::PopItemWidth();
|
||||
ImGui::SameLine(0.0f, ImGui::GetStyle().ItemInnerSpacing.x);
|
||||
if(ImGui::SliderFloat("##LowerLegsSlider", &_currentMass->jointSliders().lowerLegs, 0.0f, 1.0f, "Lower: %.3f")) {
|
||||
_jointsDirty = true;
|
||||
}
|
||||
ImGui::PopItemWidth();
|
||||
ImGui::PopItemWidth();
|
||||
ImGui::EndGroup();
|
||||
|
||||
if(!_jointsDirty) {
|
||||
ImGui::BeginDisabled();
|
||||
|
@ -175,14 +218,9 @@ Application::drawFrameStyles() {
|
|||
|
||||
ImGui::PushID(i);
|
||||
|
||||
ImGui::PushItemWidth(-1.0f);
|
||||
if(ImGui::BeginCombo("##Style",
|
||||
getStyleName(_currentMass->frameStyles()[i], _currentMass->frameCustomStyles()).data()))
|
||||
{
|
||||
if(ImGui::BeginCombo("##Style", getStyleName(_currentMass->frameStyles()[i], _currentMass->frameCustomStyles()).data())) {
|
||||
for(const auto& style : GameData::style_names) {
|
||||
if(ImGui::Selectable(getStyleName(style.first, _currentMass->frameCustomStyles()).data(),
|
||||
_currentMass->frameStyles()[i] == style.first))
|
||||
{
|
||||
if(ImGui::Selectable(getStyleName(style.first, _currentMass->frameCustomStyles()).data(), _currentMass->frameStyles()[i] == style.first)) {
|
||||
_currentMass->frameStyles()[i] = style.first;
|
||||
_stylesDirty = true;
|
||||
}
|
||||
|
@ -190,7 +228,6 @@ Application::drawFrameStyles() {
|
|||
|
||||
ImGui::EndCombo();
|
||||
}
|
||||
ImGui::PopItemWidth();
|
||||
|
||||
ImGui::PopID();
|
||||
}
|
||||
|
|
|
@ -506,7 +506,7 @@ Application::drawWeaponEditor(GameObjects::Weapon& weapon) {
|
|||
}
|
||||
}
|
||||
|
||||
if(ImGui::BeginChild("##PartDetails", {}, ImGuiChildFlags_Border)) {
|
||||
if(ImGui::BeginChild("##PartDetails", {0.0f, 0.0f}, true)) {
|
||||
ImGui::TextUnformatted("Styles:");
|
||||
|
||||
for(std::int32_t i = 0; i < 4; i++) {
|
||||
|
|
|
@ -305,7 +305,7 @@ Application::drawBackupListPopup() {
|
|||
ImGui::EndTable();
|
||||
}
|
||||
|
||||
ImGui::PushTextWrapPos(ImGui::GetContentRegionAvail().x);
|
||||
ImGui::PushTextWrapPos(ImGui::GetWindowContentRegionWidth());
|
||||
ImGui::TextUnformatted("Hover over a company name to see which files are included in the backup.");
|
||||
ImGui::PopTextWrapPos();
|
||||
|
||||
|
|
|
@ -86,10 +86,9 @@ Application::drawAbout() {
|
|||
ImGui::Separator();
|
||||
|
||||
if(ImGui::CollapsingHeader("Licence")) {
|
||||
ImGui::TextWrapped("This application is made available under the terms of the GNU General Public License,"
|
||||
"version 3, the full text of which is available below:");
|
||||
ImGui::TextWrapped("This application is made available under the terms of the GNU General Public License, version 3, the full text of which is available below:");
|
||||
|
||||
if(ImGui::BeginChild("##GPL", {0.0f, float(windowSize().y()) * 0.3f}, ImGuiChildFlags_Border)) {
|
||||
if(ImGui::BeginChild("##GPL", {0.0f, float(windowSize().y()) * 0.3f}, true)) {
|
||||
static auto licence = _rs.getRaw("COPYING");
|
||||
ImGui::PushFont(ImGui::GetIO().Fonts->Fonts[1]);
|
||||
ImGui::TextUnformatted(licence.begin(), licence.end());
|
||||
|
|
|
@ -26,8 +26,8 @@ if(CORRADE_TARGET_WINDOWS)
|
|||
endif()
|
||||
find_package(Magnum REQUIRED GL Sdl2Application)
|
||||
find_package(MagnumIntegration REQUIRED ImGui)
|
||||
find_package(CURL REQUIRED HTTPS)
|
||||
if(SAVETOOL_USE_SYSTEM_LIBS)
|
||||
find_package(CURL REQUIRED HTTPS)
|
||||
find_package(libzip REQUIRED)
|
||||
find_package(efsw REQUIRED)
|
||||
endif()
|
||||
|
|
|
@ -142,7 +142,7 @@ ProfileManager::backupProfile(std::size_t index, bool backup_builds) {
|
|||
auto& profile = _profiles[index];
|
||||
|
||||
auto filename = Utility::format("{}_{}{:.2d}{:.2d}_{:.2d}{:.2d}{:.2d}.backup.mbst",
|
||||
Utility::String::replaceAll(profile.companyName().data(), " ", "_").data(),
|
||||
Utility::String::replaceAll(profile.companyName().data(), " ", "_").c_str(),
|
||||
time->tm_year + 1900, time->tm_mon + 1, time->tm_mday,
|
||||
time->tm_hour, time->tm_min, time->tm_sec);
|
||||
|
||||
|
|
2
third-party/SDL
vendored
2
third-party/SDL
vendored
|
@ -1 +1 @@
|
|||
Subproject commit 01346723455a37c1cd14bba28ebeffe268002bcd
|
||||
Subproject commit f032e8c19165aeee6f9b47e82fb56809d4aeae1e
|
2
third-party/corrade
vendored
2
third-party/corrade
vendored
|
@ -1 +1 @@
|
|||
Subproject commit 4922edf269ce77efe073f6b750a34892e1f3c30d
|
||||
Subproject commit 183b375b73fa3e819a6b41dbcc0cf2f06773d2b4
|
2
third-party/curl
vendored
2
third-party/curl
vendored
|
@ -1 +1 @@
|
|||
Subproject commit a4ed3e766a68ff7517ee9cf3cb71c7255e8ee9b0
|
||||
Subproject commit 864090ca39c3c9fe994104ed23d29c37caa61a8e
|
2
third-party/efsw
vendored
2
third-party/efsw
vendored
|
@ -1 +1 @@
|
|||
Subproject commit bc85bafae7d7b641e326ed5d01bfffd5eb0352f5
|
||||
Subproject commit 19398b80bc5161b9a890035d1de47244165c2f17
|
2
third-party/imgui
vendored
2
third-party/imgui
vendored
|
@ -1 +1 @@
|
|||
Subproject commit 7965494ff323c8a3232ac1233a08b984e3c981ae
|
||||
Subproject commit f617fe7890f78bc300e7a068a1c2acc9e9ce1e97
|
2
third-party/libzip
vendored
2
third-party/libzip
vendored
|
@ -1 +1 @@
|
|||
Subproject commit 0b6ebe6fad8adb1ec95bb5529c5af2185d40c2cf
|
||||
Subproject commit bdc03ab23b703fcc516436d6ebcbfb6ac4484033
|
2
third-party/magnum
vendored
2
third-party/magnum
vendored
|
@ -1 +1 @@
|
|||
Subproject commit b91b0b24cde81a4eb9029cb2202b3a652c9bd0e9
|
||||
Subproject commit 0d31f7461b31698ea5bf92ec66ff5056a6ad7360
|
2
third-party/magnum-integration
vendored
2
third-party/magnum-integration
vendored
|
@ -1 +1 @@
|
|||
Subproject commit bb8a4a870f217fc9ac15ff0ddc145974be49a5e7
|
||||
Subproject commit 35c05fda3e243b696e2b3a3dcd230c819ca108e0
|
Loading…
Reference in a new issue