GUI: set column width
This commit is contained in:
parent
b9902902be
commit
5fcb83a7f5
|
@ -717,7 +717,8 @@ const char* ayShapeBits[4]={
|
||||||
#define OP_MACRO(macro,macroLen,macroLoop,macroHeight,op,macroName) \
|
#define OP_MACRO(macro,macroLen,macroLoop,macroHeight,op,macroName) \
|
||||||
ImGui::NextColumn(); \
|
ImGui::NextColumn(); \
|
||||||
ImGui::Text(macroName); \
|
ImGui::Text(macroName); \
|
||||||
if (ImGui::InputScalar("Size##IOPMacroLen_" #op macroName,ImGuiDataType_U8,¯oLen,&_ONE,&_THREE)) { \
|
ImGui::SetNextItemWidth(112.0f*dpiScale); \
|
||||||
|
if (ImGui::InputScalar("##IOPMacroLen_" #op macroName,ImGuiDataType_U8,¯oLen,&_ONE,&_THREE)) { \
|
||||||
if (macroLen>127) macroLen=127; \
|
if (macroLen>127) macroLen=127; \
|
||||||
} \
|
} \
|
||||||
ImGui::NextColumn(); \
|
ImGui::NextColumn(); \
|
||||||
|
@ -843,7 +844,8 @@ void FurnaceGUI::drawInsEdit() {
|
||||||
snprintf(label,31,"Macros (OP%d)",i+1);
|
snprintf(label,31,"Macros (OP%d)",i+1);
|
||||||
if (ImGui::BeginTabItem(label)) {
|
if (ImGui::BeginTabItem(label)) {
|
||||||
ImGui::PushID(i);
|
ImGui::PushID(i);
|
||||||
ImGui::Columns(2);
|
ImGui::Columns(2,NULL,false);
|
||||||
|
ImGui::SetColumnWidth(-1,128.0f*dpiScale);
|
||||||
ImGui::NextColumn();
|
ImGui::NextColumn();
|
||||||
float availableWidth=ImGui::GetContentRegionAvail().x;
|
float availableWidth=ImGui::GetContentRegionAvail().x;
|
||||||
int totalFit=MIN(255,availableWidth/(16*dpiScale));
|
int totalFit=MIN(255,availableWidth/(16*dpiScale));
|
||||||
|
|
Loading…
Reference in New Issue