diff --git a/packages-user/client-modules/src/render/action.ts b/packages-user/client-modules/src/render/action.ts index c6d5232..c9b5ff4 100644 --- a/packages-user/client-modules/src/render/action.ts +++ b/packages-user/client-modules/src/render/action.ts @@ -1,5 +1,5 @@ import { gameKey } from '@motajs/system-action'; -import { MAIN_WIDTH, MAIN_HEIGHT } from './shared'; +import { MAIN_WIDTH, MAIN_HEIGHT, POP_BOX_WIDTH, CENTER_LOC } from './shared'; import { saveSave, mainUIController, @@ -9,6 +9,7 @@ import { ReplaySettingsUI, openViewMap } from './ui'; +import { ElementLocator } from '@motajs/render-core'; export function createAction() { gameKey @@ -22,11 +23,13 @@ export function createAction() { saveLoad(mainUIController, [0, 0, MAIN_WIDTH, MAIN_HEIGHT]); }) .realize('menu', () => { - openSettings(mainUIController, [420, 240, 240, 400, 0.5, 0.5]); + const loc = CENTER_LOC.slice() as ElementLocator; + loc[2] = POP_BOX_WIDTH; + openSettings(mainUIController, loc); }) .realize('replay', () => { mainUIController.open(ReplaySettingsUI, { - loc: [420, 240, void 0, void 0, 0.5, 0.5] + loc: CENTER_LOC }); }) .realize('viewMap', () => { diff --git a/packages-user/client-modules/src/render/components/choices.tsx b/packages-user/client-modules/src/render/components/choices.tsx index 32cc2f5..020f8d9 100644 --- a/packages-user/client-modules/src/render/components/choices.tsx +++ b/packages-user/client-modules/src/render/components/choices.tsx @@ -505,27 +505,25 @@ export const Choices = defineComponent< color={props.color ?? '#333'} border={props.border} /> - {hasTitle.value && ( - - )} - {hasText.value && ( - - )} +