///////////////////////////////
#include <acknex.h>
#include <default.c>
///////////////////////////////
//BMAP* backgroundpergament_tga = "backgroundpergament.jpg"; // background image 800x600
BMAP* transparentbutton = "#210x40x32"; //create temporary black image for button
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...
////////////////////////////////////////// START ///////////////////////////////////////
PANEL* start_panel = // the first panel. will show at game start up
{
layer = 1;
pos_x = 295; pos_y = 250;
size_x = 210; size_y = 440;
button (0, 0 , transparentbutton, NULL, NULL, NULL, NULL, pulsate_text);
button (0, 40 , transparentbutton, NULL, NULL, NULL, NULL, pulsate_text);
button (0, 80 , transparentbutton, NULL, NULL, NULL, NULL, pulsate_text);
// button (0, 120, transparentbutton, NULL, NULL, NULL, NULL, pulsate_text);
// button (0, 160, transparentbutton, NULL, NULL, NULL, NULL, pulsate_text);
flags = OVERLAY | SHOW;
}
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 pulsate_text(var butt_over, PANEL* this_pan)
{
proc_kill(4);
newgame_txt.font = normal38_font;
loadgame_txt.font = normal38_font;
options_txt.font = normal38_font;
wait(1);
//
TEXT* this_text;
switch(butt_over)
{
case 1: this_text = newgame_txt;
case 2: this_text = loadgame_txt;
case 3: this_text = options_txt;
}
//
while(1)
{
this_text.font = medium44_font;
wait (-0.2);
if(mouse_panel!=this_pan) break;
this_text.font = large50_font;
wait (-0.2);
if(mouse_panel!=this_pan) break;
this_text.font = medium44_font;
wait (-0.2);
if(mouse_panel!=this_pan) break;
this_text.font = normal38_font;
wait (-0.2);
if(mouse_panel!=this_pan) break;
}
newgame_txt.font = normal38_font;
loadgame_txt.font = normal38_font;
options_txt.font = normal38_font;
}