Add initial prototype.
This commit is contained in:
@@ -0,0 +1,64 @@
|
||||
with
|
||||
gel.Window.sdl,
|
||||
gel.Applet.gui_world,
|
||||
gel.Forge,
|
||||
gel.Sprite,
|
||||
|
||||
openGL.Palette,
|
||||
openGL.Model.text.lit_colored,
|
||||
|
||||
Physics;
|
||||
|
||||
pragma unreferenced (gel.Window.sdl);
|
||||
|
||||
|
||||
procedure launch_text_sprite_Demo
|
||||
--
|
||||
-- Shows a few text sprites.
|
||||
--
|
||||
is
|
||||
use gel.Math,
|
||||
openGL.Palette;
|
||||
|
||||
the_Applet : constant gel.Applet.gui_World.view := gel.forge.new_gui_Applet ("text sprite Demo",
|
||||
space_Kind => physics.Bullet);
|
||||
|
||||
the_Text_1 : constant gel.Sprite.view := gel.forge.new_text_Sprite (the_Applet.gui_World,
|
||||
Origin_3D,
|
||||
"Howdy",
|
||||
the_Applet.Font,
|
||||
Green);
|
||||
|
||||
the_Text_2 : constant gel.Sprite.view := gel.forge.new_text_Sprite (the_Applet.gui_World,
|
||||
Origin_3D,
|
||||
"Doody",
|
||||
the_Applet.Font,
|
||||
Green);
|
||||
text_1_Model : constant openGL.Model.text.lit_colored.view
|
||||
:= openGL.Model.text.lit_colored.view (the_Text_1.graphics_Model);
|
||||
begin
|
||||
the_Applet.gui_Camera.Site_is ([0.0, 0.0, 50.0]); -- Position the camera.
|
||||
the_Applet.enable_simple_Dolly (1); -- Enable user camera control via keyboards.
|
||||
|
||||
the_Applet.gui_World.add (the_Text_1);
|
||||
the_Applet.gui_World.add (the_Text_2);
|
||||
|
||||
the_Text_2.Site_is ([0.0, 10.0, 0.0]);
|
||||
|
||||
while the_Applet.is_open
|
||||
loop
|
||||
if text_1_Model.Text = "Yay"
|
||||
then
|
||||
text_1_Model.Text_is ("Howdy");
|
||||
else
|
||||
text_1_Model.Text_is ("Yay");
|
||||
end if;
|
||||
|
||||
the_Applet.gui_World.evolve;
|
||||
the_Applet.freshen; -- Handle any new events and update the screen.
|
||||
|
||||
delay 0.5;
|
||||
end loop;
|
||||
|
||||
the_Applet.destroy;
|
||||
end launch_text_sprite_Demo;
|
||||
17
4-high/gel/applet/demo/sprite/text/text_sprite_demo.gpr
Normal file
17
4-high/gel/applet/demo/sprite/text/text_sprite_demo.gpr
Normal file
@@ -0,0 +1,17 @@
|
||||
with
|
||||
"gel",
|
||||
"lace_shared";
|
||||
|
||||
project text_sprite_Demo
|
||||
is
|
||||
for Object_Dir use "build";
|
||||
for Exec_Dir use ".";
|
||||
for Main use ("launch_text_sprite_demo.adb");
|
||||
for Languages use ("Ada");
|
||||
|
||||
package Ide renames Lace_shared.Ide;
|
||||
package Builder renames Lace_shared.Builder;
|
||||
package Compiler renames Lace_shared.Compiler;
|
||||
package Binder renames Lace_shared.Binder;
|
||||
|
||||
end text_sprite_Demo;
|
||||
Reference in New Issue
Block a user