Vlue 271 Posted May 3, 2012 (edited) Basic Mouse System + Addons v2.0By V.M. IntroductionAdds mouse functionality! WheeeeRewritten to actually make sense, thank you Tsuki~Features- What it says above!How to UsePlug and play!ScriptConvenient Pastebin: HereFAQNone yet (There most likely will be)Credit and Thanks- By V.M. of D.T- Free to use in any non-commercial or commercial game with credit given- Thanks to the well documented MSDN for the Win32API calls x.xAuthor's NotesHuff.. de luff... Edited August 29, 2013 by Vlue 1 Share this post Link to post Share on other sites
Vlue 271 Posted May 7, 2012 Figure I might as well update this on this site. Final update for a bit, with all addons this script provide basic mouse functionality to every aspect of the game. Might not work with edited scenes, might work with edited scenes. You'll have to find out! With unedited scripts though, works. Probably a few bugs lurking around there, we shall find out. Enjoy. Share this post Link to post Share on other sites
regendo 204 Posted May 8, 2012 Aha! I have yet to test this out and look at the code, but it sounds very promising! Thank you for sharing your script with us 1 Share this post Link to post Share on other sites
vom53 0 Posted May 26, 2012 Excellent script Vlue! At the moment, I'll stick with Jet Mouse System until you are able to make your script compatible with Yanfly's Battle Engine. Share this post Link to post Share on other sites
Tsukihime 1,489 Posted May 26, 2012 (edited) For the scenes and stuff couldn't you just modify Window_Selectable class to provide basic mouse handling and tracking? Any sort of actual input from the user occurs within that class and any class that inherits from it.  Then we can just choose to enable or disable mouse tracking with a flag or something.  For the most part, if I left-click on an item, the intuitive behavior is that I am clicking OK, so by default if all windows have the left mouse-click mapped to trigger the OK handler then it should be fine.  A good place to put that is to alias Window_Selectable's process_handler method and the cursor update and just add the mouse OK there.  class Window_Selectable < Window_Base def process_handling return unless open? && active return process_ok if ok_enabled? && (Input.trigger?(:C) || Mouse.lclick?) return process_cancel if cancel_enabled? && (Input.trigger?(: || Mouse.rclick?) return process_pagedown if handle?(:pagedown) && Input.trigger?(:R) return process_pageup if handle?(:pageup) && Input.trigger?(:L) end end  Then for the window cursor (eg: current index) it would move up/down/left/right based on the mouse's position, somehow.  I would probably even go as far as to straight-out map Input::C to left-mouse in order to take care of all of the Input.trigger?(:C) conditions.  That basically gives you free compatibility with every script out there that doesn't overwrite basic input and is a very simple implementation.  It's the window's job to figure out where to go based on where your mouse is, not your job as the developer to tell the window how to move. Edited May 26, 2012 by Tsukihime Share this post Link to post Share on other sites
Vlue 271 Posted May 26, 2012 Interesting input. There is indeed more then one way to solve a problem! Share this post Link to post Share on other sites
MasterChafa 0 Posted July 18, 2012 Hello. The Jet Mouse System has the same problem as this one, which is that the cursor is drawn about one tile to the left from which it actually stays or clicks. Why is that? Share this post Link to post Share on other sites
atolmasoff 1 Posted July 23, 2012 stack to deep error? Share this post Link to post Share on other sites
Vlue 271 Posted July 23, 2012 Hmm, shouldn't be drawn too far left, I'll look into it. Â Stack too deep. Make sure there is only one copy each of the script/addons. Share this post Link to post Share on other sites
AzgarthX 0 Posted January 23, 2013 every character and enemy now attacks with a sword when i have this script running, what is the problem Share this post Link to post Share on other sites
Vlue 271 Posted January 24, 2013 Attacks with a sword? What do you mean. Share this post Link to post Share on other sites
Vlue 271 Posted June 15, 2013 Rewrote this script in a manner that makes tons more sense. Which cut it down by 700 lines and should work alongside other scripts provided they stick to using the Window classes that are built in. Other then that, there isn't too big a difference from the previous version. We'll find out if anything isn't working though, you all are usually quite up on that! :3 Share this post Link to post Share on other sites
estriole 326 Posted June 16, 2013 i create my window using window_command as superclass. but the process_cancel cannot 'trigger' at all. Â also some suggestion. mouse click comment tag to activate event function would be useful. Â this script advantage than new jet mouse script is this script... don't use pathfinding (only direct move_straight) which better in my point of view. since new jet mouse script will have 'some' lag when clicking on 'unpassable' coordinate (in low spec computer/laptop at least). also his mouse script will have issues with returning to title then load the game again while direct move_straight didn't have that issues. Share this post Link to post Share on other sites
Geekman 3 Posted June 17, 2013 Non-commercial only? I know others of your scripts have said this, but you've said it was fine for commercial use. Share this post Link to post Share on other sites
Vlue 271 Posted June 17, 2013 i create my window using window_command as superclass. but the process_cancel cannot 'trigger' at all. Â also some suggestion. mouse click comment tag to activate event function would be useful. Â this script advantage than new jet mouse script is this script... don't use pathfinding (only direct move_straight) which better in my point of view. since new jet mouse script will have 'some' lag when clicking on 'unpassable' coordinate (in low spec computer/laptop at least). also his mouse script will have issues with returning to title then load the game again while direct move_straight didn't have that issues. Is it just process_cancel that doesn't work? Everything else does? And yah, mouse click event activation from afar would be neat, I'll look into it. Non-commercial only? I know others of your scripts have said this, but you've said it was fine for commercial use.Basic Mouse System has always been free for non-commercial use but requiring a paid license for commercial use. If I have said different elsewhere, let me know and I will honor that, but I don't recall it. Share this post Link to post Share on other sites
estriole 326 Posted June 17, 2013 yes it's only process cancel that don't work. i could pm you the script (window and scene) if you want. it's my est - phone menu engine. i try to modify it to support mouse . Â also if you create mouse click event activation function. aside from a far range activation... please also add option to only activate that event IF the player next to the event. Â now we can move with mouse but cannot activate event. . it would be not too nice if we still need keyboard in some games. . Share this post Link to post Share on other sites
Vlue 271 Posted June 17, 2013 Yah best way for me to troubleshoot it is if I could see it. You can use the mouse to activate events when you are beside them! I guess I really didn't document that, just right click on an event that's beside you, it will activate that event instead of calling menu. I designed the script so you could play the entire game with just the mouse. To some degree. Share this post Link to post Share on other sites
Geekman 3 Posted June 18, 2013  i create my window using window_command as superclass. but the process_cancel cannot 'trigger' at all.  also some suggestion. mouse click comment tag to activate event function would be useful.  this script advantage than new jet mouse script is this script... don't use pathfinding (only direct move_straight) which better in my point of view. since new jet mouse script will have 'some' lag when clicking on 'unpassable' coordinate (in low spec computer/laptop at least). also his mouse script will have issues with returning to title then load the game again while direct move_straight didn't have that issues. Is it just process_cancel that doesn't work? Everything else does?And yah, mouse click event activation from afar would be neat, I'll look into it. >Non-commercial only? I know others of your scripts have said this, but you've said it was fine for commercial use.Basic Mouse System has always been free for non-commercial use but requiring a paid license for commercial use. If I have said different elsewhere, let me know and I will honor that, but I don't recall it. I was talking about the button input thingy. Where you could use any key on the keyboard to toggle a switch. You said on the post that it was non-commercial, and in the script it said it was for commercial use. I just wanted to verify. Share this post Link to post Share on other sites
Vlue 271 Posted June 18, 2013 Special Keybinds header says free for use in any project. And it is~ Share this post Link to post Share on other sites
estriole 326 Posted June 18, 2013 (edited) @vlue: apparently the script doesn't recognize if we don't set the :cancel handler. jet mouse script can work maybe because he alias the Input module. which make the Input recognize 'left click' same as 'INPUT::C' and 'right click' as 'INPUT::B'. and by pressing 'INPUT::B' it will call process cancel if no changes made in the class. it's this part     class << Input    alias jet5888_press? press?   def press?(arg)    if arg == Input::C     return true if Mouse.press?(1)    elsif arg == Input::B     return true if Mouse.press?(2)    end    jet5888_press?(arg)   end     alias jet5888_repeat? repeat?   def repeat?(arg)    if arg == Input::C     return true if Mouse.click?(1)    elsif arg == Input::B     return true if Mouse.click?(2)    end    jet5888_repeat?(arg)   end     alias jet5888_trigger? trigger?   def trigger?(arg)    if arg == Input::C     return true if Mouse.click?(1)    elsif arg == Input::B     return true if Mouse.click?(2)    end    jet5888_trigger?(arg)   end end    btw i have modified my script to include :cancel handler for every window (added it in the superclass if the window didn't have handler it will automatically add the ok and cancel handler). and now it working. so i guess it's my side that at fault.  ps: for everyone that have same problem. make sure you have both :ok and :cancel handler for every window you have. Edited June 18, 2013 by estriole Share this post Link to post Share on other sites
Vlue 271 Posted July 13, 2013 Updatde the pastebin so you can set up come basic clickable icons on an an overlay, using image files stored in system~ Share this post Link to post Share on other sites
zSprawl 0 Posted August 10, 2013 Any chance we plan to adapt this to support touch screen? Share this post Link to post Share on other sites
Vlue 271 Posted August 10, 2013 There are no plans for it. Aside from the fact I don't quite know how to handle WM_TOUCH messages in Ruby, I don't have an available touch screen to even test if it's working. Share this post Link to post Share on other sites
zSprawl 0 Posted August 11, 2013 (edited) Darn, if there is some way I can help, please let me know. Edited August 11, 2013 by zSprawl Share this post Link to post Share on other sites
estriole 326 Posted August 12, 2013 @zsprawl: buy him a touch screen device? Lol. Share this post Link to post Share on other sites