ID:273111
 
Ok now ive seen lots of demos for making menu's but none are the way i want. Also none explain much about how they actualy work.

I want an Menu system that works like your normal final fantasy / dragon warrior menu. Press the 9 key and it opens

What i need explained very well is how it knows were to start the menu from and how it knows were to go and what to put in the blanks also how to get the text to show up on the screen i know there icons that get put to gather but how is what i need to know.
Menu as in stat panel?
Also make a macro key that has your menu verb and make the key 9. If thats what you wanted.
In response to Drehdog7
No thats not what im talking about. Like in FFL when you hit the 9 key on the number pad it calls ther NorthEast() and i forgot how to munipulate that so that it will call a proc, that proc a menu will pop up on screen and what i need to know is how to get the menu you create its self
In response to Yu Ju
Yu Ju wrote:
No thats not what im talking about. Like in FFL when you hit the 9 key on the number pad it calls ther NorthEast() and i forgot how to munipulate that so that it will call a proc, that proc a menu will pop up on screen and what i need to know is how to get the menu you create its self

Look up the client procs
North
Northeast
Northwest
West
East
Southwest
Southeast
South
Center
In response to AJX
ok look ive coded games before i know about the byond help and ive looked up all the stuff, what i need help out is UNDERSTANDING also in the help files it doesnt tell you any thing about how to manuipulateing them with other vars
In response to Yu Ju
Yu Ju wrote:
ok look ive coded games before i know about the byond help and ive looked up all the stuff, what i need help out is UNDERSTANDING also in the help files it doesnt tell you any thing about how to manuipulateing them with other vars

I'm not sure you're looking at the same reference that I am.

Anyway... These are procs. They are overridden in the same manner you override any proc, such as Move(), Clck(), or anything.

An example of this:
client/North()
if(rand(0,1))
world<<"[src] TRIED TO MOVE NORTH! HAHA DIDN'T WORK!"
return 0
world<<"[src] got lucky and moved..."
return ..() //..() does whatever this proc would have done naturally, which in this case means calling Move()


As far as manipulating it 'using vars'... This is a general programming concept that can't really be explained because it should be understood as you learn how you put together pieces of code.

client/North()
if(mob.HP>50) //mob. refers to the mob that belongs to this client
return ..() //This will return the normal results
else
src<<"You are too hurt to move. Cry about it."
return 0 //This returns 0, or FALSE, and does not call the normal results so the player wont move


What you're talking about (creating a menu) would be done something like this:
client/North()
mob.CreateMahMenu()
//I didn't include any return statement here, because it isn't needed. It will not call Move() because you didn't type ..() or return ..()

mob/proc/CreateMahMenu()
client.screen+=/obj/Menuzes/Stuff
client.screen+=/obj/Menuzes/Moarstuff


I hope this helps you understand a bit more. If you're still having trouble perhaps you should be tackling a different project first that is better learning material for you.
In response to AJX
that last one i think is the one im looking for
In response to Yu Ju
ok so i figured every thing out this is what im on now ok i got icons the 4 coners of my menu screen and the 4 side walls the top bottom left and right and then the center that fills in all the middle.
I want to make it to were once i click my new game button My next menu pops up on the clients screen and only the client.

So my New Game button is at the top left of the screen once clicked i want it to make a square box that will go from x,y to x,y of the loc i want to put it and what it should do is the first x,y will be the top left coner and the second should be the bottom left, what i want it to do is

EXAMPLE PICTURE

/--
|1st x,y second x,y |
--/
once i pop thos two x,y loc in i want the proc to automaticaly know to build the rest on its own it will know to put my Top edge of my menu.dmi on the top and and sides and so on and so forth and put the center were ever there is an emptry spot. this isnt a very long piece of code to do this i had it down once when i was working on FFL but that was almost 3 4 years ago
In response to Yu Ju
Code:
client
New()
..()//what does this do?
new/obj/LoginButtons/NewGame(src)
new/obj/LoginButtons/LoadGame(src)
obj/LoginButtons
icon = 'Start Buttons.dmi'
NewGame
icon_state = "New Game"
name = "New Game"
New(client/C)
screen_loc="1,10"
C.screen+=src
Click()//when i click this obj i want it to delete both the NEW and LOAD game buttons
//also if you can tell me how to code it so you can clear all the obj on the client screen
//not like items on the gound but all these menus im gonna be poping up that only the client can see.
LoadGame
icon_state = "Load Game"
name = "Load Game"
New(client/C)
screen_loc="1,9"
C.screen+=src
Click()


Problem description:

ok here is my code, i pieced it together from demos ive been looking at. i got // for my questions so just read the code and it will tell you what im trying to do

also if there is a short / better way to create these icons that only the client can see tell me


In response to Yu Ju
Yu Ju wrote:
also if there is a short / better way to create these icons that only the client can see tell me


You do realize that you are making this too hard on yourself. Maps can have multiple z layers. Just create a menu on the map with those effects instead of creating and deleting a client. other variables such as .loc, .dir, and .icon can be saved as another variable so that you can simply move from menu to menu and go back to your game.
In response to Gamekrazzy
You do realize you are replying to a post that died about 3 months ago?