Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor fixes and improvements on settings #447

Merged
merged 33 commits into from
May 5, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
0dc5c59
Adjusted bottom paddings of the setting page.
123jimin Apr 6, 2021
ead9a2f
Added fullscreen and window pos adjusting settings
123jimin Apr 6, 2021
43f14ce
Added window position storing and adjusting window positions
123jimin Apr 7, 2021
7258303
Changed locations of settings and other minor stuffs
123jimin Apr 7, 2021
098280d
Fixed a complaint by Linux CI
123jimin Apr 7, 2021
7083ed8
Add input offset when updating lasers, fix db update statement and ma…
ASleepyCat Apr 8, 2021
f2c9f7b
Merge pull request #448 from ASleepyCat/slam-timing
Drewol Apr 8, 2021
1fdfd24
Fixed a bug where string skin settings were not loaded properly
123jimin Apr 9, 2021
0c7b216
Reverted on when `SettingsPage::Load` and `Save` is called
123jimin Apr 9, 2021
2c5e7f2
Merge pull request #449 from 123jimin/202104-skin-text-setting-fix
Drewol Apr 9, 2021
f3dea05
Change hispeed adjustment to steps of 0.1
Drewol Apr 9, 2021
243e406
New default song select background
Drewol Apr 10, 2021
c6c7133
Bumped up all projects' C++ versoins to C++17
123jimin Apr 12, 2021
ec920c5
Enabled multiprocessor compiling for all major projects
123jimin Apr 12, 2021
c1e9efb
Reverted wrongly committed file
123jimin Apr 12, 2021
778d92d
Merge pull request #451 from 123jimin/202104-vexillology
Drewol Apr 12, 2021
f76bace
Remove '-j' from CI builds
Drewol Apr 12, 2021
f15cec6
Add 'brew update' to mac CI
Drewol Apr 12, 2021
5284dcc
Remove cmake from macos CI brew install
Drewol Apr 12, 2021
9bccd23
Fix a case where auto laser time wouldn't be decremented
ASleepyCat Apr 13, 2021
afd52a9
Merge pull request #453 from ASleepyCat/laser-fix
Drewol Apr 13, 2021
2886fe5
Fix regression in laser logic when turning in the opposite direction …
ASleepyCat Apr 13, 2021
e47cf09
Fix indentation
ASleepyCat Apr 13, 2021
1c88047
Fix more indentation
ASleepyCat Apr 13, 2021
cd86945
Merge pull request #454 from ASleepyCat/laser-fix-2
Drewol Apr 13, 2021
12fd407
Adjusted bottom paddings of the setting page.
123jimin Apr 6, 2021
5168e1e
Added fullscreen and window pos adjusting settings
123jimin Apr 6, 2021
9e5ed71
Added window position storing and adjusting window positions
123jimin Apr 7, 2021
0478529
Changed locations of settings and other minor stuffs
123jimin Apr 7, 2021
a7ec787
Fixed a complaint by Linux CI
123jimin Apr 7, 2021
e1b8252
Merge branch '202104-small-fix-2' of https://github.com/123jimin/unna…
123jimin Apr 14, 2021
dad6426
"Fixed" nuklear not being able to create a square font texture
123jimin Apr 16, 2021
e37e525
Adjusted font ranges; applied font atlas changes to ChatOverlay
123jimin Apr 16, 2021
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
4 changes: 3 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,10 @@ jobs:
uses: actions/checkout@v1
- name: Checkout submodules
run: git submodule update --init --recursive
- name: brew update
run: brew update
- name: Install packages
run: brew install cmake freetype libvorbis sdl2 libpng jpeg libarchive
run: brew install freetype libvorbis sdl2 libpng jpeg libarchive
- name: cmake
run: cmake . -DLibArchive_LIBRARY=/usr/local/opt/libarchive/lib/libarchive.dylib -DLibArchive_INCLUDE_DIR=/usr/local/opt/libarchive/include -DCMAKE_BUILD_TYPE=Release
- name: make
Expand Down
5 changes: 5 additions & 0 deletions Audio/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -60,3 +60,8 @@ target_link_libraries(Audio ${OGG_LIBRARIES})
target_link_libraries(Audio ${Vorbis_LIBRARIES})

target_link_libraries(Audio cc-common)

# Enable multiprocess compiling
if(MSVC)
target_compile_options(Audio PRIVATE /MP)
endif(MSVC)
7 changes: 6 additions & 1 deletion Beatmap/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ source_group("" FILES ${PCH_FILES})
enable_precompiled_headers("${BEATMAP_SRC}" ${PCH_SRC})

