Merge ps-hotfix-mojibake: ASCII-only strings on the ANSI draw path
This commit is contained in:
@@ -72,6 +72,7 @@ const LICE_pixel kColZoneBarSel = LICE_RGBA(120, 200, 160, 255);
|
|||||||
const COLORREF kRgbText = RGB(210, 230, 220);
|
const COLORREF kRgbText = RGB(210, 230, 220);
|
||||||
const COLORREF kRgbDim = RGB(140, 150, 146);
|
const COLORREF kRgbDim = RGB(140, 150, 146);
|
||||||
|
|
||||||
|
// ANSI path -- string literals must stay ASCII until the Phase L type kit lands.
|
||||||
void drawText(LICE_IBitmap* bmp, const Rect& r, const char* s, COLORREF col,
|
void drawText(LICE_IBitmap* bmp, const Rect& r, const char* s, COLORREF col,
|
||||||
UINT fmt = DT_LEFT | DT_VCENTER | DT_SINGLELINE | DT_NOPREFIX) {
|
UINT fmt = DT_LEFT | DT_VCENTER | DT_SINGLELINE | DT_NOPREFIX) {
|
||||||
HDC dc = bmp->getDC();
|
HDC dc = bmp->getDC();
|
||||||
@@ -513,7 +514,7 @@ void ReaSamplerEditor::paintEmptyState(LICE_IBitmap* bmp, const Rect& area) {
|
|||||||
// Shown when no card is drawn (nothing to pick): distinguish a genuinely empty bank from
|
// Shown when no card is drawn (nothing to pick): distinguish a genuinely empty bank from
|
||||||
// a bank filter that hides everything. Either way it is the "pick a capture" empty state.
|
// a bank filter that hides everything. Either way it is the "pick a capture" empty state.
|
||||||
const char* msg = samples_.empty()
|
const char* msg = samples_.empty()
|
||||||
? "No captures in this project yet — capture audio into the bank to play it here."
|
? "No captures in this project yet - capture audio into the bank to play it here."
|
||||||
: "No captures in this bank filter. Choose another bank tab above.";
|
: "No captures in this bank filter. Choose another bank tab above.";
|
||||||
drawTextCentered(bmp, area, msg, kRgbDim);
|
drawTextCentered(bmp, area, msg, kRgbDim);
|
||||||
}
|
}
|
||||||
@@ -572,7 +573,7 @@ void ReaSamplerEditor::paintBrowser(LICE_IBitmap* bmp, int w, int h) {
|
|||||||
std::string badge;
|
std::string badge;
|
||||||
if (s.rootNote) badge = "root " + noteLabel(*s.rootNote);
|
if (s.rootNote) badge = "root " + noteLabel(*s.rootNote);
|
||||||
else if (s.key) badge = *s.key;
|
else if (s.key) badge = *s.key;
|
||||||
else badge = "root —";
|
else badge = "root -";
|
||||||
drawText(bmp, badgeR, badge.c_str(), kRgbDim);
|
drawText(bmp, badgeR, badge.c_str(), kRgbDim);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -659,7 +660,7 @@ void ReaSamplerEditor::paintSetup(LICE_IBitmap* bmp, const Rect& area) {
|
|||||||
alpha, 0);
|
alpha, 0);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
drawTextCentered(bmp, waveArea, "(decoding…)", kRgbDim);
|
drawTextCentered(bmp, waveArea, "(decoding...)", kRgbDim);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Keyboard strip with the root marker.
|
// Keyboard strip with the root marker.
|
||||||
@@ -726,7 +727,7 @@ void ReaSamplerEditor::paintZones(LICE_IBitmap* bmp, int w, int h) {
|
|||||||
if (selectedZone_ >= 0 && selectedZone_ < static_cast<int>(map_.zones.size())) {
|
if (selectedZone_ >= 0 && selectedZone_ < static_cast<int>(map_.zones.size())) {
|
||||||
const PerformanceZone& z = map_.zones[static_cast<std::size_t>(selectedZone_)];
|
const PerformanceZone& z = map_.zones[static_cast<std::size_t>(selectedZone_)];
|
||||||
std::string info = sampleLabel(samples_, z.sampleId) + " " + noteLabel(z.lowNote) +
|
std::string info = sampleLabel(samples_, z.sampleId) + " " + noteLabel(z.lowNote) +
|
||||||
" – " + noteLabel(z.highNote) + " root " +
|
" - " + noteLabel(z.highNote) + " root " +
|
||||||
(z.rootOverride ? noteLabel(*z.rootOverride) + "*" : std::string("(bank)"));
|
(z.rootOverride ? noteLabel(*z.rootOverride) + "*" : std::string("(bank)"));
|
||||||
drawText(bmp, infoR, info.c_str(), kRgbText);
|
drawText(bmp, infoR, info.c_str(), kRgbText);
|
||||||
} else if (map_.zones.empty()) {
|
} else if (map_.zones.empty()) {
|
||||||
|
|||||||
Reference in New Issue
Block a user