-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
2.0.0 実装をItemDetailに合わせる Window_SkillDetailMixInを削除
- Loading branch information
Showing
5 changed files
with
51 additions
and
170 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
/// <reference path="./detailWindow.d.ts" /> | ||
|
||
declare interface Window_Selectable { | ||
_detailWindow?: Window_DetailText; | ||
|
||
setDetailWindow(detailWindow: Window_DetailText): void; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
/// <reference path="./withDetailWindow.d.ts" /> | ||
|
||
export function Window_WithDetailWindowMixIn(openDetailKey: string, windowClass: Window_Selectable) { | ||
Window_CustomKeyHandlerMixIn(openDetailKey, windowClass, 'detail'); | ||
|
||
windowClass.setDetailWindow = function (detailWindow) { | ||
this._detailWindow = detailWindow; | ||
}; | ||
|
||
const _setHelpWindowItem = windowClass.setHelpWindowItem; | ||
windowClass.setHelpWindowItem = function (item) { | ||
_setHelpWindowItem.call(this, item); | ||
this._detailWindow?.setItem(item as DataManager.NoteHolder); | ||
}; | ||
|
||
const _isCursorMovable = windowClass.isCursorMovable; | ||
windowClass.isCursorMovable = function () { | ||
return _isCursorMovable.call(this) && (!this._detailWindow || !this._detailWindow.visible); | ||
}; | ||
|
||
const _isOkEnabled = windowClass.isOkEnabled; | ||
windowClass.isOkEnabled = function () { | ||
return _isOkEnabled.call(this) && (!this._detailWindow || !this._detailWindow.visible); | ||
}; | ||
|
||
const _processCancel = windowClass.processCancel; | ||
windowClass.processCancel = function () { | ||
this._detailWindow?.hide(); | ||
_processCancel.call(this); | ||
}; | ||
} |