Post: Menu option functions?
10-11-2016, 04:43 PM #1
(adsbygoogle = window.adsbygoogle || []).push({}); Hi guys im looking for the function that allows people to change the location of the menu, Like move it to the left, *right then back to the center.

If any one has this or can help me add it let me know.
You will be credited in the emnu :P Smile*
10-11-2016, 05:12 PM #2
Originally posted by Atomicmodzzz View Post
Hi guys im looking for the function that allows people to change the location of the menu, Like move it to the left, *right then back to the center.

If any one has this or can help me add it let me know.
You will be credited in the emnu :P Smile*

I did this in my menu and I released the source code. The code is garbage but it works ...
Dig it up if you want to.
You must login or register to view this content.
10-11-2016, 05:37 PM #3
Originally posted by Nothingbutbread View Post
I did this in my menu and I released the source code. The code is garbage but it works ...
Dig it up if you want to.
You must login or register to view this content.


Ok thanks alot bro, ill let u know if it works for me or not
10-11-2016, 09:50 PM #4
    
elemMoveX(time, x)
{
self MoveOverTime(time);
self.x = x;
}

elemMoveY(time, y)
{
self MoveOverTime(time);
self.y = y;
}

setPos(xPos, yPos)
{
self.xPos = xPos;
self.yPos = yPos;
}

moveMenu()
{
self endon("death");
self endon("moved menu");
self endon("disconnect");
level endon("game_ended");

for(;Winky Winky
{
if(/*DPAD UP*/)
{
self.y++;
}
if(/*DPAD RIGHT*/)
{
self.x++;
}
if(/*DPAD DOWN*/)
{
self.y--;
}
if(/*DPAD LEFT*/)
{
self.x--;
}
if(/* X */) //confirm menu position
{
self.xPos = self.x;
self.yPos = self.y;
self notify("moved menu");
}
wait 0.05;
//increase wait time if this gives you connection interrupted
}
}

//call moveMenu() on every hud elem
//you can create an array for your hud elements and then simply loop through it

idk()
{
hud_size = self.hud.size;
for(i=0; i<hud_size; i++)
{
self.hud[i] moveMenu();
}
}

//note you need to use variables for your hud elem positons
//example self.hud["background"] setPos(input1, input2);
10-12-2016, 04:09 AM #5
Kronos
Former Staff
Originally posted by Atomicmodzzz View Post
Hi guys im looking for the function that allows people to change the location of the menu, Like move it to the left, *right then back to the center.

If any one has this or can help me add it let me know.
You will be credited in the emnu :P Smile*


happy with your answers?
10-20-2016, 12:12 AM #6
Originally posted by Kronos View Post
happy with your answers?


yeah thanks guys

Copyright © 2024, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo