Minor UI changes
This commit is contained in:
1 parent
e62bb6e225
commit
05f114c8a4
9 files changed
+34
-74
No files matched your search
@@ -6,6 +6,7 @@ import { addWindow } from "./window";
|
||||
|
||||
export interface OptionSelectConfig {
|
||||
xOffset?: number;
|
||||
yOffset?: number;
|
||||
options: OptionSelectItem[];
|
||||
}
|
||||
|
||||
@@ -58,7 +59,7 @@ export default abstract class AbstractOptionSelectUiHandler extends UiHandler {
|
||||
this.optionSelectText = addTextObject(this.scene, 0, 0, options.map(o => o.label).join('\n'), TextStyle.WINDOW, { maxLines: options.length });
|
||||
this.optionSelectText.setLineSpacing(12);
|
||||
this.optionSelectContainer.add(this.optionSelectText);
|
||||
this.optionSelectContainer.x = (this.scene.game.canvas.width / 6) - 1 - (this.config?.xOffset || 0);
|
||||
this.optionSelectContainer.setPosition((this.scene.game.canvas.width / 6) - 1 - (this.config?.xOffset || 0), -48 + (this.config?.yOffset || 0));
|
||||
|
||||
this.optionSelectBg.width = Math.max(this.optionSelectText.displayWidth + 24, this.getWindowWidth());
|
||||
this.optionSelectBg.height = this.getWindowHeight();
|
||||
|
||||
Reference in new issue
Block a user