Index

Package: Paddle_Wars

Description

package Widgets.Paddle_Wars 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

Paddle_War

type Paddle_War is new Widget and Animated with private;

Ancestors:

Primitive operations:

Activate_Popup (Inherited)
Bring_To_Front (Inherited)
Construct (Inherited)
Construct
Construct (Inherited)
Delete (overriding Delete)
Draw (Inherited)
Draw_Content
Draw_Content (Inherited)
Find_Widget_At (Inherited)
Get_Color (Inherited)
Get_Min_Height (overriding Get_Min_Height)
Get_Min_Width (overriding Get_Min_Width)
Get_Process_Name (Inherited)
Get_Process_Name (Inherited)
Get_View (Inherited)
Get_Window (Inherited)
Handle_Blur (Inherited)
Handle_Click (Inherited)
Handle_Descendant_Shown (Inherited)
Handle_Disabled (Inherited)
Handle_Enabled (Inherited)
Handle_Enter (Inherited)
Handle_Exit (Inherited)
Handle_Focus (Inherited)
Handle_Key_Held (overriding Handle_Key_Held)
Handle_Key_Press (Inherited)
Handle_Key_Release (overriding Handle_Key_Release)
Handle_Mouse_Held (Inherited)
Handle_Mouse_Move (Inherited)
Handle_Mouse_Press (Inherited)
Handle_Mouse_Release (Inherited)
Handle_Mouse_Scroll (Inherited)
Handle_Resize (Inherited)
Handle_Rooted (Inherited)
Handle_Shown (overriding Handle_Shown)
Is_Rooted (Inherited)
Is_Showing (Inherited)
Pack (Inherited)
Set_Color (Inherited)
Set_Dirty (Inherited)
Set_Parent (Inherited)
Set_Zoom (Inherited)
Tick (Inherited)
Tick
To_String (Inherited)
Translate_To_Content (Inherited)
Translate_To_Window (Inherited)
A Paddle War widget implements the pong-like Paddle War game in the Keen menu. The player plays against a computer opponent. The game logic is implemented as an Animated widget, using the Tick procedure to update the game state. There is no maximum score.

Types

A_Paddle_War

type A_Paddle_War is access all Paddle_War'Class;

Subprograms & Entries

Create_Paddle_War

function Create_Paddle_War
( view: not null access Game_Views.Game_View'Class;
id: String;
libName: String ) return A_Paddle_War;
Creates a new Paddle War widget with a new game ready to play.

Reset

procedure Reset
( this: not null access Paddle_War'Class );
Manually resets the Paddle War game. This can only be called after the widget has been parented. The game will also automatically reset when the widget becomes visible.