How to make a diary, wich the player can type in?

Started by Jakerpot, Mon 16/03/2009 00:54:29

Previous topic - Next topic

Jakerpot

Hey folks, how can i create a box where the player can write some notes to help through the game. In my game the player has a diary, wich has all the objectives and tips to the player, and i wanted to add a chapter when the player can type in the book. Some help please?



RickJ


Jakerpot

yeah, maybe, but i wanted to do the journal as a room, and then maybe a transparent GUI just with the label to the player type into it, so i don't have to make a whole new GUI, just a tranparent one with a label. Thank you! But this thread is still open for ideas (any idea now KhrisMUC? TrentR?)!!!!



RickJ

Well, if you had a journal room you would still need to draw a background so why not just use the background for the GUI instead.   If you wanted to make the journal the same size of the screen you could make your GUI that size.   If myou wanted a transparent GUI with journal text over the current room I don't see why the module couldn't be used as is or modified to suit your purposes?

I think if you investigate a little morfe you may find what you are looking for has already been 90% done for you.

Dualnames

Quote from: Jakerpot on Mon 16/03/2009 02:19:56
(any idea now KhrisMUC? TrentR?)!!!!

TrentR has become a legend around these places.. ;)GJ mate.
Worked on Strangeland, Primordia, Hob's Barrow, The Cat Lady, Mage's Initiation, Until I Have You, Downfall, Hunie Pop, and every game in the Wadjet Eye Games catalogue (porting)

RickJ

@Jim:  Yeah, I know a regular "Sir Postsalot" but if I kindly tell him to just read enough time he may do so one fine day?   I also try to keep in mind that I am answering for other people as well who may have a similar interest or curiosity.

Jakerpot

ohh no, now i saw the module, no that isnt what i want. I want a place where THE PLAYER CAN TYPE NOTES IN THE JOURNAL not me, the player will type sentences to remember something. Undertood????? Thank you!@



RickJ

Make a gui with a textbox and a list box.   In the the textbox OnActivate event function add a entry to the listbox something like the following.

Code: ags

     listbox.AddItem(textbox.Text);
     textbox.Text = "";

Jakerpot




RickJ

When player types text is entered into textbox.  When player types <enter> testbox makes OnActivate event occur which makes event function execute, which copies text into listbox, which displays text player typed.

Jakerpot




Jakerpot

and if i want to delete a iten from the list?



RickJ

maybe there is a listbox.function that does something like that but i am not sure.   ;)

Jakerpot

just a list.clear, but then it will remove it all! maybe something like:

Code: ags

if (list.SelectedIndex == xx){
 //erase??
}

i'm not sure.



Gilbert

Just check out ListBox.RemoveItem() from the manual.

Dualnames

Quote from: RickJ on Mon 16/03/2009 11:44:34
@Jim:  Yeah, I know a regular "Sir Postsalot" but if I kindly tell him to just read enough time he may do so one fine day?   I also try to keep in mind that I am answering for other people as well who may have a similar interest or curiosity.

Was that going towards me..I think it was..I don't really mind the way you respond here, I find it quite the best way, so if someoen searches the forums he can find something of usefulness, don't know if I offended you somehow, but if I did sorry it was not my intention, since I actually do like you. :D
Worked on Strangeland, Primordia, Hob's Barrow, The Cat Lady, Mage's Initiation, Until I Have You, Downfall, Hunie Pop, and every game in the Wadjet Eye Games catalogue (porting)

SMF spam blocked by CleanTalk