FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
UnrealEnginePython/examples/slate_example.py at pr_array_params · dfb/UnrealEnginePython · GitHub
dfb
UnrealEnginePython
Repository navigation
Code
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
UnrealEnginePython
/
examples
/
slate_example.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
46 lines (30 loc) · 1.17 KB
Breadcrumbs
UnrealEnginePython
/
examples
/
slate_example.py
Copy path
File metadata and controls
46 lines (30 loc) · 1.17 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
35
36
37
38
39
40
41
42
43
44
45
46
import
unreal_engine
as
ue
from
unreal_engine
import
SWindow
,
SButton
,
STextBlock
,
SEditableTextBox
,
SMultiLineEditableText
,
SGridPanel
,
SHorizontalBox
,
SPythonEditorViewport
from
unreal_engine
.
classes
import
Blueprint
def
clicked
(
geometry
,
pointer_event
):
ue
.
log
(
'Hello'
)
ue
.
log
(
geometry
.
fields
())
ue
.
log
(
pointer_event
.
fields
())
return
True
def
clicked2
():
ue
.
log
(
'Test'
)
return
True
window
=
SWindow
().
resize
(
1024
,
576
).
set_title
(
'Hello World'
)
horizontal
=
SHorizontalBox
()
button
=
SButton
().
set_content
(
STextBlock
().
set_text
(
'Click ME !'
))
button
.
bind_on_mouse_button_down
(
clicked
)
button
.
bind_on_clicked
(
clicked2
)
box
=
SEditableTextBox
()
editor
=
SMultiLineEditableText
()
editor
.
set_text
(
'Hello'
)
grid
=
SGridPanel
()
grid
.
add_slot
(
button
,
0
,
0
)
grid
.
add_slot
(
box
,
0
,
1
)
grid
.
add_slot
(
editor
,
0
,
2
)
horizontal
.
add_slot
(
grid
,
v_align
=
2
,
h_align
=
2
).
add_slot
(
STextBlock
().
set_text
(
'Second'
),
v_align
=
2
,
h_align
=
2
)
viewport
=
SPythonEditorViewport
()
world
=
viewport
.
get_world
()
bear_bp
=
ue
.
load_object
(
Blueprint
,
'/Game/Character3_Blueprint'
)
bear
=
world
.
actor_spawn
(
bear_bp
.
GeneratedClass
)
horizontal
.
add_slot
(
viewport
)
window
.
set_content
(
horizontal
)
Back
|
FazBrowse Home
|
New Git URL