Post: [Unfinished] - Top Titled Menu
10-13-2012, 09:58 PM #1
Correy
I'm the Original
(adsbygoogle = window.adsbygoogle || []).push({});
Unfinished Top Title Menu
Created By Correy

You must login or register to view this content.





i was clearing up my laptop when i found this, since uses a lot of strings i dumped this a long time ago, it's basically the same as dConnors menu, but a little different and obviously coded by myself.. check it out!

the following things need finishing:

  • Select button needs to be added
  • Players menu/ Sub menu needs coding
  • Coding needs cleaning, as it was in development!
  • Verification system


and before you ask, where's the left title from the picture?
that shows when you scroll onto the second option, it's the same on the end option, i didn't like scrolling from last - first option, if you have a problem with that, just code it in there ha




    
#include common_scripts\utility;
#include maps\mp\_utility;
#include maps\mp\gametypes\_hud_util;
#include maps\mp\gametypes\_rank;

menu()
{

self.menu["menus"][0] = "Menu 1";
self.menu["menus"][1] = "Menu 2";
self.menu["menus"][2] = "Menu 3";
self.menu["menus"][3] = "Menu 4";

self.menu[0]["strings"][0] = "Option 1";
self.menu[0]["strings"][1] = "Option 2";
self.menu[0]["strings"][2] = "Option 3";
self.menu[0]["strings"][3] = "Option 4";

self.menu[1]["strings"][0] = "Option 11";
self.menu[1]["strings"][1] = "Option 12";
self.menu[1]["strings"][2] = "Option 13";
self.menu[1]["strings"][3] = "Option 14";

self.menu[2]["strings"][0] = "Option 111";
self.menu[2]["strings"][1] = "Option 121";
self.menu[2]["strings"][2] = "Option 131";
self.menu[2]["strings"][3] = "Option 141";

self.menu[3]["strings"][0] = "Option 111";
self.menu[3]["strings"][1] = "Option 112";
self.menu[3]["strings"][2] = "Option 113";
self.menu[3]["strings"][3] = "Option 114";

run_menu();
}
draw_options( menu )
{
self.menu["cursor"] = 0;
self.menu["menu_open"] = true;
self.menu["current_menu"] = menu;

if( isDefined( self.menu["text"] ))
{
for( i = 0; i < self.menu["text"].size; i++ )
self.menu["text"][i] destroy();
}

//top menu's
for( int = 0; int < 3; int++ )
{
if( !isDefined( self.menu["title"][int]))
{
self.menu["title"][0] = CreateString( "objective", 1.5, "TOPLEFT", "TOPLEFT", 50, undefined, 1, 10, self.menu["menus"][get_menu() - 1] );
self.menu["title"][1] = CreateString( "objective", 2.5, "TOPCENTER", "TOPCENTER", undefined, undefined, 1, 10, self.menu["menus"][get_menu()] );
self.menu["title"][2] = CreateString( "objective", 1.5, "TOPRIGHT", "TOPRIGHT", -50, undefined, 1, 10, self.menu["menus"][get_menu() + 1] );

}
else
{
self.menu["title"][0] setText( self.menu["menus"][get_menu() - 1] );
self.menu["title"][1] setText( self.menu["menus"][get_menu()] );
self.menu["title"][2] setText( self.menu["menus"][get_menu() + 1] );
}
}

//show current menu options
for( index = 0; index < self.menu[get_menu()]["strings"].size; index++ )
{
self.menu["text"][index] = self createfontstring( "objective", 1.5 );
self.menu["text"][index] setPoint( "TOPCENTER", "TOPCENTER", undefined, 35 + 17.5 * index );
self.menu["text"][index] setText( self.menu[get_menu()]["strings"][index] );
self.menu["text"][index].alpha = 1;
self.menu["text"][index].sort = 10;
}

self.menu["text"][self.menu["cursor"]].color = ( 0, 1, 0 );

self freezecontrols( true );

wait .1;
}
run_menu()
{
self endon( "death" );
for(;Winky Winky
{
if( self FragButtonPressed() && !self.menu["menu_open"] )
{
draw_options(0);
wait 1;
}
if( self.menu["menu_open"] )
{
if( self FragButtonPressed() || self SecondaryOffHandButtonPressed() )
{
if( get_menu() != self.menu["menus"].size -1 )
self.menu["current_menu"] += self FragButtonPressed();

if( get_menu() != 0 )
self.menu["current_menu"] -= self SecondaryOffHandButtonPressed();

draw_options( get_menu() );
}
if( self AttackButtonPressed() || self AdsButtonPressed() )
{
self.menu["cursor"] += self AttackButtonPressed();
self.menu["cursor"] -= self AdsButtonPressed();

if( self.menu["cursor"] > self.menu[get_menu()]["strings"].size - 1)
self.menu["cursor"] = 0;

if( self.menu["cursor"] < 0 )
self.menu["cursor"] = self.menu[get_menu()]["strings"].size - 1;

for( int = 0; int < self.menu[get_menu()]["strings"].size; int++ )
self.menu["text"][int].color = ( 1, 1, 1 );

self.menu["text"][self.menu["cursor"]].color = ( 0, 1, 0 );
}
if( self MeleeButtonPressed() )
{
for( int = 0; int < self.menu[get_menu()]["strings"].size; int++ )
{
self.menu["text"][int] destroy();
self.menu["title"][int] destroy();

self.menu["menu_open"] = false;
self freezeControls( false );
}
}
}
wait .3;
}
}
get_menu()
{
return self.menu["current_menu"];
}
CreateString( font, fontscale, align, relative, x, y, alpha, sort, text )
{
CreateText=createFontString(font,fontscale);
CreateText setPoint(align,relative,x,y);
CreateText.alpha=alpha;
CreateText.sort=sort;
CreateText setText(text);
return CreateText;
}






use as you wish, as it's no longer any good to me,
apart from string overflow the menu is very stable! first person to finish the menu can have +150 reputation points, there's a challenge for you :p
Last edited by Correy ; 10-13-2012 at 10:11 PM.

The following 11 users say thank you to Correy for this useful post:

-MartyNeale-, Lovol, Newelly, Oliver1556, Taylor, TheUnexpected, Uk_ViiPeR, Vampytwistッ, xePixTvx
10-14-2012, 05:12 PM #11
Originally posted by xYARDSALEx View Post
Thats not in the _rank :confused:
nope, it's in missions.gsc
10-14-2012, 05:18 PM #12
Taylor
Former Black Knight.
Originally posted by The
nope, it's in missions.gsc


oh okay, that you :happyguy: Get on skype fgt :lol:

Copyright © 2025, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo