Post: Tuto edit dconnor menu
02-19-2011, 01:56 PM #1
XXXL
Banned
(adsbygoogle = window.adsbygoogle || []).push({}); HI
Today ill do a little tuto for how edit a dconnor menu. Ill not show how to add function, ill only show how to customize the menu.

Ill use dconnor menu code
You must login or register to view this content.

First, how to change the location of the menu? Ex: if you want put the menu at the left or right of the screen.

Locatize the code (drawmenu)

    
drawMenu( cycle, scroll ){
menu = [[self.getMenu]]();

//get the titles
[COLOR="YellowGreen"] titles = self createFontString( "objective", 2.0 ); [/COLOR]
[COLOR="Red"]titles setPoint( "CENTER", "TOP", 0, );[/COLOR]
titleText = "";

//Left Title
if( menu.size > 2 ){
if( cycle-1 < 0 )
titleText += menu[menu.size - 1].name[0];
else
titleText += menu[cycle - 1].name[0];
}

//Center Title
titleText += " " + menu[cycle].name[0] + " ";

//Right Title
if( menu.size > 2 ){
if( cycle > menu.size - 2 )
titleText += menu[0].name[0];
else
titleText += menu[cycle + 1].name[0];
}

titles setText( titleText );
self thread destroyOnAny( titles, "button_rshldr", "button_lshldr",
"dpad_up", "dpad_down", "button_b", "death" );

//draw column
[COLOR="yellowgreen"]column = self createFontString( "objective", 1.3 );"[/COLOR]
[COLOR="red"]column setPoint( "CENTER", "TOP", 0, 20 );[/COLOR]
columnText = "";
extendedColumnText = "";
for( i = 1; i < menu[cycle].name.size; i++ ){
if(i == scroll)
columnText += "^2" + menu[cycle].name[i] + "^7\n";//Highlighted option
else
columnText += menu[cycle].name[i] + "\n";

//Extend the column if the string is too long.
if( columnText.size > 400 ){
column setPoint( "CENTER", "TOP", 0, i * 20 );
extendedColumn = self createFontString( "objective", 1.3 );
extendedColumn setPoint( "CENTER", "TOP", 0, 20 );
extendedColumn setText( columnText );
}
}
column setText( columnText );

self thread destroyOnAny( column, "button_rshldr", "button_lshldr",
"dpad_up", "dpad_down", "button_b", "death" );
}



Check the two line that i put in red. It will be the code that we ill change to change the location of the menu.

First red code:
    
