@@ -7,7 +7,7 @@ const VFlowContainer = Component.make(Godot.VFlowContainer)
|
||||
const Label = Component.make(Godot.Label)
|
||||
const TextEdit = Component.make(Godot.TextEdit)
|
||||
const Button = Component.make(Godot.Button)
|
||||
const Test = Component.
|
||||
const TestUi1Scene = Component.fromScene("res://src/TestUi1.tscn")
|
||||
|
||||
export function TestUi1Component() {
|
||||
const [text, setText] = useState("Default text")
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
declare module "godot" {
|
||||
interface ResourceTypes {
|
||||
"res://icon.svg": CompressedTexture2D;
|
||||
}
|
||||
}
|
||||
@@ -45,7 +45,7 @@ export declare namespace fromScene {
|
||||
|
||||
export const fromScene = <A extends fromScene.SceneNames>(
|
||||
name: A
|
||||
): Component<Godot.ResourceTypes[A]> => Object.setPrototypeOf(
|
||||
): Component<Godot.ResourceTypes[A] extends Godot.PackedScene<infer T> ? T : never> => Object.setPrototypeOf(
|
||||
Object.assign(
|
||||
(props: Props<Godot.ResourceTypes[A]>) => React.createElement("element", { ...props }),
|
||||
{ displayName: name },
|
||||
|
||||
@@ -31,5 +31,5 @@
|
||||
"sourceMap": true
|
||||
},
|
||||
|
||||
"include": ["./src", "./typings", "./gen"]
|
||||
"include": ["./src", "./typings"]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user