diff --git a/Prima/MsgBox.pm b/Prima/MsgBox.pm index 2dee18ef..8779a6db 100644 --- a/Prima/MsgBox.pm +++ b/Prima/MsgBox.pm @@ -124,11 +124,15 @@ sub message_box $self-> clear; $self-> put_image(0, ($self->height - $icon->height)/2, $icon); }, + %{$extras->{icon} // {}}, ); $iconRight = $iconView-> right; } - my $label = $dlg-> insert( 'Label' , text => $text ); + my $label = $dlg-> insert( 'Label' , + text => $text, + %{$extras->{label} // {}}, + ); unless ( defined $extras->{wordWrap} ) { # can the text fit in a quarter of the screen? my @as = map { $_ / 2 } $::application->size; @@ -232,6 +236,7 @@ sub input_box size => [ 415, 16], text => $text, showAccelChar => 1, + %{$extras->{label} // {}}, ); my $input = $dlg-> insert( InputLine => @@ -239,7 +244,7 @@ sub input_box origin => [ 10, 56], text => $string, current => 1, - defined($extras-> {inputLine}) ? %{$extras-> {inputLine}} : (), + %{$extras->{input} // {}}, ); my @ret = ( $dlg-> execute, $input-> text); @@ -317,7 +322,7 @@ in the dialog. The PROFILE parameter is a hash, that contains customization parameters for the buttons and the input line. To access the input line parameters the -C hash key is used. See L for more +C hash key is used. See L for more information on BUTTONS and PROFILES. Returns different results depending on the call context. In the array @@ -439,12 +444,22 @@ Selects the help TOPIC invoked in the help viewer window if the C button is pressed by the user. If this option is not set, L is displayed. -=item inputLine HASH +=item icon HASH + +Only for C. + +Contains the profile hash passed to the image viewer as creation parameters + +=item input HASH Only for C. Contains the profile hash passed to the input line as creation parameters. +=item label HASH + +Contains the profile hash passed to the label as creation parameters. + =item owner WINDOW If set, the dialog owner is set to WINDOW, otherwise to C<$::main_window>.