Fixing ui bugs, added cutscenes
This commit is contained in:
1 parent
9aeb0b1194
commit
5516d02e2c
18 files changed
+2100
-222
No files matched your search
@@ -293,12 +293,12 @@ void DialogueOverlay::drawPortrait(Renderer& renderer, const PresentationModel&
|
||||
if (model.mode == PresentationMode::Choice) {
|
||||
const float choiceTexAspect = static_cast<float>(choiceMainTexture->getWidth())
|
||||
/ static_cast<float>(choiceMainTexture->getHeight());
|
||||
const float choiceW = W - leftPad - rightPad;
|
||||
const float choiceW = W - leftPad - rightPad + 32;
|
||||
const float choiceH = choiceW / choiceTexAspect;
|
||||
const float choiceSpacing = 8.f;
|
||||
const float choiceSpacing = -18.f;
|
||||
|
||||
const float totalChoicesH = (choiceH + choiceSpacing) * static_cast<float>(model.choices.size()) - choiceSpacing;
|
||||
const float choiceStartY = panelTopY - 34.f - totalChoicesH; // below name row
|
||||
const float choiceStartY = panelTopY - 80.f - totalChoicesH; // below name row
|
||||
|
||||
if (choiceQuads.size() < model.choices.size()) {
|
||||
choiceQuads.resize(model.choices.size());
|
||||
@@ -313,7 +313,7 @@ void DialogueOverlay::drawPortrait(Renderer& renderer, const PresentationModel&
|
||||
|
||||
for (size_t i = 0; i < model.choices.size(); ++i) {
|
||||
const float cy = choiceStartY + (choiceH + choiceSpacing) * static_cast<float>(model.choices.size() - 1 - i);
|
||||
UiRect rect{ leftPad, cy, choiceW, choiceH };
|
||||
UiRect rect{ leftPad-16.f, cy, choiceW, choiceH };
|
||||
lastChoiceRects.push_back(rect);
|
||||
choiceQuads[i].rebuild(rect);
|
||||
|
||||
@@ -338,7 +338,7 @@ void DialogueOverlay::drawPortrait(Renderer& renderer, const PresentationModel&
|
||||
|
||||
const std::string wrappedChoice = wrapTextToWidth(model.choices[i].text, *choiceRenderer, rect.w - 20.0f, 1.0f);
|
||||
choiceRenderer->drawText(
|
||||
wrappedChoice, rect.x + 20.f, rect.y + choiceH * 0.35f, 1.5f, false,
|
||||
wrappedChoice, rect.x + 20.f, rect.y + choiceH * 0.35f+5.f, 1.4f, false,
|
||||
isHighlighted ? std::array<float, 4>{1.0f, 1.0f, 1.0f, 1.0f} : color
|
||||
);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user