Implement nineslice for some UI windows
This commit is contained in:
1 parent
cb2c77542d
commit
23de25d585
13 files changed
+18
-20
No files matched your search
@@ -7,7 +7,7 @@ export default abstract class OptionSelectUiHandler extends UiHandler {
|
||||
protected handlers: Function[];
|
||||
|
||||
protected optionSelectContainer: Phaser.GameObjects.Container;
|
||||
protected optionSelectBg: Phaser.GameObjects.Image;
|
||||
protected optionSelectBg: Phaser.GameObjects.NineSlice;
|
||||
|
||||
private cursorObj: Phaser.GameObjects.Image;
|
||||
|
||||
@@ -15,10 +15,10 @@ export default abstract class OptionSelectUiHandler extends UiHandler {
|
||||
super(scene, mode);
|
||||
}
|
||||
|
||||
abstract getWindowName(): string;
|
||||
|
||||
abstract getWindowWidth(): integer;
|
||||
|
||||
abstract getWindowHeight(): integer;
|
||||
|
||||
abstract getOptions(): string[];
|
||||
|
||||
setup() {
|
||||
@@ -28,7 +28,7 @@ export default abstract class OptionSelectUiHandler extends UiHandler {
|
||||
this.optionSelectContainer.setVisible(false);
|
||||
ui.add(this.optionSelectContainer);
|
||||
|
||||
this.optionSelectBg = this.scene.add.image(0, 0, this.getWindowName());
|
||||
this.optionSelectBg = this.scene.add.nineslice(0, 0, 'window', null, this.getWindowWidth(), this.getWindowHeight(), 6, 6, 6, 6);
|
||||
this.optionSelectBg.setOrigin(0, 1);
|
||||
this.optionSelectContainer.add(this.optionSelectBg);
|
||||
|
||||
|
||||
Reference in new issue
Block a user