Inventory, ignoring if it's empty and GUI background color - SOLVED

Started by BlackMan890, Sun 22/08/2004 23:17:42

Previous topic - Next topic

BlackMan890

Hi guys :D

i have 2 proplems that i would like to get an answer:

first:
how do i make it that even if it's empty it would still open the window? this is the code:
1 function show_inventory_window()   
2   {
3   // ** DEFAULT INVENTORY WINDOW
4   InventoryScreen();
5   /*         
6   // ** CUSTOM INVENTORY WINDOW
7   GUIOn (INVENTORY); 
8   // switch to the Use cursor (to select items with)
9   SetCursorMode (MODE_USE);
10   */         
11   }

first try:
i removed line 4 and it didn't show the message but it didn't open the inventory so i tried again:

second try:
i removed line 5 and 10 and it worked but it still showed the message

2
I have GUI's and the outlines are suposed to be black, NOTE i am using images in my GUI's
but when i test it, it doesn't show black, it shows the background, what can i do?

it would really help me if you helped
Jonatan Nilsson
860 Iceland

Please go to www.simnet.is/elinnils52 and download my non ags/adventure game :)

Edwin Xie

1. It would be helpful if you showed us the ORIGINAL script.
2. Try using foreground color or background color for outlines.
Moving at superhigh speed getting to the planet called Earth. But it is boxed in white......thing.....

BlackMan890

Jonatan Nilsson
860 Iceland

Please go to www.simnet.is/elinnils52 and download my non ags/adventure game :)

Edwin Xie

Original script; untampered with.

use foreground color for outlines.
Moving at superhigh speed getting to the planet called Earth. But it is boxed in white......thing.....

Hollister Man

I think that the InventoryScreen() function is hard-coded to give a message if you're not carrying anything.  The message can be changed, its one of the global messages in the editor.  Perhaps your only recourse is a custom inventory GUI?
That's like looking through a microscope at a bacterial culture and seeing a THOUSAND DANCING HAMSTERS!

Your whole planet is gonna blow up!  Your whole DAMN planet...

Edwin Xie

Radiant can show inventory even when the player has no inventory items.
Moving at superhigh speed getting to the planet called Earth. But it is boxed in white......thing.....

Edwin Xie

if ((button == 4) && (game.top_inv_item < game.num_inv_items - game.num_inv_displayed)) {
Ã,  Ã,  Ã,  // scroll down
Ã,  Ã,  Ã,  game.top_inv_item = game.top_inv_item + game.items_per_line;
Ã,  Ã,  }

Nevermind, that is the scrolling on interface INVENTORY. The only hope is using Custon inventory gui
Moving at superhigh speed getting to the planet called Earth. But it is boxed in white......thing.....

Kweepa

You could try adding a dummy inventory item with a transparent sprite that is removed when you add the first real inventory item.

The problem with your outlines is that when you import the sprite, it takes the colour in the corner as a transparent colour.
You can fix this in several ways, eg:
- make the image 1 pixel wider on the left, filled with a purple line
- draw a purple dot in the corner (if you don't mind losing the corner pixel)
Still waiting for Purity of the Surf II

BlackMan890

hahaha i had the answer all the time:

1 function show_inventory_window()   
2   {
3   // ** DEFAULT INVENTORY WINDOW
4   InventoryScreen();
5   /*         
6   // ** CUSTOM INVENTORY WINDOW
7   GUIOn (INVENTORY);
8   // switch to the Use cursor (to select items with)
9   SetCursorMode (MODE_USE);
10   */         
11   }

when i removed line 4 it didn't show the message and when i had line 4 and removed line 5 and 10 it showed it but also the message so to conclude that:
if i remove line 4,5 and 6 it works
it's because /* and */ is what got it skipped and InventoryScreen(); is what showed the message
(i should have seen this befour ;) )

about proplem 2:
the darkets color in the palette is the color witch the computer changes to the background(that is: color black), so all i had to do was changeing black into dark dark grey and my proplem was solved(NOTE you have to have black somewhere or it will change dark dark grey into background so have black around the image, cause that's where Foreground color goes(foreground changes the black color around it into watever you want(or the color witch the background color is)))
Jonatan Nilsson
860 Iceland

Please go to www.simnet.is/elinnils52 and download my non ags/adventure game :)

SMF spam blocked by CleanTalk