Author Topic: (SOLVED) help with text in save/load gui  (Read 252 times)  Share 

(SOLVED) help with text in save/load gui
« on: 11 Jun 2011, 11:48 »
« Last Edit: 12 Jun 2011, 11:34 by BlueAngel »

barefoot

  • Guitar Man
    • I can help with web design
    •  
Re: help with text in save/load gui
« Reply #1 on: 11 Jun 2011, 12:14 »
Hi

After making your gui and putting in buttons for save and load:

Maybe you are looking to put in more than is generally required and I may be off course here but i use this with a new GUI with buttons coded:

[code]
show_save_game_dialog();
[/code]

This brings up the Save box..

Its the same for the Load box:

[code]show_restore_game_dialog();[/code]

As I said, maybe I'm off course in what you actually want to achieve. Possibly the bit about double entrys? Apart from that do you really need to override AGS Load / Save scripts?

barefoot



« Last Edit: 11 Jun 2011, 12:18 by barefoot »
I May Not Be Perfect but I Have A Big Heart ..

Re: help with text in save/load gui
« Reply #2 on: 11 Jun 2011, 12:18 »
I have a save button on my main gui that brings up the save gui.
That is working, however it is coded:
[code]
function btn_save_OnClick(GUIControl *control, MouseButton button)
{
  gSaveGame.Visible=true;
  mouse.UseModeGraphic(eModeWait);
}
[/code]

Do you think change it to "show dialog" would help with the text box?

barefoot

  • Guitar Man
    • I can help with web design
    •  
Re: help with text in save/load gui
« Reply #3 on: 11 Jun 2011, 12:28 »
It depends if your new GUI is visible all the time or if you make it visible at certain times..

Why would it have eModeWait? (baffling)


My code for this is:

[code]function btnSaveGame_OnClick(GUIControl *control, MouseButton button)
{
  int gameSlotToSaveInto = lstSaveGamesList.ItemCount + 1;
  int i = 0;
  while (i < lstSaveGamesList.ItemCount)
  {
    if (lstSaveGamesList.Items == txtNewSaveName.Text)
    {
      gameSlotToSaveInto = lstSaveGamesList.SaveGameSlots;
    }
    i++;
  }
  SaveGameSlot(gameSlotToSaveInto, txtNewSaveName.Text);
  close_save_game_dialog();
}
[/code]

Mmm.. perhaps elaborate a bit more..

« Last Edit: 11 Jun 2011, 12:30 by barefoot »
I May Not Be Perfect but I Have A Big Heart ..

Re: help with text in save/load gui
« Reply #4 on: 11 Jun 2011, 12:35 »
I started with the same as you but that didnt work for me. Hmm maybe I have to start over.

barefoot

  • Guitar Man
    • I can help with web design
    •  
Re: help with text in save/load gui
« Reply #5 on: 11 Jun 2011, 12:43 »
Just create a new GUI with Buttons for save and Load (customise at will or just customise original )..

and script to new GUI buttons

[Code]
show_save_game_dialog();
[/code]

[Code]
show_restore_game_dialog();
[/code]

[code]
QuitGame(1);    // 0 or 1
[/code]

Apart from that... it works for me...


« Last Edit: 11 Jun 2011, 12:44 by barefoot »
I May Not Be Perfect but I Have A Big Heart ..

Re: help with text in save/load gui
« Reply #6 on: 12 Jun 2011, 10:22 »
Thanks for trying to help me. Its not really what I have problem with but I going to start again and try to find where I went wrong.
My problem is that the saves dont show in the text box.

barefoot

  • Guitar Man
    • I can help with web design
    •  
Re: help with text in save/load gui
« Reply #7 on: 12 Jun 2011, 10:31 »
Check that text colour is NOT the same as the GUI colour.

Perhaps make sure its text label has"Bring to front" so its above Gui

barefoot
« Last Edit: 12 Jun 2011, 10:33 by barefoot »
I May Not Be Perfect but I Have A Big Heart ..

Khris

  • Evil Dark Emperor Death-Kill
    • Lifetime Achievement Award Winner
    •  
    • I can help with play testing
    •  
    • I can help with scripting
    •  
    • I can help with translating
    •  
Re: help with text in save/load gui
« Reply #8 on: 12 Jun 2011, 10:52 »
You need this to put the savegames into the listbox:
http://www.bigbluecup.com/manual/ListBox.FillSaveGameList.htm
http://whathaveyoutried.com/

The other day on yahoo answers:
"Can you print colored images with black ink? If so tell me how please Thanx Kimberly"

Re: help with text in save/load gui
« Reply #9 on: 12 Jun 2011, 11:33 »
Thanks barefoot, not a bad idea but not this time  :)
Thanks Khris, its working now.
« Last Edit: 12 Jun 2011, 11:49 by BlueAngel »

barefoot

  • Guitar Man
    • I can help with web design
    •  
Re: (SOLVED) help with text in save/load gui
« Reply #10 on: 12 Jun 2011, 11:48 »
Glad you got there in the end.. and thanks Khris   :=
I May Not Be Perfect but I Have A Big Heart ..

monkey_05_06

  • AGS Project Admins
  • Has left the building.
Re: (SOLVED) help with text in save/load gui
« Reply #11 on: 12 Jun 2011, 12:12 »
I just want to point out that what you said about using "Bring to front" to make sure the label is above the GUI doesn't make any sense at all seeing as controls are always drawn on top of their owning GUI. The "Bring to front"/"send to back" options/functions apply to the ordering of the controls themselves.
Let's be honest. Most people suck at coding. I suck at coding, but at least my code is readable. To Hell with anyone too lazy to maintain consistent formatting in their code. I could deal with bad interfaces and structure if I could even read your horrible code. And that's putting it nicely. -monkey