horizontal slide inventory

Started by , Sat 05/11/2005 14:27:37

Previous topic - Next topic

Ryoga

how to make an horizzontal slide inventory?
;D

Ubel

I'd suggest you to post a little more descriptive messages.

Please, elaborate. What kind of horizontal sliding do you exactly mean?

Ryoga

I want that my inventory object slide horizontally instead vertically,one for click.
I wont place my object inventory of the bottom of the screen

I'm italian, I speak English a little.

Ishmael

#3
Just make it one line high and set the scrolling to 1 item... I don't know exactly how to do it in the 2.7 script, you might want to try just the ScrollUp and ScrollDown commands with a one line inventory and see what happens, if you already haven't.

In the old scripting it was (this should go into interface_click under the condition for the inventory GUI):
Ã,  Ã,  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 + 1;
Ã,  Ã,  }
Ã,  Ã,  if ((button == 5) && (game.top_inv_item > 0)){
Ã,  Ã,  Ã,  // scroll up
Ã,  Ã,  Ã,  game.top_inv_item = game.top_inv_item - 1;
Ã,  Ã,  }

Just replace the numbers after if ((button == to the numbers of your scroll buttons.

I'm not at all sure does it work properly in 2.7
I used to make games but then I took an IRC in the knee.

<Calin> Ishmael looks awesome all the time
\( Ö)/ ¬(Ö ) | Ja minähän en keskellä kirkasta päivää lähden minnekään juoksentelemaan ilman housuja.

Ryoga

ok now I can scroll one object for click but I don't understand that I do to create an a horizzontally scrolling inventory at the bottom of the screen.


I want to create a inventory like this:
http://www.gmxmedia.net/blackmirror/screens/large/2vesvetes1K.jpg

Ashen

As Ishmael said, a one line inventory (as in that screen shot) will scroll horizontally. Just make the inventory GUI as normal with the InvWindow just tall enough for one item (22 pixels, by default), and use the ScrollUp/Down() commands (or that chunk of code, if you're using 2.62).
I know what you're thinking ... Don't think that.

Ryoga


SMF spam blocked by CleanTalk