Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 15 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ jobs:
- name: Build 2Ship
run: |
export PATH="/usr/lib/ccache:/opt/homebrew/opt/ccache/libexec:/usr/local/opt/ccache/libexec:$PATH"
cmake --no-warn-unused-cli -H. -Bbuild-cmake -GNinja -DCMAKE_BUILD_TYPE:STRING=Release -DCMAKE_OSX_ARCHITECTURES="x86_64;arm64"
cmake --no-warn-unused-cli -H. -Bbuild-cmake -GNinja -DCMAKE_BUILD_TYPE:STRING=Release -DCMAKE_OSX_ARCHITECTURES="x86_64;arm64" -DBUILD_NETWORKING=1
cmake --build build-cmake --config Release --parallel 10
(cd build-cmake && cpack)

Expand Down Expand Up @@ -207,6 +207,18 @@ jobs:
cmake ..
make
sudo make install
- name: Install latest SDL_net
run: |
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
if [ ! -d "SDL2_net-2.2.0" ]; then
wget https://www.libsdl.org/projects/SDL_net/release/SDL2_net-2.2.0.tar.gz
tar -xzf SDL2_net-2.2.0.tar.gz
fi
cd SDL2_net-2.2.0
./configure
make -j 10
sudo make install
sudo cp -av /usr/local/lib/libSDL* /lib/x86_64-linux-gnu/
- name: Install libzip without crypto
run: |
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
Expand All @@ -229,7 +241,7 @@ jobs:
- name: Build 2Ship
run: |
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
cmake --no-warn-unused-cli -H. -Bbuild-cmake -GNinja -DCMAKE_BUILD_TYPE:STRING=Release -DBUILD_REMOTE_CONTROL=1
cmake --no-warn-unused-cli -H. -Bbuild-cmake -GNinja -DCMAKE_BUILD_TYPE:STRING=Release -DBUILD_NETWORKING=1
cmake --build build-cmake --config Release -j3
(cd build-cmake && cpack -G External)

Expand Down Expand Up @@ -296,7 +308,7 @@ jobs:
VCPKG_ROOT: ${{github.workspace}}/vcpkg
run: |
set $env:PATH="$env:USERPROFILE/.cargo/bin;$env:PATH"
cmake -S . -B build-windows -G Ninja -DCMAKE_MAKE_PROGRAM=ninja -DCMAKE_BUILD_TYPE:STRING=Release -DCMAKE_C_COMPILER_LAUNCHER=sccache -DCMAKE_CXX_COMPILER_LAUNCHER=sccache
cmake -S . -B build-windows -G Ninja -DCMAKE_MAKE_PROGRAM=ninja -DCMAKE_BUILD_TYPE:STRING=Release -DCMAKE_C_COMPILER_LAUNCHER=sccache -DCMAKE_CXX_COMPILER_LAUNCHER=sccache -DBUILD_NETWORKING=1
cmake --build build-windows --config Release --parallel 10

(cd build-windows && cpack)
Expand Down
6 changes: 0 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,6 @@ if (CMAKE_SYSTEM_NAME STREQUAL "Windows")
endif()
endif()

if (CMAKE_SYSTEM_NAME MATCHES "Windows|Linux")
if(NOT DEFINED BUILD_CROWD_CONTROL)
set(BUILD_CROWD_CONTROL OFF)
endif()
endif()

# Enable the Gfx debugger in LUS to use libgfxd from ZAPDTR
set(GFX_DEBUG_DISASSEMBLER ON)

Expand Down
6 changes: 6 additions & 0 deletions mm/2s2h/BenGui/BenGui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
#include "DeveloperTools/EventLog.h"
#include "DeveloperTools/DLViewer.h"
#include "DeveloperTools/MessageViewer.h"
#include "2s2h/Network/Anchor/Anchor.h"

namespace BenGui {
// MARK: - Delegates
Expand Down Expand Up @@ -67,6 +68,7 @@ std::shared_ptr<TimesplitsSettingsWindow> mTimesplitsSettingsWindow;
std::shared_ptr<InputViewer> mInputViewer;
std::shared_ptr<InputViewerSettingsWindow> mInputViewerSettings;
std::shared_ptr<BenModalWindow> mModalWindow;
std::shared_ptr<AnchorRoomWindow> mAnchorRoomWindow;

UIWidgets::Colors GetMenuThemeColor() {
return mBenMenu->GetMenuThemeColor();
Expand Down Expand Up @@ -184,6 +186,9 @@ void SetupGuiElements() {
mModalWindow = std::make_shared<BenModalWindow>("gWindows.ModalWindow", "Modal Window");
gui->AddGuiWindow(mModalWindow);
mModalWindow->Show();

mAnchorRoomWindow = std::make_shared<AnchorRoomWindow>("gWindows.AnchorRoom", "Anchor Room");
gui->AddGuiWindow(mAnchorRoomWindow);
}

void Destroy() {
Expand Down Expand Up @@ -215,6 +220,7 @@ void Destroy() {
mItemTrackerSettingsWindow = nullptr;
mInputViewer = nullptr;
mInputViewerSettings = nullptr;
mAnchorRoomWindow = nullptr;
}

void RegisterPopup(std::string title, std::string message, std::string button1, std::string button2,
Expand Down
2 changes: 1 addition & 1 deletion mm/2s2h/BenGui/Menu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -602,7 +602,7 @@ void Menu::DrawElement() {
for (auto& label : menuOrder) {
ImVec2 size = ImGui::CalcTextSize(label.c_str());
headerSizes.push_back(size);
headerWidth += size.x + style.FramePadding.x * 2;
headerWidth += size.x + style.FramePadding.x * 2 + style.ItemSpacing.x;
if (label == headerIndex) {
headerWidth += style.ItemSpacing.x;
}
Expand Down
21 changes: 12 additions & 9 deletions mm/2s2h/BenGui/UIWidgets.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -883,15 +883,18 @@ bool InputString(const char* label, std::string* value, const InputOptions& opti
ImGui::PushStyleColor(ImGuiCol_Border, ColorValues.at(Colors::Red));
}
float width = (options.size == ImVec2(0, 0)) ? ImGui::GetContentRegionAvail().x : options.size.x;
if (options.alignment == ComponentAlignment::Left) {
if (options.labelPosition == LabelPosition::Above) {
ImGui::Text(label, *value->c_str());
}
} else if (options.alignment == ComponentAlignment::Right) {
if (options.labelPosition == LabelPosition::Above) {
ImGui::NewLine();
ImGui::SameLine(width - ImGui::CalcTextSize(label).x);
ImGui::Text(label, *value->c_str());
ImVec2 labelSize = ImGui::CalcTextSize(label, NULL, true);
if (labelSize.x != 0) {
if (options.alignment == ComponentAlignment::Left) {
if (options.labelPosition == LabelPosition::Above) {
ImGui::Text(label, *value->c_str());
}
} else if (options.alignment == ComponentAlignment::Right) {
if (options.labelPosition == LabelPosition::Above) {
ImGui::NewLine();
ImGui::SameLine(width - ImGui::CalcTextSize(label).x);
ImGui::Text(label, *value->c_str());
}
}
}
ImGui::SetNextItemWidth(width);
Expand Down
Loading
Loading