///////////////////////////////
#include <acknex.h>
#include <default.c>
///////////////////////////////
//BMAP* backgroundpergament_tga = "backgroundpergament.jpg"; // background image 800x600
BMAP* transparentbutton_pcx = "transparentbutton.pcx"; // 210x40
FONT* normal38_font = "Arial#38"; // was using a cooler font here
FONT* medium44_font = "Arial#44"; // but it's uncommon so changed
FONT* large50_font = "Arial#50"; // it to standard boring arial...
TEXT* pulsatingtextpointer = NULL;
////////////////////////////////////////// START ///////////////////////////////////////
PANEL* start_panel = // the first panel. will show at game start up
{
layer = 1;
// bmap = backgroundpergament_tga;
flags = OVERLAY | SHOW;
button (295, 250, transparentbutton_pcx, transparentbutton_pcx, transparentbutton_pcx, NULL, normalfont, newgame_puls);
button (295, 290, transparentbutton_pcx, transparentbutton_pcx, transparentbutton_pcx, NULL, normalfont, loadgame_puls);
button (295, 330, transparentbutton_pcx, transparentbutton_pcx, transparentbutton_pcx, NULL, normalfont, options_puls);
// button (295, 370, transparentbutton_pcx, transparentbutton_pcx, transparentbutton_pcx, NULL, normalfont, credits_puls);
// button (295, 410, transparentbutton_pcx, transparentbutton_pcx, transparentbutton_pcx, NULL, normalfont, quitgame_puls);
}
TEXT* pulsatingtextpointer2 =
{
font = normal38_font;
}
TEXT* newgame_txt =
{
pos_x = 400;
pos_y = 250;
layer = 2;
font = normal38_font;
red = 255;
green = 255;
blue = 190;
string = "New Game";
flags = CENTER_X | CENTER_Y | SHADOW | SHOW;
}
TEXT* loadgame_txt =
{
pos_x = 400;
pos_y = 290;
layer = 2;
font = normal38_font;
red = 255;
green = 255;
blue = 190;
string = "Load a Game";
flags = CENTER_X | CENTER_Y | SHADOW | SHOW;
}
TEXT* options_txt =
{
pos_x = 400;
pos_y = 330;
layer = 2;
font = normal38_font;
red = 255;
green = 255;
blue = 190;
string = "Configuration";
flags = CENTER_X | CENTER_Y | SHADOW | SHOW;
}
////////////////////////// FUNCTION MAIN /////////////////////////////////
function main()
{
video_mode = 7; // 800x600
mouse_mode = 1;
wait (1);
while (1)
{
mouse_pos.x = mouse_cursor.x; // need these to move the cursor
mouse_pos.y = mouse_cursor.y;
wait (1);
}
}
//////////////////////////////////////////////////////////////////////////
function normalfont ()
{
pulsatingtextpointer2 = pulsatingtextpointer;
pulsatingtextpointer2.font = normal38_font;
wait (1);
}
function pulsate ()
{
while (mouse_calm) // while pointer over button
{
pulsatingtextpointer.font = medium44_font;
wait (-0.2);
pulsatingtextpointer.font = large50_font;
wait (-0.2);
pulsatingtextpointer.font = medium44_font;
wait (-0.2);
pulsatingtextpointer.font = normal38_font;
wait (-0.2);
if (mouse_moving) { break; }
}
wait(1);
}
function newgame_puls()
{
pulsatingtextpointer = newgame_txt;
pulsate();
}
function loadgame_puls()
{
pulsatingtextpointer = loadgame_txt;
pulsate();
}
function options_puls()
{
pulsatingtextpointer = options_txt;
pulsate();
}