mirror of
https://github.com/mon/BemaniPatcher.git
synced 2026-08-01 22:10:41 -07:00
Only enable save button when DLL loaded
This commit is contained in:
+6
-2
@@ -184,9 +184,10 @@ DllPatcher.prototype.createUI = function() {
|
|||||||
this.errorDiv = $("<div>", {"class": "error"});
|
this.errorDiv = $("<div>", {"class": "error"});
|
||||||
this.patchDiv = $("<div>", {"class": "patches"});
|
this.patchDiv = $("<div>", {"class": "patches"});
|
||||||
|
|
||||||
var saveButton = $("<button>");
|
var saveButton = $("<button disabled>");
|
||||||
saveButton.text('Save DLL');
|
saveButton.text('Load DLL First');
|
||||||
saveButton.on('click', this.saveDll.bind(this));
|
saveButton.on('click', this.saveDll.bind(this));
|
||||||
|
this.saveButton = saveButton;
|
||||||
|
|
||||||
container.append(this.fileInput);
|
container.append(this.fileInput);
|
||||||
container.append(label);
|
container.append(label);
|
||||||
@@ -209,6 +210,9 @@ DllPatcher.prototype.loadFile = function(file) {
|
|||||||
} else {
|
} else {
|
||||||
self.successDiv.addClass("hidden");
|
self.successDiv.addClass("hidden");
|
||||||
}
|
}
|
||||||
|
// Update save button regardless
|
||||||
|
self.saveButton.prop('disabled', false);
|
||||||
|
self.saveButton.text('Save DLL');
|
||||||
self.errorDiv.html(self.errorLog);
|
self.errorDiv.html(self.errorLog);
|
||||||
self.updatePatchUI();
|
self.updatePatchUI();
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user