[COLOR="Red"]titles setPoint(titles setPoint( "CENTER", "TOP", 0, 0 ); [/COLOR]


This code is the positioning (coordinate) of the titles of the menu (EX: Admin, Account, Fun) that you cannot click on it. Now, the coordinate of the titles are at the top center (as elitemossy v9). The things that you ill change are the " 0, 0". Do not touch the "CENTER", "TOP". The first 0 is the X axis. The second is Y axis. For those who dont know what it is, X is in the horizontal and Y in the vertical. Lets change the first 0. The length at the horzital is 500. So if you want put the menu at the left change it by -250 (because 0 is at the middle). If you want put the text at the right change it by 250. With that, you can guess the coordinate and put the titles where you want.

The second zero : Like I said, the second zero is the coordinate at the vertical. The lenght at the veritical is around 400. Change by 200 if you want yo put the titles at the middle.

Some exemples:
Titles at the top right of the screen:
    
titles setPoint(titles setPoint( "CENTER", "TOP", 250, 0 );


Titles at the the middle left at the screen
    
titles setPoint(titles setPoint( "CENTER", "TOP", -250, 200 );
:

Now, the second red code
    
[COLOR="red"]column setPoint( "CENTER", "TOP", 0, 20 );[/COLOR]


This is the coordinates of the "funtion" text. The text that you can click. Ex: Godmode, jetpack ... For the first zero, put the same thing of the first zero of the titles. For the the verical value( the second number, it is now 20) take the vertical value of the titles coordinate and add 20. Why add 20? Because you dont want your text over the titles.

Exemple: for a title at the top right:
    
column setPoint( "CENTER", "TOP", 250, 20 );


The green codes are more simple to change. They represent the size of the text. First green text is the titles size and second function texts size.

If you want a tuto to how add effects, flasing text, flashing heart, current score etc.... when you open the menu just write a comment. :p
(adsbygoogle = window.adsbygoogle || []).push({});

The following 2 users say thank you to XXXL for this useful post:

I am Mara, iiMod_Lobbys
02-19-2011, 01:57 PM #2
Codi360
*Epic Banana Man*
Originally posted by XXXL View Post
HI
Today ill do a little tuto for how edit a dconnor menu. Ill not show how to add function, ill only show how to customize the menu.

First, how to change the location of the menu? Ex: if you want put the menu at the left or right of the screen.

Locatize the code (drawmenu)

    
drawMenu( cycle, scroll ){
menu = [[self.getMenu]]();

//get the titles
[COLOR="YellowGreen"] titles = self createFontString( "objective", 2.0 ); [/COLOR]
[COLOR="Red"]titles setPoint( "CENTER", "TOP", 0, );[/COLOR]
titleText = "";

//Left Title
if( menu.size > 2 ){
if( cycle-1 < 0 )
titleText += menu[menu.size - 1].name[0];
else
titleText += menu[cycle - 1].name[0];
}

//Center Title
titleText += " " + menu[cycle].name[0] + " ";

//Right Title
if( menu.size > 2 ){
if( cycle > menu.size - 2 )
titleText += menu[0].name[0];
else
titleText += menu[cycle + 1].name[0];
}

titles setText( titleText );
self thread destroyOnAny( titles, "button_rshldr", "button_lshldr",
"dpad_up", "dpad_down", "button_b", "death" );

//draw column
[COLOR="yellowgreen"]column = self createFontString( "objective", 1.3 );"[/COLOR]
[COLOR="red"]column setPoint( "CENTER", "TOP", 0, 20 );[/COLOR]
columnText = "";
extendedColumnText = "";
for( i = 1; i < menu[cycle].name.size; i++ ){
if(i == scroll)
columnText += "^2" + menu[cycle].name[i] + "^7\n";//Highlighted option
else
columnText += menu[cycle].name[i] + "\n";

//Extend the column if the string is too long.
if( columnText.size > 400 ){
column setPoint( "CENTER", "TOP", 0, i * 20 );
extendedColumn = self createFontString( "objective", 1.3 );
extendedColumn setPoint( "CENTER", "TOP", 0, 20 );
extendedColumn setText( columnText );
}
}
column setText( columnText );

self thread destroyOnAny( column, "button_rshldr", "button_lshldr",
"dpad_up", "dpad_down", "button_b", "death" );
}



Check the two line that i put in red. It will be the code that we ill change to change the location of the menu.

First red code:
    
[COLOR="Red"]titles setPoint(titles setPoint( "CENTER", "TOP", 0, 0 ); [/COLOR]


This code is the positioning (coordinate) of the titles of the menu (EX: Admin, Account, Fun) that you cannot click on it. Now, the coordinate of the titles are at the top center (as elitemossy v9). The things that you ill change are the " 0, 0". Do not touch the "CENTER", "TOP". The first 0 is the X axis. The second is Y axis. For those who dont know what it is, X is in the horizontal and Y in the vertical. Lets change the first 0. The length at the horzital is 500. So if you want put the menu at the left change it by -250 (because 0 is at the middle). If you want put the text at the right change it by 250. With that, you can guess the coordinate and put the titles where you want.

The second zero : Like I said, the second zero is the coordinate at the vertical. The lenght at the veritical is around 800. Change by 400 if you want yo put the titles at the middle.

Some exemples:
Titles at the top right of the screen:
    
titles setPoint(titles setPoint( "CENTER", "TOP", 250, 0 );


Titles at the the middle left at the screen
    
titles setPoint(titles setPoint( "CENTER", "TOP", -250, 400 );
:

Now, the second red code
    
[COLOR="red"]column setPoint( "CENTER", "TOP", 0, 20 );[/COLOR]


This is the coordinates of the "funtion" text. The text that you can click. Ex: Godmode, jetpack ... For the first zero, put the same thing of the first zero of the titles. For the the verical value( the second number, it is now 20) take the vertical value of the titles coordinate and add 20. Why add 20? Because you dont want your text over the titles.

Exemple: for a title at the top right:
    
column setPoint( "CENTER", "TOP", 250, 20 );


The green codes are more simple to change. They represent the size of the text. First green text is the titles size and second function texts size.

If you want a tuto to how add effects, flasing text, flashing heart, current score etc.... when you open the menu just write a comment. :p


very nice buddy :y:
02-20-2011, 12:10 AM #3
I am Mara
Can I Haz Kebab?
Thanks! <3 U really helped me out there!
02-20-2011, 12:15 AM #4
Originally posted by MoNsTeRzZ View Post
Thanks! <3 U really helped me out there!


SweeT:derp:
02-20-2011, 05:00 PM #5
XXXL
Banned
Does someone want a new tuto?
02-20-2011, 07:39 PM #6
iJokaa
Haters Keep Me Going Winky Winky
Originally posted by XXXL View Post
HI
    
drawMenu( cycle, scroll ){
menu = [[self.getMenu]]();

//get the titles
[COLOR="YellowGreen"] titles = self createFontString( "objective", 2.0 ); [/COLOR]
[COLOR="Red"]titles setPoint( "CENTER", "TOP", 0, );[/COLOR]
titleText = ""; [/quote]

just changing the left and doesnt move the menu there are numbers aswell . like "CENTER", "TOP", 0, that "0" can be changed and it will move the menu somewhere else. derek has posted something about them numbers before . its set text i think
02-20-2011, 07:42 PM #7
XXXL
Banned
Originally posted by iJokaa View Post
just changing the left and doesnt move the menu there are numbers aswell . like "CENTER", "TOP", 0, that "0" can be changed and it will move the menu somewhere else. derek has posted something about them numbers before . its set text i think




I tested by myself and it works.
02-21-2011, 12:09 AM #8
iJokaa
Haters Keep Me Going Winky Winky
Originally posted by XXXL View Post
I tested by myself and it works.


i know it works. ive done it to my patch

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo