Page Menu
Home
Phabricator (Chris)
Search
Configure Global Search
Log In
Files
F631898
LoadDialog.as
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Authored By
Unknown
Size
1 KB
Referenced Files
None
Subscribers
None
LoadDialog.as
View Options
import
dialogs.Dialog
;
import
elements.GuiFileChooser
;
class
LoadDialog
:
Dialog
{
GuiFileChooser
@
chooser
;
GuiButton
@
confirm
;
LoadDialog
(
IGuiElement
@
bind
,
const
string
&
folder
)
{
super
(
bind
);
addTitle
(
locale
::
LOAD
);
@
window
.
callback
=
this
;
@
chooser
=
GuiFileChooser
(
window
,
Alignment
(
Left
+
12
,
Top
+
38
,
Right
-
12
,
Bottom
-
12
),
folder
,
""
,
CFM_Single
);
@
confirm
=
GuiButton
(
window
,
Alignment
(
Left
+
0.8f
+
4
,
Bottom
-
42
,
Right
-
12
,
Bottom
-
12
),
locale
::
LOAD
);
confirm
.
disabled
=
true
;
height
=
500
;
addDialog
(
this
);
}
void
focus
()
{
Dialog
::
focus
();
}
string
get_path
()
{
return
chooser
.
getSelectedPath
(
true
);
}
//Event callbacks
void
clickConfirm
()
{
}
bool
onGuiEvent
(
const
GuiEvent
&
event
)
{
if
((
event
.
caller
is
chooser
&&
event
.
type
==
GUI_Confirmed
)
||
(
event
.
caller
is
confirm
&&
event
.
type
==
GUI_Clicked
))
{
if
(
chooser
.
selectedCount
!=
0
)
clickConfirm
();
close
();
return
true
;
}
if
(
event
.
caller
is
chooser
&&
event
.
type
==
GUI_Changed
)
confirm
.
disabled
=
chooser
.
selectedCount
==
0
;
return
Dialog
::
onGuiEvent
(
event
);
}
};
File Metadata
Details
Attached
Mime Type
text/x-java
Expires
Sun, Nov 15, 1:04 PM (1 d, 22 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
152356
Default Alt Text
LoadDialog.as (1 KB)
Attached To
Mode
R80 StarRuler2-Source
Attached
Detach File
Event Timeline