Please login or register.

Login with username, password and session length
Advanced search  

News:

For WME related articles and tutorials visit WME Resource Center.

Author Topic: Link inventory to a button rather than mouse over?  (Read 2864 times)

0 Members and 1 Guest are viewing this topic.

Jyujinkai

  • Global Moderator
  • Frequent poster
  • *
  • Karma: 1
  • Offline Offline
  • Posts: 352
    • View Profile
    • Jyujinkai's WME Development Blog
Link inventory to a button rather than mouse over?
« on: October 07, 2007, 10:24:34 AM »

How would i like the inventory to slide down like it dose now but do so when you clikc on a icon rather than when you mouse over a spot on the screen?
Logged
<Antoine de Saint-Exupéry> In any thing at all, perfection is finally attained not when there is no longer anything to add, but when there is no longer anything to take away...
<Carl Sagan> If you want to make a apple pie from scratch. You must first... invent the universe

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: Link inventory to a button rather than mouse over?
« Reply #1 on: October 07, 2007, 08:26:36 PM »

You need to create a window containing the button (->the inventiry icon). Set the window's "Transparent" property to true in WindowEdit so that it doesn't obstruct the scene. In the script attached to the window you'll add an event handler for the button:

Code: WME Script
  1. on "the_name_of_your_button"
  2. {
  3. }
  4.  

And load&display the window when the game starts.
I.e. put something like this to game.script:

Code: WME Script
  1. var InvButtonWin = Game.LoadWindow("path\something.window");
  2. InvButtonWin.Visible = true;
  3.  
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave
 

Page created in 0.044 seconds with 24 queries.