Inventory and cursor mode issues

Started by Ishmael, Wed 16/04/2003 19:22:14

Previous topic - Next topic

Ishmael

I have no idea has someone asked any of this before, so I'm asking it anyway.

Firstly: Is there any way to get the inventory items to center  and get highlighted edges when pointed in a custom inv? (like the build-in inv)

Secondly: How do I make possible to change the cursor mode while the mouse is on a GUI? I tried a few thing, and it worked fine until I tried changin the mode on the GUI, then in the game view. It locked up the changing, and when i right-clicked on an inv item, it started working again. I tried to fix this, an the inv cliking didn't work anymore. I coluldn't select inv items, instead it changet the cursor mode when I left-clicked on an inv item. Anyone have a clue on how to get the thing working?

The basic idea: The cursor mode could be changed with the RMB, no matter on what the mouse is, and the LMB would do what it normaly does. (run game commands like walk and look, change cursor mode on the corresponding GUI buttons, select inv items etc.)

If anyone can understand that, I hope he/she will help me if he/she can. Thanks in advange, and sorry for the mess.  ::)
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.

Pumaman

1) I'm not actually sure if this is possible, though someone may have a clever way of doing it.

2) You have to handle GUI_MDOWN in your  on_event  function - see "on_event" in the manual for more info.

RickJ

1.  You may be able to put buttons on top of the inventory gui.  The normal button graphic would be a transparent rectangle, the mouse over and pressed images would be outline retangles with transparent centers.  Set the buttons up to do nothing and then check to see if the inventory window recieves mouse clicks.  If not handle the button clicks and then select the inventory item yourself.  You will know what slot in the window was clicked by which button was clicked.  The only other thing you need to do is find out where the inventory window is positioned in the list.  I think there is a system variable that holds the index of the first item in the window.  

Ishmael

CJ: I thought of that... well, It's not a big deal, I just thought it would be a good idea...
RickJ: I have the inventory handeling on script allready (if that's what you ment), but the transpearent button seems interesting... Thx
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.

SMF spam blocked by CleanTalk