Chaos Project

RPG Maker => RPG Maker Scripts => RMXP Script Database => Topic started by: Ryex on August 13, 2010, 12:42:02 pm

Title: [XP] Mouse Window API
Post by: Ryex on August 13, 2010, 12:42:02 pm
Mouse Window API
Authors: Ryex
Version: 2.0
Type: Scripter API for the creation of mouse controllable windows
Key Term: Scripting Tool



Introduction

I developed this as part of Remexos, however, I decided that it was too good to deprive the community of, as such I asked for permission to release the API to the public.


Features




Screenshots

NA



Demo

.7z archive - can be opened with the free, open source program 7-zip (http://www.7-zip.org/)
Mediafire (http://www.mediafire.com/?yadjiyv2kkshbkj)



Script

contains only .txt files of the script's parts. full dependencies not included, see demo for all required scripts
Mediafire (http://www.mediafire.com/?miaeodnbh5cfsxv)



Instructions

See Demo Project


Compatibility

This API Requires Blizzard's Mouse Controller and either Custom Controls from Tons of Add-ons, Blizz-ABS or RMX-OS.
It may work with another mouse system out of the box but it might take some editing of the two systems.


Credits and Thanks




Author's Notes

This was developed as part of Remexos, please support the project. Any bugs or questions? Ask here.
Title: Re: [XP]Mouse Window API
Post by: nathmatt on August 13, 2010, 12:56:50 pm
nice lvl ++
Title: Re: [XP]Mouse Window API
Post by: stripe103 on August 13, 2010, 02:42:29 pm
Finally a public window script that works! :D
Title: Re: [XP]Mouse Window API
Post by: nathmatt on August 13, 2010, 03:56:35 pm
BTW add this so it never needs to be updated

$mouse_window_controller = Mouse_Window::Controller.new
#==============================================================================
# module Input
#==============================================================================

module Input
 
 class << Input
   alias update_Mouse_Window update
 end
 
 def self.update
   $mouse_window_controller.update
   update_Mouse_Window
 end
 
end


edit a suggestion icon buttons
Title: Re: [XP]Mouse Window API
Post by: Ryex on August 13, 2010, 06:53:04 pm
Quote from: nathmatt on August 13, 2010, 03:56:35 pm
BTW add this so it never needs to be updated

$mouse_window_controller = Mouse_Window::Controller.new
#==============================================================================
# module Input
#==============================================================================

module Input
 
 class << Input
   alias update_Mouse_Window update
 end
 
 def self.update
   $mouse_window_controller.update
   update_Mouse_Window
 end
 
end


edit a suggestion icon buttons


scripters can do that at their own discretion
Title: Re: [XP] Mouse Window API
Post by: Ryex on August 21, 2010, 03:33:08 pm
* sniff*  :'( y-you d-don't like it? *sniff*
yay moved!  :P

Title: Re: [XP] Mouse Window API
Post by: Blizzard on August 21, 2010, 03:59:20 pm
*fixes the compatibility listing and some grammar*
Title: Re: [XP] Mouse Window API
Post by: SBR* on August 23, 2010, 11:38:59 am
Great! Level up!
Title: Re: [XP] Mouse Window API
Post by: Ryex on August 27, 2010, 12:50:49 am
1.5 is out
new features and lots of functionality has been added to the existing ones
Title: Re: [XP] Mouse Window API
Post by: ojp2010 on August 28, 2010, 09:52:50 pm
Could you turn this in a CMS per say? Like create a box that calls a players items and lists them or calls a players buddy list and list them. Would being using this for RMX-OS
Title: Re: [XP] Mouse Window API
Post by: Ryex on August 28, 2010, 09:57:09 pm
It could be used to create any sort of user interface, but will I? no.
Title: Re: [XP] Mouse Window API
Post by: ojp2010 on August 28, 2010, 10:09:38 pm
Alright well the direct key call isn't that big of a deal. I can live without that, but is there any way you could help me with editing this for my use? I would like to use it for a RMX-OS game I am working on. I am gathering the core system stuff right now and this script would make a great improvement to that database.
Title: Re: [XP] Mouse Window API
Post by: Ryex on August 28, 2010, 11:13:30 pm
there is no editing involved. it is a scripting TOOL. it dose nothing on its own. now if you want to use it to create a system, go right ahead, post here if you have question as to how certain things work. but don't expect me to explain everything. the classes are well commented for a reason. so that some one reading the script could figure it out on their own.
Title: Re: [XP] Mouse Window API
Post by: ojp2010 on August 29, 2010, 12:14:06 am
Alright, well thank you for the info. I am going to looking to it.
Title: Re: [XP] Mouse Window API
Post by: Wizered67 on October 04, 2010, 08:40:50 pm
In the demo provided, in the item list it shows all the items in the database. How would I change it so that it only shows the items you have?
Title: Re: [XP] Mouse Window API
Post by: Ryex on October 04, 2010, 09:22:23 pm
wow, really? you couldn't just look at how the item menu dose it?
btw if you want to make an inventory be aware that the prospect is a semi difficult one
Title: Re: [XP] Mouse Window API
Post by: Wizered67 on October 04, 2010, 10:57:31 pm
I did look at how the item menu did it, but I wasn't able to get it to work.
Title: Re: [XP] Mouse Window API
Post by: Ryex on October 05, 2010, 12:20:20 am
well the way the item menu dose it you get an array of RPG::Item/Weapon/Armor instances. then iterate through that array and create a data array that is formated properly for the iconbox_list control
Title: Re: [XP] Mouse Window API
Post by: Wizered67 on October 05, 2010, 07:48:08 pm
Thanks! I finnaly got it to work!  :bow:

edit: One more quick question. What does the right click window do? I saw it while looking at the test window 2, but whenever I right click on the check box it gives a "failed to create bitmap" error.
Title: Re: [XP] Mouse Window API
Post by: Ryex on October 06, 2010, 01:44:57 am
version 2.0 is out. fixes close to 20 small errors caused by stupidity and finishes hover functionality.

read the fist post.
Title: Re: [XP] Mouse Window API
Post by: Wizered67 on October 06, 2010, 07:49:30 pm
When I put the new scripts into the old demo, I get an error
Script 'Mouse_Window(Window)' line 252 No method error occured
undefined method '[]=' for nil:Nilclass
Title: Re: [XP] Mouse Window API
Post by: Ryex on October 06, 2010, 08:54:35 pm
uploaded a new demo
Title: Re: [XP] Mouse Window API
Post by: Wizered67 on October 06, 2010, 09:03:42 pm
Awesome! It works great now!

edit: I'm having issues as soon as I put RMX-OS into the demo to make sure they work right. Heres whats happening when I try to open my window.
Spoiler: ShowHide
(http://i56.tinypic.com/a9ld11.jpg)

as you can see, for some reason it isn't loading the window.
Title: Re: [XP] Mouse Window API
Post by: Ryex on October 08, 2010, 12:12:56 am
then you built the window wrong.
and or, you failed to put the API under RMX-OS
Title: Re: [XP] Mouse Window API
Post by: Wizered67 on February 12, 2011, 09:37:14 pm
I know its been a while since anyone posted in this thread, but I have a little problem. Whenever the text below an icon changes in an iconbox_list, rather than the old text going away, the new text is just written on top. For example, my text is the amount of an item you have. If that was 5 and I got one more, it would show the 5 with a 6 written over it. I'd appreciate any help I can get. Thanks in advance Ryex.
Title: Re: [XP] Mouse Window API
Post by: Ryex on February 12, 2011, 10:44:02 pm
hmm, I could of sworn I erased the old before writing the new text.  I'll take a look at it real quick.

EDIT: well I can't seem to reproduce this bug. the best I can tell you at the moment is to make sure that you set the window up to properly redraw the iconbox.


if you pm me a project (preferably a small test project not a full game) the reproduces this bug I'll be glad to help you out.
Title: Re: [XP] Mouse Window API
Post by: Wizered67 on February 13, 2011, 12:10:07 am
Now its just acting weird on me. I won't be able to make the demo tonight or tomorrow, but I will send it as soon as I can. I appreciate the help.
Title: Re: [XP] Mouse Window API
Post by: Wizered67 on February 17, 2011, 11:12:16 am
Okay, I pmed you a demo. Hopefully you can help me. :haha:

edit: Hey Ryex, just making sure you got the message from me. I understand if your busy and unable to help, but I'd appreciate some help as soon as you get the chance. Thanks.
Title: Re: [XP] Mouse Window API
Post by: iNumPad on February 04, 2013, 01:09:20 am
[Sorry to revive this topic and sorry 'bout my english. I'm from Brazil.]

Very goog script. This is wonderful. But his look is ugly.
I wish it were possible to use a Windowskin in a window that is draggable and closable.

Can i do this? How?

#Edit:
Example of Windowskin:
(http://i.imgur.com/neN8a3f.png)
Title: Re: [XP] Mouse Window API
Post by: Ryex on February 04, 2013, 01:16:34 am
you will notice that the windows have a draw background method that could be modified to draw the window skin. I don't actually have the time to do this but it should be cake for any other script-er on the forum. as for buttons and other UI elements those too have draw methods that could be easily modified provieded you can provide art to draw for them