From 02aa2613182819bedcf7873a668288e08e20e174 Mon Sep 17 00:00:00 2001 From: Li Jin Date: Sat, 30 Dec 2023 09:40:00 +0800 Subject: [PATCH] fix definition files. [skip CI] --- Assets/Script/Lib/Dora/en/ImGui.d.ts | 8 ++++---- Assets/Script/Lib/Dora/en/dora.d.ts | 4 +++- Assets/Script/Lib/Dora/zh-Hans/ImGui.d.ts | 8 ++++---- Assets/Script/Lib/Dora/zh-Hans/dora.d.ts | 4 +++- 4 files changed, 14 insertions(+), 10 deletions(-) diff --git a/Assets/Script/Lib/Dora/en/ImGui.d.ts b/Assets/Script/Lib/Dora/en/ImGui.d.ts index c9cd15cf1..3ba7d38b5 100644 --- a/Assets/Script/Lib/Dora/en/ImGui.d.ts +++ b/Assets/Script/Lib/Dora/en/ImGui.d.ts @@ -494,8 +494,8 @@ export function BulletItem(this: void): void; export function Button(this: void, label: string, size?: Vec2): boolean; export function SmallButton(this: void, label: string): boolean; export function InvisibleButton(this: void, str_id: string, size: Vec2): boolean; -export function Checkbox(this: void, label: string, p_v: boolean): [boolean, boolean]; -export function RadioButton(this: void, label: string, p_v: number, v_button: number): [boolean, number]; +export function Checkbox(this: void, label: string, p_v: boolean): LuaMultiReturn<[boolean, boolean]>; +export function RadioButton(this: void, label: string, p_v: number, v_button: number): LuaMultiReturn<[boolean, number]>; export function RadioButton(this: void, label: string, active: boolean): boolean; export function PlotLines( this: void, @@ -530,7 +530,7 @@ export function ListBox( current_item: number, items: string[], height_in_items?: number - ): [boolean, number]; + ): LuaMultiReturn<[boolean, number]>; export function SliderAngle( this: void, @@ -538,7 +538,7 @@ export function SliderAngle( p_rad: number, v_degrees_min?: number, v_degrees_max?: number - ): [boolean, number]; + ): LuaMultiReturn<[boolean, number]>; export function TreeNode(this: void, label: string, inside: () => boolean): boolean; export function TreeNode(this: void, str_id: string, text: string, inside: () => boolean): boolean; diff --git a/Assets/Script/Lib/Dora/en/dora.d.ts b/Assets/Script/Lib/Dora/en/dora.d.ts index 65f13c8e4..582aefe0e 100644 --- a/Assets/Script/Lib/Dora/en/dora.d.ts +++ b/Assets/Script/Lib/Dora/en/dora.d.ts @@ -3764,7 +3764,7 @@ interface ModelClass { * Can be filename with or without extension like: "Model/item" or "Model/item.model". * @returns A new instance of 'Model'. */ - (filename: string): Model; + (this: void, filename: string): Model; } const modelClass: ModelClass; @@ -5802,3 +5802,5 @@ export {view as View}; export type VGPaintType = BasicType<"VGPaint">; } // module "dora" + +declare function p(this: void, ...args: any[]): void; diff --git a/Assets/Script/Lib/Dora/zh-Hans/ImGui.d.ts b/Assets/Script/Lib/Dora/zh-Hans/ImGui.d.ts index c9cd15cf1..3ba7d38b5 100644 --- a/Assets/Script/Lib/Dora/zh-Hans/ImGui.d.ts +++ b/Assets/Script/Lib/Dora/zh-Hans/ImGui.d.ts @@ -494,8 +494,8 @@ export function BulletItem(this: void): void; export function Button(this: void, label: string, size?: Vec2): boolean; export function SmallButton(this: void, label: string): boolean; export function InvisibleButton(this: void, str_id: string, size: Vec2): boolean; -export function Checkbox(this: void, label: string, p_v: boolean): [boolean, boolean]; -export function RadioButton(this: void, label: string, p_v: number, v_button: number): [boolean, number]; +export function Checkbox(this: void, label: string, p_v: boolean): LuaMultiReturn<[boolean, boolean]>; +export function RadioButton(this: void, label: string, p_v: number, v_button: number): LuaMultiReturn<[boolean, number]>; export function RadioButton(this: void, label: string, active: boolean): boolean; export function PlotLines( this: void, @@ -530,7 +530,7 @@ export function ListBox( current_item: number, items: string[], height_in_items?: number - ): [boolean, number]; + ): LuaMultiReturn<[boolean, number]>; export function SliderAngle( this: void, @@ -538,7 +538,7 @@ export function SliderAngle( p_rad: number, v_degrees_min?: number, v_degrees_max?: number - ): [boolean, number]; + ): LuaMultiReturn<[boolean, number]>; export function TreeNode(this: void, label: string, inside: () => boolean): boolean; export function TreeNode(this: void, str_id: string, text: string, inside: () => boolean): boolean; diff --git a/Assets/Script/Lib/Dora/zh-Hans/dora.d.ts b/Assets/Script/Lib/Dora/zh-Hans/dora.d.ts index 65f13c8e4..582aefe0e 100644 --- a/Assets/Script/Lib/Dora/zh-Hans/dora.d.ts +++ b/Assets/Script/Lib/Dora/zh-Hans/dora.d.ts @@ -3764,7 +3764,7 @@ interface ModelClass { * Can be filename with or without extension like: "Model/item" or "Model/item.model". * @returns A new instance of 'Model'. */ - (filename: string): Model; + (this: void, filename: string): Model; } const modelClass: ModelClass; @@ -5802,3 +5802,5 @@ export {view as View}; export type VGPaintType = BasicType<"VGPaint">; } // module "dora" + +declare function p(this: void, ...args: any[]): void;