Index

Package: Game_Screens

Description

package Widgets.Containers.Game_Screens 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

Game_Screen (abstract)

type Game_Screen is abstract new Container with private;

Ancestors:

Immediate Children:

Primitive operations:

Construct
Draw_Content
Objects.Construct (Inherited)
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.Give_Focus (Inherited)
Widgets.Containers.Handle_Rooted (Inherited)
Widgets.Containers.Handle_Shown (Inherited)
Widgets.Containers.Pack (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.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)
A Game_Screen is a simple abstract container for multiple widgets, intended to be used with a Screen_Manager object. It fills the entire window and is intended to represent one "state" of a game's GUI, managing input and logic, and transitions to other screens. A screen can have an optional background image or color or it can have a transparent background. This class is abstract with the intention that it be instantiated specifically for each screen in a game's interface (e.g. title screen, main menu, loading screen, game play, etc.) A screen populates its child widgets at construction and also handles all Actions dispatched by its children.

Types

A_Game_Screen

type A_Game_Screen is access all Game_Screen'Class;

Subprograms & Entries

Activate

procedure Activate
( this: access Game_Screen );
Activates the screen when it hits the front of the screen manager and begins accepting user input. This procedure should be overriden to focus an input widget, if necessary. It is possible for Activate to be called multiple times without deactivation, so if its important that this only happens once, check Is_Active. When overriding this procedure, call this base implementation first.

Deactivate

procedure Deactivate
( this: access Game_Screen );
Deactivates the screen when becomes hidden by another screen in the screen manager, or when it is removed from the screen manager. When overriding this procedure, call this base implementation first.

Exit_Screen

procedure Exit_Screen
( this: not null access Game_Screen'Class );
Indicates the screen will now begin exiting. On the screen manager's next tick after this screen has finished exiting, the screen will be removed and destroyed. Deactivate will be called just before the screen is removed from its manager.

Is_Active

function Is_Active
( this: not null access Game_Screen'Class ) return Boolean;
Returns True if the game screen has been activated by a call from the screen manager to Activate. This remains True until the screen is deactivated.

Is_Exiting

function Is_Exiting
( this: not null access Game_Screen'Class ) return Boolean;
Returns True if the screen is in the processing of exiting.

Is_Popup

function Is_Popup
( this: not null access Game_Screen'Class ) return Boolean;
Returns True if the game screen is a light-weight popup screen with a transparent screen.