mirror of
https://github.com/motajs/template.git
synced 2026-11-26 07:55:02 +08:00
fix(09-05): adapt IUIController/UIController to required IGameUIPropsBase generic
- add <IGameUIPropsBase> to 16 IUIController annotation sites (client-modules + client-base)
This commit is contained in:
1 parent
1bcdcc3677
commit
3a49b37c25
10 files changed
+29
-23
No files matched your search
@@ -9,6 +9,7 @@ import { GameUI, IUIController, SetupComponentOptions } from '@motajs/system';
|
||||
import { useKey } from '../use';
|
||||
import { sleep } from 'mutate-animate';
|
||||
import { DefaultProps } from '@motajs/render-vue';
|
||||
import { IGameUIPropsBase } from '../types';
|
||||
|
||||
export interface ConfirmBoxProps extends DefaultProps, TextContentProps {
|
||||
/** 确认框的提示文本内容 */
|
||||
@@ -595,7 +596,7 @@ export const Choices = defineComponent<
|
||||
* @param props 额外的 props,参考 {@link ConfirmBoxProps}
|
||||
*/
|
||||
export function getConfirm(
|
||||
controller: IUIController,
|
||||
controller: IUIController<IGameUIPropsBase>,
|
||||
text: string,
|
||||
loc: ElementLocator,
|
||||
width: number,
|
||||
@@ -648,7 +649,7 @@ export function getConfirm(
|
||||
* @param props 额外的 props,参考 {@link ChoicesProps}
|
||||
*/
|
||||
export function getChoice<T extends ChoiceKey = ChoiceKey>(
|
||||
controller: IUIController,
|
||||
controller: IUIController<IGameUIPropsBase>,
|
||||
choices: ChoiceItem<T>[],
|
||||
loc: ElementLocator,
|
||||
width: number,
|
||||
@@ -707,7 +708,7 @@ function getChoiceRoute(defaults: number) {
|
||||
* @param props 额外的 props,参考 {@link ConfirmBoxProps}
|
||||
*/
|
||||
export async function routedConfirm(
|
||||
controller: IUIController,
|
||||
controller: IUIController<IGameUIPropsBase>,
|
||||
text: string,
|
||||
loc: ElementLocator,
|
||||
width: number,
|
||||
@@ -762,7 +763,7 @@ export async function routedConfirm(
|
||||
* @param props 额外的 props,参考 {@link ChoicesProps}
|
||||
*/
|
||||
export async function routedChoices<T extends ChoiceKey>(
|
||||
controller: IUIController,
|
||||
controller: IUIController<IGameUIPropsBase>,
|
||||
choices: ChoiceItem<T>[],
|
||||
loc: ElementLocator,
|
||||
width: number,
|
||||
|
||||
@@ -17,6 +17,7 @@ import { linear } from 'mutate-animate';
|
||||
import { Background, Selection } from './misc';
|
||||
import { GameUI, IUIController, SetupComponentOptions } from '@motajs/system';
|
||||
import { KeyCode } from '@motajs/client-base';
|
||||
import { IGameUIPropsBase } from '../types';
|
||||
|
||||
export interface InputProps extends DefaultProps, Partial<TextContentProps> {
|
||||
/** 输入框的提示内容 */
|
||||
@@ -544,7 +545,7 @@ export const InputBox = defineComponent<
|
||||
* @param props 额外的 props,参考 {@link ConfirmBoxProps}
|
||||
*/
|
||||
export function getInput(
|
||||
controller: IUIController,
|
||||
controller: IUIController<IGameUIPropsBase>,
|
||||
text: string,
|
||||
loc: ElementLocator,
|
||||
width: number,
|
||||
@@ -581,7 +582,7 @@ export function getInput(
|
||||
* @param props 额外的 props,参考 {@link ConfirmBoxProps}
|
||||
*/
|
||||
export async function getInputNumber(
|
||||
controller: IUIController,
|
||||
controller: IUIController<IGameUIPropsBase>,
|
||||
text: string,
|
||||
loc: ElementLocator,
|
||||
width: number,
|
||||
|
||||
@@ -15,6 +15,7 @@ import { clamp } from 'lodash-es';
|
||||
// @ts-expect-error render/renderer 按 D-54 留在实现层,本文件已移入系统层,按 D-59 暂以标注记录,不反向引用、不解耦
|
||||
import { using } from '../renderer';
|
||||
import { cosh, CurveMode } from '@motajs/animate';
|
||||
import { IGameUIPropsBase } from '../types';
|
||||
|
||||
interface ProgressProps extends DefaultProps {
|
||||
/** 进度条的位置 */
|
||||
@@ -568,7 +569,7 @@ export const WaitBox = defineComponent<
|
||||
* @param props 额外的 props,参考 {@link WaitBoxProps}
|
||||
*/
|
||||
export function waitbox<T>(
|
||||
controller: IUIController,
|
||||
controller: IUIController<IGameUIPropsBase>,
|
||||
loc: ElementLocator,
|
||||
width: number,
|
||||
promise: Promise<T>,
|
||||
|
||||
Reference in new issue
Block a user