mirror of
https://github.com/tildearrow/furnace.git
synced 2024-11-27 06:53:01 +00:00
GUI: implement chan osc volume label
This commit is contained in:
parent
e1cf040b33
commit
83219cefc7
1 changed files with 17 additions and 3 deletions
|
@ -506,12 +506,26 @@ void FurnaceGUI::drawChanOsc() {
|
|||
text+=fmt::sprintf("%d",e->dispatchOfChan[ch]);
|
||||
break;
|
||||
}
|
||||
case 'v':
|
||||
case 'v': {
|
||||
DivChannelState* chanState=e->getChanState(ch);
|
||||
if (chanState==NULL) break;
|
||||
text+=fmt::sprintf("%d",chanState->volume>>8);
|
||||
break;
|
||||
case 'V':
|
||||
}
|
||||
case 'V': {
|
||||
DivChannelState* chanState=e->getChanState(ch);
|
||||
if (chanState==NULL) break;
|
||||
int volMax=chanState->volMax>>8;
|
||||
if (volMax<1) volMax=1;
|
||||
text+=fmt::sprintf("%d%%",(chanState->volume>>8)/volMax);
|
||||
break;
|
||||
case 'b':
|
||||
}
|
||||
case 'b': {
|
||||
DivChannelState* chanState=e->getChanState(ch);
|
||||
if (chanState==NULL) break;
|
||||
text+=fmt::sprintf("%.2X",chanState->volume>>8);
|
||||
break;
|
||||
}
|
||||
case '%':
|
||||
text+='%';
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue