GUI: chip manager redesign, part 4
this selectable is so ugly and uncentered
This commit is contained in:
parent
72b94b029a
commit
27a555f129
4 changed files with 13 additions and 10 deletions
|
|
@ -296,14 +296,15 @@ const char* FurnaceGUI::getSystemPartNumber(DivSystem sys, DivConfig& flags) {
|
|||
}
|
||||
}
|
||||
|
||||
void FurnaceGUI::drawSystemChannelInfo(const DivSysDef* whichDef, int keyHitOffset, float tooltipWidth) {
|
||||
float FurnaceGUI::drawSystemChannelInfo(const DivSysDef* whichDef, int keyHitOffset, float tooltipWidth) {
|
||||
ImDrawList* dl=ImGui::GetWindowDrawList();
|
||||
const ImVec2 p=ImGui::GetCursorScreenPos();
|
||||
if (tooltipWidth<=0.0f) tooltipWidth=ImGui::GetContentRegionAvail().x;
|
||||
ImVec2 sep=ImGui::GetStyle().ItemSpacing;
|
||||
sep.x*=0.5f;
|
||||
ImVec2 ledSize=ImVec2(
|
||||
(tooltipWidth-sep.x*(whichDef->channels-1))/(float)whichDef->channels,
|
||||
8.0f*dpiScale
|
||||
settings.iconSize*dpiScale
|
||||
);
|
||||
if (ledSize.x<8.0f*dpiScale) ledSize.x=8.0f*dpiScale;
|
||||
float x=p.x, y=p.y;
|
||||
|
|
@ -329,6 +330,7 @@ void FurnaceGUI::drawSystemChannelInfo(const DivSysDef* whichDef, int keyHitOffs
|
|||
x+=ledSize.x+sep.x;
|
||||
}
|
||||
ImGui::Dummy(ImVec2(tooltipWidth,(y-p.y)+ledSize.y));
|
||||
return (y-p.y)+ledSize.y;
|
||||
}
|
||||
|
||||
void FurnaceGUI::drawSystemChannelInfoText(const DivSysDef* whichDef) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue