diff --git a/.github/workflows/Build_Win64_DX12.yml b/.github/workflows/Build_Win64_DX12.yml index d3544a30d..f3d92265d 100644 --- a/.github/workflows/Build_Win64_DX12.yml +++ b/.github/workflows/Build_Win64_DX12.yml @@ -195,7 +195,7 @@ jobs: "description": "A new version of VGFramework is available", "color": 15579707, "thumbnail": { - "url": "https://github.com/vimontgames/vgframework/blob/master/doc/img/newversion.png?raw=true" + "url": "https://github.com/vimontgames/vgframework/blob/master/doc/img/version.png?raw=true" }, "author": { "name": "$($env:GITHUB_ACTOR)", diff --git a/.github/workflows/Win64_DX12_Release.yml b/.github/workflows/Win64_DX12_Release.yml index 421570447..a3488a19d 100644 --- a/.github/workflows/Win64_DX12_Release.yml +++ b/.github/workflows/Win64_DX12_Release.yml @@ -64,4 +64,68 @@ jobs: working-directory: ${{ env.GITHUB_WORKSPACE }} # Add additional options to the MSBuild command line here (like platform or verbosity level). # See https://docs.microsoft.com/visualstudio/msbuild/msbuild-command-line-reference - run: msbuild /m /p:Configuration=${{ env.BUILD_CONFIGURATION }} /p:Platform=${{ env.BUILD_PLATFORM }} ${{ env.SOLUTION_FILE_PATH }} \ No newline at end of file + run: msbuild /m /p:Configuration=${{ env.BUILD_CONFIGURATION }} /p:Platform=${{ env.BUILD_PLATFORM }} ${{ env.SOLUTION_FILE_PATH }} + + - name: Success Notification + if: ${{ success() }} + run: | + $DISCORD_BUILD_WEBHOOK_URL = "${{ secrets.DISCORD_BUILD_WEBHOOK_URL }}" + + $jsonPayload = @" + { + "username": "GitHub", + "content": "", + "embeds": [ + { + "type": "rich", + "title": "Win64 DX12 Release", + "description": "The build succeeded", + "color": 2674853, + "thumbnail": { + "url": "https://github.com/vimontgames/vgframework/blob/master/doc/img/buildsuccess.png?raw=true" + }, + "author": { + "name": "$($env:GITHUB_ACTOR)", + "url": "https://github.com/$($env:GITHUB_ACTOR)", + "icon_url": "https://avatars.githubusercontent.com/u/$($env:GITHUB_ACTOR_ID)?v=4" + }, + "url": "https://github.com/vimontgames/vgframework" + } + ] + } + "@ + + $RESPONSE = curl -H "Content-Type: application/json" -X POST -d $jsonPayload $DISCORD_BUILD_WEBHOOK_URL + Write-Output "Webhook server response: $RESPONSE" + + - name: Failure Notification + if: ${{ failure() }} + run: | + $DISCORD_BUILD_WEBHOOK_URL = "${{ secrets.DISCORD_BUILD_WEBHOOK_URL }}" + + $jsonPayload = @" + { + "username": "GitHub", + "content": "", + "embeds": [ + { + "type": "rich", + "title": "Win64 DX12 Release", + "description": "The build has failed", + "color": 14473477, + "thumbnail": { + "url": "https://github.com/vimontgames/vgframework/blob/master/doc/img/buildfailed.png?raw=true" + }, + "author": { + "name": "$($env:GITHUB_ACTOR)", + "url": "https://github.com/$($env:GITHUB_ACTOR)", + "icon_url": "https://avatars.githubusercontent.com/u/$($env:GITHUB_ACTOR_ID)?v=4" + }, + "url": "https://github.com/vimontgames/vgframework" + } + ] + } + "@ + + $RESPONSE = curl -H "Content-Type: application/json" -X POST -d $jsonPayload $DISCORD_BUILD_WEBHOOK_URL + Write-Output "Webhook server response: $RESPONSE" diff --git a/src/editor/ImGui/Window/ImGuiWindow.cpp b/src/editor/ImGui/Window/ImGuiWindow.cpp index 218d35db1..b5bd23703 100644 --- a/src/editor/ImGui/Window/ImGuiWindow.cpp +++ b/src/editor/ImGui/Window/ImGuiWindow.cpp @@ -1683,7 +1683,7 @@ namespace vg::editor { ImGui::SetCursorPosY(ImGui::GetCursorPosY() - style::draganddrop::interlineSize.y - 1); - string label = fmt::sprintf("###%s %s", asString(type), component->GetName().c_str()); + string label = fmt::sprintf("###%s %u", asString(type), component->GetUID(false) ? (uint_ptr)component->GetUID() : (uint_ptr)component); ImGui::InvisibleButton(label.c_str(), style::draganddrop::interlineSize); // debug @@ -1788,12 +1788,6 @@ namespace vg::editor if (debugInspector) componentShortName += fmt::sprintf(" (0x%016X)", (u64)pComponent); - //if (auto * nameProp = pComponent->GetClassDesc()->GetPropertyByName("m_name")) - //{ - // if (!asBool(core::PropertyFlags::NotVisible & nameProp->GetFlags())) - // componentShortName += " - " + *nameProp->GetPropertyString(pComponent); - //} - ImVec2 collapsingHeaderPos = ImGui::GetCursorPos(); const bool isOpen = asBool(ObjectFlags::Opened & pComponent->GetObjectFlags()); @@ -2213,13 +2207,6 @@ namespace vg::editor { auto availableWidth = GetContentRegionAvail().x; ImGui::PushItemWidth(availableWidth - style::label::PixelWidth); - - //auto customDisplayHandler = ImGuiObjectHandler::Find(_resource->GetClassName()); - //if (nullptr != customDisplayHandler) - //{ - // changed = customDisplayHandler->displayObject(_resource, objectContext); - //} - //else { const char * classDisplayName = classDesc->GetClassDisplayName();