|
2 registered members (AndrewAMD, Lapsa),
1,268
guests, and 1
spider. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Re: Enter Name for Highscore
[Re: Minamato]
#327680
06/07/10 20:09
06/07/10 20:09
|
Joined: May 2010
Posts: 23 Germany
h34dl4g
Newbie
|
Newbie
Joined: May 2010
Posts: 23
Germany
|
There was a function which saves the last pressed key. You could ask for the last pressed ones and display them at the same time, so it would be the same as writing. First you have to display a panel to write or something like that. Don't know the code exactly right now.
-h34dl4g
1338, beyond leet.
|
|
|
Re: Enter Name for Highscore
[Re: Minamato]
#327841
06/08/10 19:45
06/08/10 19:45
|
Joined: Feb 2009
Posts: 80 STRING* location = "Germany";
Minamato
OP
Junior Member
|
OP
Junior Member
Joined: Feb 2009
Posts: 80
STRING* location = "Germany";
|
just a little question:
#include <acknex.h>
#include <default.c>
STRING* string1 = "";
STRING* string2 = "";
STRING* entry_str = " "; // long empty string
TEXT* name_show =
{
pos_x = 50;
pos_y = 50;
layer = 1;
font = "#16";
string(string1);
flags = SHOW;
}
TEXT* name_show2 =
{
pos_x = 50;
pos_y = 50;
layer = 1;
font = "#16";
string(string2);
flags = SHOW;
}
function process_entry(STRING*)
{
while(1)
{
if (inchar(string1) == 13) break;
str_cat(string2,string1);
}
}
function main ()
{
video_mode = 7; // Bildschirm der Größe 1280x800
mouse_mode = 4; // aktiviere Maus
var key = inkey(entry_str); // wait until [enter] pressed
if (key == 13) process_entry(entry_str);
}
which of the three strings is the one which displays the name in the end? When I use them in my highscore-send function, the show nothing, allthough the name was displayed before (while entering it)... greetz, Minamato
|
|
|
Re: Enter Name for Highscore
[Re: Minamato]
#327845
06/08/10 20:23
06/08/10 20:23
|
Joined: Aug 2007
Posts: 1,922 Schweiz
Widi
Serious User
|
Serious User
Joined: Aug 2007
Posts: 1,922
Schweiz
|
inkey(entry_str); --> it is entry_str.
You call this function with this string as parameter: process_entry(entry_str); but in this function is notting to take this parameter: function process_entry(STRING* my_str) Now use str_cpy to copy the entry_str in the string1 or string2 str_cpy(string1,entry_str);
Last edited by Widi; 06/08/10 20:24.
|
|
|
|
|
|