add_library(Beatmap ${BEATMAP_SRC} ${PCH_FILES})
target_compile_features(Beatmap PUBLIC cxx_std_14)
target_compile_features(Beatmap PUBLIC cxx_std_17)
target_include_directories(Beatmap PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/include)
target_include_directories(Beatmap PRIVATE
${INCROOT}
Expand All @@ -42,3 +42,8 @@ target_link_libraries(Beatmap sqlite3)
target_link_libraries(Beatmap nlohmann_json)

target_link_libraries(Beatmap cc-common)

# Enable multiprocess compiling
if(MSVC)
target_compile_options(Beatmap PRIVATE /MP)
endif(MSVC)
2 changes: 1 addition & 1 deletion Beatmap/src/MapDatabase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,7 @@ class MapDatabase_Impl
if (gotVersion == 18)
{
m_database.Exec("ALTER TABLE Scores ADD COLUMN window_slam INTEGER");
m_database.Exec("UPDATE Scores SET window_miss=75");
m_database.Exec("UPDATE Scores SET window_slam=84");
gotVersion = 19;
}
m_database.Exec(Utility::Sprintf("UPDATE Database SET `version`=%d WHERE `rowid`=1", m_version));
Expand Down
7 changes: 6 additions & 1 deletion GUI/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ source_group("" FILES ${PCH_FILES})
enable_precompiled_headers("${GUI_SRC}" ${PCH_SRC})

add_library(GUI ${GUI_SRC} ${PCH_FILES})
target_compile_features(GUI PUBLIC cxx_std_14)
target_compile_features(GUI PUBLIC cxx_std_17)
target_include_directories(GUI PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/include)
target_include_directories(GUI PRIVATE
${SRCROOT}
Expand All @@ -37,3 +37,8 @@ target_link_libraries(GUI Graphics)
target_link_libraries(GUI lua)

target_link_libraries(GUI cc-common)

# Enable multiprocess compiling
if(MSVC)
target_compile_options(GUI PRIVATE /MP)
endif(MSVC)
7 changes: 6 additions & 1 deletion Graphics/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ source_group("" FILES ${PCH_FILES})
enable_precompiled_headers("${GRAPHICS_SRC}" ${PCH_SRC})

add_library(Graphics ${GRAPHICS_SRC} ${PCH_FILES})
target_compile_features(Graphics PUBLIC cxx_std_14)
target_compile_features(Graphics PUBLIC cxx_std_17)
target_include_directories(Graphics PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/include)
target_include_directories(Graphics PRIVATE
${INCROOT}
Expand Down Expand Up @@ -58,3 +58,8 @@ if(UNIX)
endif(UNIX)

target_link_libraries(Graphics cc-common)

# Enable multiprocess compiling
if(MSVC)
target_compile_options(Graphics PRIVATE /MP)
endif(MSVC)
44 changes: 38 additions & 6 deletions Graphics/include/Graphics/Window.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@

namespace Graphics
{
// Windowed or bordered window style
/// Windowed or bordered window style
enum class WindowStyle
{
Windowed, Borderless
};

// Text input data
/// Text input data
struct TextComposition
{
String composition;
Expand All @@ -26,6 +26,39 @@ namespace Graphics
class Window : Unique
{
public:
/// Window position and size parameter
struct PosAndShape
{
enum class Mode { Windowed, Fullscreen, WindowedFullscreen };
Mode mode;

PosAndShape(bool fullscreen, bool windowedFullscreen, const Vector2i& pos, const Vector2i& size, int32 monitorId, const Vector2i& fullscreenSize)
: PosAndShape(FlagsToMode(fullscreen, windowedFullscreen), pos, size, monitorId, fullscreenSize) {}

PosAndShape(Mode mode, const Vector2i& pos, const Vector2i& size, int32 monitorId, const Vector2i& fullscreenSize)
: mode(mode), windowPos(pos), windowSize(size), monitorId(monitorId), fullscreenSize(fullscreenSize){}

inline static Mode FlagsToMode(bool fullscreen, bool windowedFullscreen)
{
return fullscreen ? windowedFullscreen ? Mode::WindowedFullscreen : Mode::Fullscreen : Mode::Windowed;
}

inline void SetMode(bool fullscreen, bool windowedFullscreen)
{
mode = FlagsToMode(fullscreen, windowedFullscreen);
}

/// Position of the window; ignored when in fullscreen mode
Vector2i windowPos;
/// Size of the window; ignored when in fullscreen mode
Vector2i windowSize;

/// Monitor to use when in fullscreen; ignored when in windowed mode
int32 monitorId;
/// Only used for windowed fullscreen mode
Vector2i fullscreenSize;
};

Window(Vector2i size = Vector2i(800, 600), uint8 samplecount = 0);
~Window();
// Show the window
Expand Down Expand Up @@ -56,8 +89,6 @@ namespace Graphics

// Get full window position
Vector2i GetWindowPos() const;
// Set full window position
void SetWindowPos(const Vector2i& pos);

// Window Client area size
Vector2i GetWindowSize() const;
Expand All @@ -67,9 +98,9 @@ namespace Graphics

// Window is active
bool IsActive() const;

// Set window client area size
void SetWindowSize(const Vector2i& size);
void SwitchFullscreen(int w, int h, int fsw = -1, int fsh = -1, uint32 monitorID = -1, bool windowedFullscreen = false);
void SetPosAndShape(const PosAndShape& posAndShape, bool ensureInBound);
bool IsFullscreen() const;

int GetDisplayIndex() const;
Expand Down Expand Up @@ -118,6 +149,7 @@ namespace Graphics
Delegate<const String&> OnTextInput;
Delegate<const TextComposition&> OnTextComposition;
Delegate<const Vector2i&> OnResized;
Delegate<const Vector2i&> OnMoved;
Delegate<bool> OnFocusChanged;

private:
Expand Down
Loading