Index

Package: Message

Description

package Widgets.Containers.Game_Screens.Message is
Copyright (c) 2012 Kevin Wellwood All rights reserved. This source code is distributed under the Modified BSD License. For terms and conditions, see license.txt.

Classes

Message_Screen

type Message_Screen is new Game_Screen and Key_Listener with private;

Ancestors:

Primitive operations:

Construct (overriding Widgets.Containers.Game_Screens.Construct)
Handle_Action
Objects.Construct (Inherited)
Pack (overriding Widgets.Containers.Pack)
Widgets.Activate_Popup (Inherited)
Widgets.Bring_To_Front (Inherited)
Widgets.Construct (Inherited)
Widgets.Containers.Add_Child (Inherited)
Widgets.Containers.Apply_Container_Layout (Inherited)
Widgets.Containers.Bring_To_Front (Inherited)
Widgets.Containers.Delete (Inherited)
Widgets.Containers.Delete_Child (Inherited)
Widgets.Containers.Delete_Children (Inherited)
Widgets.Containers.Draw (Inherited)
Widgets.Containers.Draw_Children (Inherited)
Widgets.Containers.Draw_Content (Inherited)
Widgets.Containers.Draw_Content_Foreground (Inherited)
Widgets.Containers.Find_Widget_At (Inherited)
Widgets.Containers.Game_Screens.Draw_Content (Inherited)
Widgets.Containers.Give_Focus (Inherited)
Widgets.Containers.Handle_Rooted (Inherited)
Widgets.Containers.Handle_Shown (Inherited)
Widgets.Containers.Remove_Child (Inherited)
Widgets.Get_Color (Inherited)
Widgets.Get_Min_Height (Inherited)
Widgets.Get_Min_Width (Inherited)
Widgets.Get_Process_Name (Inherited)
Widgets.Get_View (Inherited)
Widgets.Get_Window (Inherited)
Widgets.Handle_Action (Inherited)
Widgets.Is_Rooted (Inherited)
Widgets.Is_Showing (Inherited)
Widgets.On_Blur (Inherited)
Widgets.On_Click (Inherited)
Widgets.On_Descendant_Shown (Inherited)
Widgets.On_Disabled (Inherited)
Widgets.On_Enabled (Inherited)
Widgets.On_Enter (Inherited)
Widgets.On_Exit (Inherited)
Widgets.On_Focus (Inherited)
Widgets.On_Key_Press (Inherited)
Widgets.On_Key_Release (Inherited)
Widgets.On_Key_Typed (Inherited)
Widgets.On_Mouse_Held (Inherited)
Widgets.On_Mouse_Move (Inherited)
Widgets.On_Mouse_Press (Inherited)
Widgets.On_Mouse_Release (Inherited)
Widgets.On_Mouse_Scroll (Inherited)
Widgets.On_Resize (Inherited)
Widgets.On_Rooted (Inherited)
Widgets.On_Shown (Inherited)
Widgets.Set_Border (Inherited)
Widgets.Set_Color (Inherited)
Widgets.Set_Parent (Inherited)
Widgets.Set_Zoom (Inherited)
Widgets.To_String (Inherited)
Widgets.Translate_To_Content (Inherited)
Widgets.Translate_To_Window (Inherited)
The message screen is a blue bordered box in the center of the screen with a character's picture on the left and up to three lines of text on the right. It does not accept any input.

Subprograms & Entries

Create_Message_Screen

function Create_Message_Screen
( view: not null access Game_Views.Game_View'Class;
id: String;
transparent: Boolean := True ) return A_Game_Screen;
Creates a new message screen with a default icon of Keen and no text. Set 'transparent' to False to hide the screen behind this one with a black background.

Set_Closable

procedure Set_Closable
( this: not null access Message_Screen'Class;
closable: Boolean );
Sets whether or not the message screen can be closed by the user. The default is False.

Set_Icon

procedure Set_Icon
( this: not null access Message_Screen'Class;
filename: String );
Sets the icon to the left of the text in the message box.

Set_Auto_Pause

procedure Set_Auto_Pause
( this: not null access Message_Screen'Class;
enabled: Boolean );
If enabled, the message screen will auto-pause gameplay while the screen is active. Don't put other opaque screens on top of the message popup screen, because this will deactivate it.

Set_Text

procedure Set_Text
( this: not null access Message_Screen'Class;
text: String );
Puts 'text' into the message box, splitting it into multiple lines on whitespace boundaries, as necessary.

Set_Text_Align

procedure Set_Text_Align
( this: not null access Message_Screen'Class;
align: Align_Type );
Sets the text alignment in the message box. If it is aligned to the left, the icon will be on the right. If it is aligned to the right, the icon will be on the left. The default is Align_Right.