remove delta mode
it's unnecessary in my opinion unless I am missing something
This commit is contained in:
parent
3f14625361
commit
c473f94f0d
|
@ -864,13 +864,13 @@ struct FurnaceGUIMacroDesc {
|
||||||
float height;
|
float height;
|
||||||
const char* displayName;
|
const char* displayName;
|
||||||
const char** bitfieldBits;
|
const char** bitfieldBits;
|
||||||
const char** modeName;
|
const char* modeName;
|
||||||
ImVec4 color;
|
ImVec4 color;
|
||||||
unsigned int bitOffset;
|
unsigned int bitOffset;
|
||||||
bool isBitfield, blockMode, useMacroMode;
|
bool isBitfield, blockMode;
|
||||||
String (*hoverFunc)(int,float);
|
String (*hoverFunc)(int,float);
|
||||||
|
|
||||||
FurnaceGUIMacroDesc(const char* name, DivInstrumentMacro* m, int macroMin, int macroMax, float macroHeight, ImVec4 col=ImVec4(1.0f,1.0f,1.0f,1.0f), bool block=false, bool mMode=false, const char** mName={NULL}, String (*hf)(int,float)=NULL, bool bitfield=false, const char** bfVal=NULL, unsigned int bitOff=0):
|
FurnaceGUIMacroDesc(const char* name, DivInstrumentMacro* m, int macroMin, int macroMax, float macroHeight, ImVec4 col=ImVec4(1.0f,1.0f,1.0f,1.0f), bool block=false, const char* mName=NULL, String (*hf)(int,float)=NULL, bool bitfield=false, const char** bfVal=NULL, unsigned int bitOff=0):
|
||||||
macro(m),
|
macro(m),
|
||||||
height(macroHeight),
|
height(macroHeight),
|
||||||
displayName(name),
|
displayName(name),
|
||||||
|
@ -880,7 +880,6 @@ struct FurnaceGUIMacroDesc {
|
||||||
bitOffset(bitOff),
|
bitOffset(bitOff),
|
||||||
isBitfield(bitfield),
|
isBitfield(bitfield),
|
||||||
blockMode(block),
|
blockMode(block),
|
||||||
useMacroMode(mMode),
|
|
||||||
hoverFunc(hf) {
|
hoverFunc(hf) {
|
||||||
// MSVC -> hell
|
// MSVC -> hell
|
||||||
this->min=macroMin;
|
this->min=macroMin;
|
||||||
|
|
|
@ -305,34 +305,15 @@ const char* gbHWSeqCmdTypes[6]={
|
||||||
"Loop until Release"
|
"Loop until Release"
|
||||||
};
|
};
|
||||||
|
|
||||||
const char* macroAbsoluteMode[3]={
|
// do not change these!
|
||||||
"Relative",
|
// anything other than a checkbox will look ugly!
|
||||||
"Absolute",
|
//
|
||||||
NULL
|
// if you really need to, and have a good rationale (and by good I mean a VERY
|
||||||
};
|
// good one), please tell me and we'll sort it out.
|
||||||
|
const char* macroAbsoluteMode="Fixed";
|
||||||
const char* macroRelativeMode[3]={
|
const char* macroRelativeMode="Relative";
|
||||||
"Absolute",
|
const char* macroQSoundMode="QSound";
|
||||||
"Relative",
|
const char* macroDummyMode="Bug";
|
||||||
NULL
|
|
||||||
};
|
|
||||||
|
|
||||||
const char* macroQSoundMode[3]={
|
|
||||||
"Independent",
|
|
||||||
"QSound",
|
|
||||||
NULL
|
|
||||||
};
|
|
||||||
|
|
||||||
const char* macroDummyMode[1]={
|
|
||||||
NULL
|
|
||||||
};
|
|
||||||
|
|
||||||
const char* macroFilterMode[4]={
|
|
||||||
"Relative",
|
|
||||||
"Absolute",
|
|
||||||
"Delta",
|
|
||||||
NULL
|
|
||||||
};
|
|
||||||
|
|
||||||
String macroHoverNote(int id, float val) {
|
String macroHoverNote(int id, float val) {
|
||||||
if (val<-60 || val>=120) return "???";
|
if (val<-60 || val>=120) return "???";
|
||||||
|
@ -1259,12 +1240,14 @@ void FurnaceGUI::drawMacros(std::vector<FurnaceGUIMacroDesc>& macros) {
|
||||||
if (ImGui::InputScalar("##IMacroLen",ImGuiDataType_U8,&i.macro->len,&_ONE,&_THREE)) { MARK_MODIFIED
|
if (ImGui::InputScalar("##IMacroLen",ImGuiDataType_U8,&i.macro->len,&_ONE,&_THREE)) { MARK_MODIFIED
|
||||||
if (i.macro->len>128) i.macro->len=128;
|
if (i.macro->len>128) i.macro->len=128;
|
||||||
}
|
}
|
||||||
if (i.useMacroMode && i.modeName[0]!=NULL) {
|
// do not change this!
|
||||||
for (int m=0; i.modeName[m]!=NULL; m++) {
|
// anything other than a checkbox will look ugly!
|
||||||
String modeName=fmt::sprintf("%s##IMacroMode%d",i.modeName[m],m);
|
// if you really need more than two macro modes please tell me.
|
||||||
if (ImGui::RadioButton(modeName.c_str(),(int)i.macro->mode==m)) {
|
if (i.modeName!=NULL) {
|
||||||
i.macro->mode=m;
|
bool modeVal=i.macro->mode;
|
||||||
}
|
String modeName=fmt::sprintf("%s##IMacroMode",i.modeName);
|
||||||
|
if (ImGui::Checkbox(modeName.c_str(),&modeVal)) {
|
||||||
|
i.macro->mode=modeVal;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue