1. ifcaro
  2. Open PS2 Loader

Commits

izdubar  committed 3a95d38

when creating a new VMC, the gEnableRenameDelete option should not be applied

  • Participants
  • Parent commits 9831518
  • Branches default

Comments (0)

Files changed (2)

File src/dialogs.c

View file
  • Ignore whitespace
 	{UI_SPLITTER},
 	{UI_BUTTON, VMC_BUTTON_CREATE, 1, -1, {.label = {NULL, -1}}},
 
-	{UI_SPLITTER},
+	{UI_SPLITTER}, // UIItem #22
 	{UI_BUTTON, VMC_BUTTON_DELETE, 1, -1, {.label = {NULL, _STR_DELETE}}},
 
 	// end of dialog

File src/gui.c

View file
  • Ignore whitespace
 
 
 	if (size != -1) {
-		diaVMC[22].type = UI_SPLITTER;
 		diaSetLabel(diaVMC, VMC_BUTTON_CREATE, _l(_STR_MODIFY));
 		diaSetLabel(diaVMC, VMC_STATUS, _l(_STR_VMC_FILE_EXISTS));
 
 			diaSetInt(diaVMC, VMC_SIZE, 0);
 			diaSetLabel(diaVMC, VMC_STATUS, _l(_STR_VMC_FILE_ERROR));
 		}
+
+		if (gEnableDandR) {
+			diaSetEnabled(diaVMC, VMC_SIZE, 1);
+			diaVMC[22].type = UI_SPLITTER;
+		}
+		else {
+			diaSetEnabled(diaVMC, VMC_SIZE, 0);
+			diaVMC[22].type = UI_TERMINATOR;
+		}
 	}
 	else {
-		diaVMC[22].type = UI_TERMINATOR;
 		diaSetLabel(diaVMC, VMC_BUTTON_CREATE, _l(_STR_CREATE));
 		diaSetLabel(diaVMC, VMC_STATUS, _l(_STR_VMC_FILE_NEW));
+
 		diaSetInt(diaVMC, VMC_SIZE, 0);
-	}
-
-	if (gEnableDandR)
 		diaSetEnabled(diaVMC, VMC_SIZE, 1);
-	else {
-		diaSetEnabled(diaVMC, VMC_SIZE, 0);
 		diaVMC[22].type = UI_TERMINATOR;
 	}