chtooltip updates... again

fix tile overflow
add psg to hierarchy
update hierarchy (ext.ops after fm)
This commit is contained in:
Eknous-P 2024-10-13 18:31:46 +04:00 committed by tildearrow
parent 721c3b55b6
commit 17da58c0ca
4 changed files with 28 additions and 5 deletions

View file

@ -258,7 +258,23 @@ const char* chanNames[CHANNEL_TYPE_MAX+1]={
_N("Channels") // in case this makes l10n easier
};
unsigned char chanNamesHierarchy[CHANNEL_TYPE_MAX+1]={0,5,1,3,6,7,2,10,11,9,4,8,12,13};
unsigned char chanNamesHierarchy[CHANNEL_TYPE_MAX+1]={
CHANNEL_TYPE_FM,
CHANNEL_TYPE_OPERATOR,
CHANNEL_TYPE_SQUARE,
CHANNEL_TYPE_PULSE,
CHANNEL_TYPE_PSG,
CHANNEL_TYPE_WAVETABLE,
CHANNEL_TYPE_TRIANGLE,
CHANNEL_TYPE_SAW,
CHANNEL_TYPE_NOISE,
CHANNEL_TYPE_SLOPE,
CHANNEL_TYPE_WAVE,
CHANNEL_TYPE_DRUMS,
CHANNEL_TYPE_SAMPLE,
CHANNEL_TYPE_OTHER,
CHANNEL_TYPE_MAX
};
const FurnaceGUIColors fxColors[256]={
GUI_COLOR_PATTERN_EFFECT_MISC, // 00

View file

@ -65,6 +65,7 @@ void FurnaceGUI::drawSysDefs(std::vector<FurnaceGUISysDef>& category, bool& acce
if (isHovered && !alreadyHover) {
alreadyHover=true;
if (ImGui::BeginTooltip()) {
ImGui::Dummy(ImVec2(400.0f*dpiScale,0.0f));
std::map<DivSystem,int> chipCounts;
std::vector<DivSystem> chips;
for (FurnaceGUISysDefChip chip: i.orig) {

View file

@ -92,7 +92,8 @@ void FurnaceGUI::drawSysManager() {
if (e->song.system[i]!=DIV_SYSTEM_NULL) {
const DivSysDef* sysDef=e->getSystemDef(e->song.system[i]);
if (ImGui::BeginTooltip()) {
ImGui::PushTextWrapPos(420.0f*dpiScale); // arbitrary constant
ImGui::Dummy(ImVec2(MIN(scrW*dpiScale,400.0f*dpiScale),0.0f));
ImGui::PushTextWrapPos(MIN(scrW*dpiScale,400.0f*dpiScale)); // arbitrary constant
ImGui::TextWrapped("%s",sysDef->description);
ImGui::Separator();
drawSystemChannelInfoText(sysDef);

View file

@ -298,12 +298,17 @@ void FurnaceGUI::drawSystemChannelInfo(const DivSysDef* whichDef) {
ImDrawList* dl=ImGui::GetWindowDrawList();
const ImVec2 p=ImGui::GetCursorScreenPos();
float scaler=5.0f*dpiScale;
float x=p.x+dpiScale;
float x=p.x, y=p.y;
float tooltipWidth=MIN(scrW*dpiScale,400.0f*dpiScale);
for (int i=0; i<whichDef->channels; i++) {
dl->AddRectFilled(ImVec2(x,p.y),ImVec2(x+1.5f*scaler,p.y+1.0f*scaler),ImGui::GetColorU32(uiColors[whichDef->chanTypes[i]+GUI_COLOR_CHANNEL_FM]),scaler);
dl->AddRectFilled(ImVec2(x,y),ImVec2(x+1.5f*scaler,y+1.0f*scaler),ImGui::GetColorU32(uiColors[whichDef->chanTypes[i]+GUI_COLOR_CHANNEL_FM]),scaler);
x+=2.0f*scaler;
if ((x+1.5f*scaler)>tooltipWidth+p.x) {
x=p.x;
y+=1.5f*scaler;
}
}
ImGui::Dummy(ImVec2(0,4*scaler));
ImGui::Dummy(ImVec2(0,(y-p.y)+1.5f*scaler));
}
void FurnaceGUI::drawSystemChannelInfoText(const DivSysDef* whichDef) {