graphic-pixi/lib/ui/Menu.d.ts

147 lines
2.6 KiB
TypeScript
Raw Normal View History

2023-12-12 17:31:07 +08:00
/**
*
*/
export interface MenuOptions {
/**
*
*/
name: string;
/**
*
*/
title?: string;
/**
*
*/
groups: MenuGroupOptions[];
/**
*
*/
style?: MenuStyleOptions;
}
/**
*
*/
export interface MenuGroupOptions {
/**
*
*/
name?: string;
/**
*
*/
items: MenuItemOptions[];
}
export interface MenuCompletionOptions extends MenuOptions {
style: MenuCompletionStyleOptions;
}
/**
*
*/
export interface MenuStyleOptions {
/**
*
*/
titleStyle?: MenuItemStyle;
/**
*
*/
backgroundColor?: string;
/**
* 线,1,0线
*/
borderWidth?: number;
/**
*
*/
borderColor?: string;
/**
* ,0
*/
borderRoundRadius?: number;
/**
*
*/
itemStyle?: MenuItemStyle;
}
export interface MenuCompletionStyleOptions extends MenuStyleOptions {
titleStyle: MenuItemStyle;
backgroundColor: string;
border: boolean;
borderWidth: number;
borderColor: string;
borderRoundRadius: number;
itemStyle: MenuCompletionItemStyle;
}
export interface MenuItemOptions {
/**
*
*/
name: string;
/**
* ,
*/
disabled?: boolean;
/**
* ,
*/
visible?: boolean;
/**
*
*/
shortcutKeys?: string[];
/**
*
*/
handler?: () => void;
fontColor?: string;
/**
*
*/
subMenu?: MenuOptions;
}
export interface MenuItemStyle {
/**
*
*/
fontSize: number;
/**
*
*/
fontColor?: string;
/**
* hover颜色
*/
hoverColor?: string;
/**
*
*/
disabledFontColor?: string;
/**
*
*/
padding: number[] | number;
}
export interface MenuCompletionItemStyle extends MenuItemStyle {
/**
*
*/
fontColor: string;
/**
*
*/
hoverColor: string;
/**
*
*/
disabledFontColor: string;
}
/**
*
*/
export declare const DefaultWhiteStyleOptions: MenuCompletionStyleOptions;
/**
*
*/
export declare const DefaultWhiteMenuOptions: MenuCompletionOptions;