I see UI!!!!
This commit is contained in:
parent
e158591ccb
commit
96b3ccab8a
|
@ -1783,7 +1783,31 @@ void FurnaceGUI::showError(String what) {
|
||||||
#define B30(tt) (macroDragBit30?((((tt)&0xc0000000)==0x40000000 || ((tt)&0xc0000000)==0x80000000)?0x40000000:0):0)
|
#define B30(tt) (macroDragBit30?((((tt)&0xc0000000)==0x40000000 || ((tt)&0xc0000000)==0x80000000)?0x40000000:0):0)
|
||||||
|
|
||||||
#define MACRO_DRAG(t) \
|
#define MACRO_DRAG(t) \
|
||||||
if (macroDragBitMode) { \
|
if (macroDragSettingBit30) { \
|
||||||
|
if (macroDragLastX!=x || macroDragLastY!=y) { \
|
||||||
|
macroDragLastX=x; \
|
||||||
|
macroDragLastY=y; \
|
||||||
|
if (macroDragInitialValueSet) { \
|
||||||
|
if (!macroDragInitialValue) { \
|
||||||
|
if (t[x]&0x80000000) { \
|
||||||
|
t[x]&=~0x40000000; \
|
||||||
|
} else { \
|
||||||
|
t[x]|=0x40000000; \
|
||||||
|
} \
|
||||||
|
} else { \
|
||||||
|
if (t[x]&0x80000000) { \
|
||||||
|
t[x]|=0x40000000; \
|
||||||
|
} else { \
|
||||||
|
t[x]&=~0x40000000; \
|
||||||
|
} \
|
||||||
|
} \
|
||||||
|
} else { \
|
||||||
|
macroDragInitialValue=(((t[x])&0xc0000000)==0x40000000 || ((t[x])&0xc0000000)==0x80000000); \
|
||||||
|
macroDragInitialValueSet=true; \
|
||||||
|
t[x]^=0x40000000; \
|
||||||
|
} \
|
||||||
|
} \
|
||||||
|
} else if (macroDragBitMode) { \
|
||||||
if (macroDragLastX!=x || macroDragLastY!=y) { \
|
if (macroDragLastX!=x || macroDragLastY!=y) { \
|
||||||
macroDragLastX=x; \
|
macroDragLastX=x; \
|
||||||
macroDragLastY=y; \
|
macroDragLastY=y; \
|
||||||
|
@ -4893,6 +4917,7 @@ FurnaceGUI::FurnaceGUI():
|
||||||
macroDragInitialValue(false),
|
macroDragInitialValue(false),
|
||||||
macroDragChar(false),
|
macroDragChar(false),
|
||||||
macroDragBit30(false),
|
macroDragBit30(false),
|
||||||
|
macroDragSettingBit30(false),
|
||||||
macroDragLineMode(false),
|
macroDragLineMode(false),
|
||||||
macroDragMouseMoved(false),
|
macroDragMouseMoved(false),
|
||||||
macroDragLineInitial(0,0),
|
macroDragLineInitial(0,0),
|
||||||
|
|
|
@ -1397,6 +1397,7 @@ class FurnaceGUI {
|
||||||
bool macroDragInitialValue;
|
bool macroDragInitialValue;
|
||||||
bool macroDragChar;
|
bool macroDragChar;
|
||||||
bool macroDragBit30;
|
bool macroDragBit30;
|
||||||
|
bool macroDragSettingBit30;
|
||||||
bool macroDragLineMode;
|
bool macroDragLineMode;
|
||||||
bool macroDragMouseMoved;
|
bool macroDragMouseMoved;
|
||||||
ImVec2 macroDragLineInitial;
|
ImVec2 macroDragLineInitial;
|
||||||
|
|
|
@ -1374,6 +1374,7 @@ void FurnaceGUI::drawMacros(std::vector<FurnaceGUIMacroDesc>& macros) {
|
||||||
macroDragLen=totalFit;
|
macroDragLen=totalFit;
|
||||||
macroDragActive=true;
|
macroDragActive=true;
|
||||||
macroDragBit30=i.bit30;
|
macroDragBit30=i.bit30;
|
||||||
|
macroDragSettingBit30=false;
|
||||||
macroDragTarget=i.macro->val;
|
macroDragTarget=i.macro->val;
|
||||||
macroDragChar=false;
|
macroDragChar=false;
|
||||||
macroDragLineMode=(i.isBitfield)?false:ImGui::IsItemClicked(ImGuiMouseButton_Right);
|
macroDragLineMode=(i.isBitfield)?false:ImGui::IsItemClicked(ImGuiMouseButton_Right);
|
||||||
|
@ -1442,9 +1443,24 @@ void FurnaceGUI::drawMacros(std::vector<FurnaceGUIMacroDesc>& macros) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// bit 30 area
|
// bit 30 area
|
||||||
// TODO: ability to set it
|
|
||||||
if (i.bit30) {
|
if (i.bit30) {
|
||||||
PlotCustom("##IMacroBit30",bit30Indicator,totalFit,macroDragScroll,NULL,0,1,ImVec2(availableWidth,12.0f*dpiScale),sizeof(float),i.color,i.macro->len-macroDragScroll,¯oHoverBit30);
|
PlotCustom("##IMacroBit30",bit30Indicator,totalFit,macroDragScroll,NULL,0,1,ImVec2(availableWidth,12.0f*dpiScale),sizeof(float),i.color,i.macro->len-macroDragScroll,¯oHoverBit30);
|
||||||
|
if (ImGui::IsItemClicked(ImGuiMouseButton_Left)) {
|
||||||
|
macroDragStart=ImGui::GetItemRectMin();
|
||||||
|
macroDragAreaSize=ImVec2(availableWidth,12.0f*dpiScale);
|
||||||
|
macroDragInitialValueSet=false;
|
||||||
|
macroDragInitialValue=false;
|
||||||
|
macroDragLen=totalFit;
|
||||||
|
macroDragActive=true;
|
||||||
|
macroDragBit30=i.bit30;
|
||||||
|
macroDragSettingBit30=true;
|
||||||
|
macroDragTarget=i.macro->val;
|
||||||
|
macroDragChar=false;
|
||||||
|
macroDragLineMode=false;
|
||||||
|
macroDragLineInitial=ImVec2(0,0);
|
||||||
|
lastMacroDesc=i;
|
||||||
|
processDrags(ImGui::GetMousePos().x,ImGui::GetMousePos().y);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// loop area
|
// loop area
|
||||||
|
|
Loading…
Reference in New Issue