FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
Monogatari/src/actions/ShowTextBox.ts at develop · Monogatari/Monogatari · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
Monogatari
/
Monogatari
Public
Uh oh!
There was an error while loading.
Please reload this page
.
Notifications
You must be signed in to change notification settings
Fork
127
Star
879
Code
Issues
24
Pull requests
3
Discussions
Actions
Projects
Wiki
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Discussions
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
Monogatari
/
src
/
actions
/
ShowTextBox.ts
Copy path
More file actions
More file actions
Latest commit
History
History
History
34 lines (26 loc) · 1.04 KB
Breadcrumbs
Monogatari
/
src
/
actions
/
ShowTextBox.ts
Copy path
File metadata and controls
34 lines (26 loc) · 1.04 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
import
Action
from
'./../lib/Action'
;
import
type
TextBox
from
'./../components/text-box'
;
import
{
ActionApplyResult
,
ActionRevertResult
}
from
'../lib/types'
;
export
class
ShowTextBox
extends
Action
{
static
override
id
=
'Show::TextBox'
;
static
override
matchString
(
[
show
,
type
]
:
string
[
]
)
:
boolean
{
return
show
===
'show'
&&
type
===
'textbox'
;
}
override
async
apply
(
)
:
Promise
<
void
>
{
const
textBox
=
this
.
engine
.
element
(
)
.
find
(
'[data-component="text-box"]'
)
.
get
(
0
)
as
TextBox
|
undefined
;
textBox
?.
setState
(
{
hidden
:
false
}
)
;
}
override
async
didApply
(
)
:
Promise
<
ActionApplyResult
>
{
this
.
engine
.
state
(
{
textboxHidden
:
false
}
)
;
return
{
advance
:
true
}
;
}
override
async
revert
(
)
:
Promise
<
void
>
{
const
textBox
=
this
.
engine
.
element
(
)
.
find
(
'[data-component="text-box"]'
)
.
get
(
0
)
as
TextBox
|
undefined
;
textBox
?.
setState
(
{
hidden
:
true
}
)
;
}
override
async
didRevert
(
)
:
Promise
<
ActionRevertResult
>
{
this
.
engine
.
state
(
{
textboxHidden
:
true
}
)
;
return
{
advance
:
true
,
step
:
true
}
;
}
}
export
default
ShowTextBox
;
Back
|
FazBrowse Home
|
New Git URL