Skip to content

Commit

Permalink
Merge pull request #8 from LordRadai/v1.2.1
Browse files Browse the repository at this point in the history
V1.2.0 hotfix
  • Loading branch information
LordRadai authored Sep 12, 2024
2 parents d693353 + d606b0a commit b85dbea
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
13 changes: 10 additions & 3 deletions DS2AnimToolset/morphemeEditor/GuiManager/GuiManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
#include "WorkerThread/WorkerThread.h"
#include "Camera/Camera.h"

#define MSAA_SETTING_COUNT 4

namespace
{
void trackEditorColorSelector(TrackEditor::TrackEditorBase* trackEditor)
Expand Down Expand Up @@ -676,10 +678,12 @@ void GuiManager::rootWindow()
{
RenderManager* renderMan = RenderManager::getInstance();

const char* msaaQualitySettings[6] = { "Off", "2x", "4x", "8x", "16x" };
const char* msaaQualitySettings[5] = { "Off", "2x", "4x", "8x", "16x" };
int selectedSetting = 0;

switch (renderMan->getSettings()->msaaCount)
int msaaCountSetting = renderMan->getSettings()->msaaCount;

switch (msaaCountSetting)
{
case 1:
selectedSetting = 0;
Expand All @@ -696,11 +700,14 @@ void GuiManager::rootWindow()
case 16:
selectedSetting = 4;
break;
default:
g_appLog->panicMessage("Unsupported MSAA count %d (maximum handled is 16, recommended maximum is 8)\n", msaaCountSetting);
break;
}

if (ImGui::BeginCombo("MSAA", msaaQualitySettings[selectedSetting]))
{
for (size_t i = 0; i < 5; i++)
for (size_t i = 0; i < MSAA_SETTING_COUNT; i++)
{
ImGui::Selectable(msaaQualitySettings[i]);

Expand Down
4 changes: 2 additions & 2 deletions DS2AnimToolset/morphemeEditor/TrackEditor/TrackEditorBase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

namespace
{
int drawDurationEvent(ImDrawList* draw_list, ImVec2 startOffset, int itemHeight, int framePixelWidth, int frameStart, int frameEnd, std::string label, TrackEditor::LabelAlignment alignment, ImU32 trackColor, ImU32 boundColor, ImU32 textColor)
int drawDurationEvent(ImDrawList* draw_list, ImVec2 startOffset, int itemHeight, float framePixelWidth, int frameStart, int frameEnd, std::string label, TrackEditor::LabelAlignment alignment, ImU32 trackColor, ImU32 boundColor, ImU32 textColor)
{
ImVec2 slotP1(startOffset.x + frameStart * framePixelWidth - 1, startOffset.y + 2);
ImVec2 slotP2(startOffset.x + frameEnd * framePixelWidth - 1, startOffset.y + itemHeight - 2);
Expand Down Expand Up @@ -74,7 +74,7 @@ namespace
return 0;
}

int drawDiscreteEvent(ImDrawList* draw_list, ImVec2 startOffset, int itemHeight, int framePixelWidth, int frameStart, std::string label, int idx, TrackEditor::LabelAlignment alignment, ImU32 trackColor, ImU32 boundColor, ImU32 textColor)
int drawDiscreteEvent(ImDrawList* draw_list, ImVec2 startOffset, int itemHeight, float framePixelWidth, int frameStart, std::string label, int idx, TrackEditor::LabelAlignment alignment, ImU32 trackColor, ImU32 boundColor, ImU32 textColor)
{
ImVec2 slotD1(startOffset.x + frameStart * framePixelWidth - 6, startOffset.y + 2);
ImVec2 slotD2(startOffset.x + frameStart * framePixelWidth + 4, startOffset.y + itemHeight - 7);
Expand Down

0 comments on commit b85dbea

Please sign in to comment.