Skip to content

Commit

Permalink
fix details
Browse files Browse the repository at this point in the history
  • Loading branch information
nighca committed Aug 9, 2024
1 parent 2fd3abd commit a2b88e8
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions docs/product/widget.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,8 @@ After adding a Widget, users can adjust its Name, Basic Config, Advanced Config,
Both the code of the Stage and the Sprite can interact with the Widgets in the current Stage through the following interfaces:

```go
scoreMonitor := getWidget("score").(*Monitor)
usernameInput := getWidget("usernameInput").(*Input)
scoreMonitor := getWidget("score").(Monitor)
usernameInput := getWidget("usernameInput").(Input)

// `show` & `setXYPos` are basic methods provided by all types of Widgets
scoreMonitor.show
Expand Down
4 changes: 2 additions & 2 deletions docs/product/widget.zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@ Widget 添加完成后,用户可以调整其 Name、Basic Config、Advanced Co
Stage 与 Sprite 的代码均可以通过以下接口与当前 Stage 中的 Widget 进行交互:

```go
scoreMonitor := getWidget("score").(*Monitor)
usernameInput := getWidget("usernameInput").(*Input)
scoreMonitor := getWidget("score").(Monitor)
usernameInput := getWidget("usernameInput").(Input)

// `show` & `setXYPos` 等是基础方法,所有类别的 Widget 都会提供
scoreMonitor.show
Expand Down
2 changes: 1 addition & 1 deletion spx-gui/src/models/widget/widget.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { reactive } from 'vue'
import { Disposable } from '@/utils/disposable'
import { validateWidgetName } from '../common/asset-name'
import { Disposable } from '../common/disposable'
import type { Stage } from '../stage'

export type BaseWidgetInits = {
Expand Down

0 comments on commit a2b88e8

Please sign in to comment.