diff --git a/.clangd b/.clangd index 24cd55e..9526b48 100644 --- a/.clangd +++ b/.clangd @@ -1,2 +1,12 @@ CompileFlags: CompilationDatabase: bin + Add: + [ + "--target=x86_64-w64-mingw32", + "-IC:/msys64/ucrt64/include", + "-IC:/msys64/ucrt64/include/ucrt", + "-IC:/msys64/ucrt64/include/crt", + "-IC:/msys64/ucrt64/include/c++/12.2.0", + "-IC:/msys64/ucrt64/include/c++/12.2.0/x86_64-w64-mingw32", + "-IC:/msys64/ucrt64/usr/include", + ] diff --git a/CMakeLists.txt b/CMakeLists.txt index 1af0e50..9d355cb 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -125,7 +125,7 @@ target_include_directories(${OMNIA_GFX_LIB} PUBLIC ${INCLUDE_DIRS}) target_include_directories(${TEST_TARGET} PUBLIC ${INCLUDE_DIRS}) if (WIN32) -set(MSYS2_UCRT64 "C:/msys64/ucrt64") + set(MSYS2_UCRT64 "C:/msys64/ucrt64") target_include_directories(${OMNIA_STD_LIB} PRIVATE "${MSYS2_UCRT64}/include" "${MSYS2_UCRT64}/include/c++/13.2.0" diff --git a/README.md b/README.md index facc846..e6f566e 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ Once you have the **MSYS2 UCRT64 terminal** open, run theese two commands to pre ```bash pacman -Syuu -pacman -S --needed base-devel mingw-w64-ucrt-x86_64-clang mingw-w64-ucrt-x86_64-gdb mingw-w64-ucrt-x86_64-cmake mingw-w64-ucrt-x86_64-make mingw-w64-ucrt-x86_64-boost mingw-w64-ucrt-x86_64-SDL3 mingw-w64-ucrt-x86_64-SDL3_mixer mingw-w64-ucrt-x86_64-SDL3_image mingw-w64-ucrt-x86_64-SDL3_ttf +pacman -S --needed base-devel mingw-w64-ucrt-x86_64-clang mingw-w64-ucrt-x86_64-gdb mingw-w64-ucrt-x86_64-cmake mingw-w64-ucrt-x86_64-make mingw-w64-ucrt-x86_64-boost mingw-w64-ucrt-x86_64-sdl3 mingw-w64-ucrt-x86_64-sdl3-image mingw-w64-ucrt-x86_64-sdl3-ttf ``` #### Step 3: build OmniaFramework diff --git a/build b/build index b64c3fb..09cb46b 100755 --- a/build +++ b/build @@ -21,6 +21,7 @@ if [[ "$1" == "debug" || "$1" == "release" ]]; then rm -rf bin cmake -B bin -S ./ -G "$MAKEFILE_TYPE" -DCMAKE_BUILD_TYPE=$BUILD_TYPE $MAKE_COMMAND -C bin $NJOBS --no-print-directory + mkdir -p extra find extra -mindepth 1 -maxdepth 1 -exec cp -r {} bin/ \; build_number=$(cat other/build.nr) build_number=$((build_number + 1)) diff --git a/other/build.nr b/other/build.nr index b92935d..6be8278 100644 --- a/other/build.nr +++ b/other/build.nr @@ -1 +1 @@ -2035 +2039 diff --git a/src/ogfx/gui/Window.cpp b/src/ogfx/gui/Window.cpp index 334175f..9ff4009 100644 --- a/src/ogfx/gui/Window.cpp +++ b/src/ogfx/gui/Window.cpp @@ -45,11 +45,13 @@ namespace ogfx m_title = title; setBlockingEventsRefreshFPS(DefaultBlockingEventsFPS); - m_window = SDL_CreateWindow("", SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, SDL_WINDOW_RESIZABLE); + m_window = SDL_CreateWindow("", m_windowWidth, m_windowHeight, SDL_WINDOW_RESIZABLE); m_renderer = SDL_CreateRenderer(m_window, nullptr); SDL_SetWindowMinimumSize(m_window, m_windowWidth, m_windowHeight); + SDL_SetWindowPosition(m_window, SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED); SDL_SetWindowTitle(m_window, m_title.c_str()); SDL_StartTextInput(m_window); + SDL_ShowWindow(m_window); m_cursor_Arrow = SDL_CreateSystemCursor(SDL_SystemCursor::SDL_SYSTEM_CURSOR_DEFAULT); m_cursor_IBeam = SDL_CreateSystemCursor(SDL_SystemCursor::SDL_SYSTEM_CURSOR_TEXT); diff --git a/src/test/GraphicsWindowTest.cpp b/src/test/GraphicsWindowTest.cpp index 0f083af..cd5a453 100644 --- a/src/test/GraphicsWindowTest.cpp +++ b/src/test/GraphicsWindowTest.cpp @@ -56,12 +56,12 @@ class Window : public ogfx::GraphicsWindow return; if (data.eventType == ogfx::gui::RawTextInput::eActionEventType::Enter) { - out.fg(ostd::ConsoleColors::Green).p(data.sender.getText()).reset().nl(); + out().fg(ostd::ConsoleColors::Green).p(data.sender.getText()).reset().nl(); data.sender.setText(""); } else if (data.eventType == ogfx::gui::RawTextInput::eActionEventType::Tab) { - out.fg(ostd::ConsoleColors::Red).p("TAB").reset().nl(); + out().fg(ostd::ConsoleColors::Red).p("TAB").reset().nl(); data.sender.appendText("TAB"); } }