etqw-sdk/base/guis/mainmenu/dialogs/proposemembership.include

88 lines
2.7 KiB
Text
Raw Permalink Normal View History

2008-05-29 00:00:00 +00:00
//===============================================================
// Propose Membership Popup
//===============================================================
_dialog( ProposeMembership, localize( "guis/mainmenu/invitemember" ), _center( desktop, width ), _center( desktop, height ), 220, 100, "noMove", "dim" )
_input_dialog( ProposeMembership )
_on_default( ProposeMembershipOk, ProposeMembershipCancel )
properties {
float autoClose = false;
}
events {
onNamedEvent "onShow" {
callSuper();
setTabStop( 0 );
autoClose = false;
}
onPropertyChanged "gui.activePopup" "allowEvents" {
if( isVisible() && compare( gui.activePopup, "" ) == true && allowEvents ) {
setTabStop( 0 );
}
}
onPropertyChanged "gui.onConnectionLost" {
if( visible ) {
_close_input
}
}
}
_edit( ProposeMembership, _right( dlgProposeMembership ), _top( dlgProposeMembership ) + 10, 100, BUTTON_HEIGHT )
_clear_on_show
_draw_right_edit_label( localize( "guis/mainmenu/username" ), COLOR_TEXT, 80 )
properties {
float maxTextLength = 20;
}
_end_edit
_button( ProposeMembershipOk, _to_left_of( btnProposeMembershipCancel ) - 3, _bottom( dlgProposeMembership ), BUTTON_WIDTH, BUTTON_HEIGHT )
properties {
float taskActive = 0;
handle localizedText = localize( "guis/mainmenu/invitemember" );
}
_button_disable_if( "gui.edtProposeMembership.editText", compare( gui.edtProposeMembership.editText, "" ) )
_button_action(
if( allowEvents == false ) {
return;
}
taskActive = 1;
sdnet.proposeMembership( gui.edtProposeMembership.editText, gui.blankWStr );
_show_popup( sdNetProgress )
)
events {
onPropertyChanged "sdnet.taskActive" {
if ( sdnet.taskActive == 0 ) {
if ( taskActive == 1 ) {
//_close_input;
taskActive = 0;
// process result
if ( sdnet.taskErrorCode == SDNET_NO_ERROR ) {
taskActive = 0;
gui.lstTeam.postNamedEvent( "requestUpdate" );
gui.edtProposeMembership.editText = "";
if( gui.dlgProposeMembership.autoClose ) {
_close_input
}
return;
}
// process error
_setup_confirmation_ok_error( sdnet.taskResultMessage );
_show_popup( confirmation )
return;
}
}
}
}
_end_button
_button( ProposeMembershipCancel, _right( dlgProposeMembership ), _bottom( dlgProposeMembership ), BUTTON_WIDTH, BUTTON_HEIGHT )
properties {
handle localizedText = localize( "guis/mainmenu/cancel" );
}
_button_action(
_close_input;
)
_end_button
_end_dialog