Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 Mousie: The Mouse System
#67
Riddle me this.   When is a BUMP not a BUMP?

When I'm BUMPING a supplemental system/script.

Has it really been 3 years since my last update?  Well, you have to thank yamina-chan for this one.  She noticed that the Windows Edits which were initially crafted by Lambchop/Amaranth/Amanda Fitch ... didn't properly align the mouse with the characters drawn in the Name Edit window.

Provided below is the new mouse operation method from within the 'Window_NameInput' class.  This method is also available within the complete 'Window Edits' in the main post, but not within the demo itself.  When downloading the demo, you must still update the window edits within.
Code:
  #--------------------------------------------------------------------------

  # * Perform mouse operations
  #--------------------------------------------------------------------------
  def mouse_operation
    index = @index
    mx = Mouse.pos_x - (self.x - self.ox + 16)
    my = Mouse.pos_y - (self.y - self.oy + 16)
    width   = 28
    height  = 32
    # Exit if between Capital and non-caps
    if ( Mouse.pos_x > 296 && Mouse.pos_x < 350)
      return
    end
    # Switch mx area if going from caps to/from non-caps
    if Mouse.pos_x <= 318
      mx -= 136
    elsif Mouse.pos_x >= 337
      mx -= 166
    end
    for index in 0...180
      x = 4 + index / 5 / 9 * 152 + index % 5 * 32
      y = index / 5 % 9 * 32
      if mx > x and
          mx < x + width and
          my > y and
          my < y + height
        $game_system.se_play($data_system.cursor_se) unless @index == index
        @index = index
        break
      end
    end
    # Set Y condition for outside boundary check
    # Value of 9 could be 8 ( 8 * 32)  as Last row in CHARACTER_TABLE empty.
    y = 9 * 32
    # Outside test
    outside = false
    outside = true if mx < 4
    outside = true if mx > 312
    outside = true if my < 4
    outside = true if my > y
    # Go to 'OK' if outside character window
    if outside
      $game_system.se_play($data_system.cursor_se) unless @index == 180
      @index = 180
    end
  end

Um, if anyone wants to make the right mouse click delete letters in the name window (rather than the ESC) button, please consider this snippet from Scene_Name:
Code:
#--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  def update
    # Update windows
    @edit_window.update
    @input_window.update
    # If B button was pressed
    if Input.repeat?(Input::B)
      # If cursor position is at 0
      if @edit_window.index == 0
        return
      end
      # Play cancel SE
      $game_system.se_play($data_system.cancel_se)
      # Delete text
      @edit_window.back
      return
    end
[/code
]The line that reads
[code]if Input.repeat?(Input::B)
may just as easily read as:
Code:
if Input.repeat?(Input::B) or Mouse.click?(Mouse::Right_Click)

Enjoy.
Up is down, left is right and sideways is straight ahead. - Cord "Circle of Iron", 1978 (written by Bruce Lee and James Coburn... really...)
[Image: QrnbKlx.jpg]
[Image: sGz1ErF.png] [Image: liM4ikn.png] [Image: fdzKgZA.png] [Image: sj0H81z.png]
[Image: QL7oRau.png] [Image: uSqjY09.png] [Image: GAA3qE9.png] [Image: 2Hmnx1G.png] [Image: BwtNdKw.png%5B]
Above are clickable links

Reply }


Messages In This Thread
Mousie: The Mouse System - by DerVVulfman - 03-05-2008, 07:15 AM
RE: Mousie: The Mouse System - by Agckuu Coceg - 01-23-2011, 06:53 PM
RE: Mousie: The Mouse System - by NightOwl - 01-23-2011, 09:22 PM
RE: Mousie: The Mouse System - by Agckuu Coceg - 01-29-2011, 08:34 PM
RE: Mousie: The Mouse System - by MetalRenard - 01-29-2011, 08:48 PM
RE: Mousie: The Mouse System - by Agckuu Coceg - 01-29-2011, 10:46 PM
RE: Mousie: The Mouse System - by DerVVulfman - 01-30-2011, 04:39 AM
RE: Mousie: The Mouse System - by Kristovski - 01-30-2011, 08:24 PM
RE: Mousie: The Mouse System - by DerVVulfman - 01-31-2011, 04:51 AM
RE: Mousie: The Mouse System - by DerVVulfman - 06-15-2011, 07:09 AM
RE: Mousie: The Mouse System - by MetalRenard - 06-15-2011, 09:29 AM
RE: Mousie: The Mouse System - by DerVVulfman - 06-16-2011, 04:21 AM
RE: Mousie: The Mouse System - by DerVVulfman - 06-17-2011, 04:46 AM
RE: Mousie: The Mouse System - by DerVVulfman - 10-03-2012, 03:20 AM
RE: Mousie: The Mouse System - by DerVVulfman - 10-04-2012, 03:41 AM
RE: Mousie: The Mouse System - by LilyKnight - 03-16-2012, 02:37 AM
RE: Mousie: The Mouse System - by DerVVulfman - 03-16-2012, 04:25 AM
RE: Mousie: The Mouse System - by Keyren - 04-12-2012, 12:37 PM
RE: Mousie: The Mouse System - by DerVVulfman - 04-12-2012, 10:44 PM
RE: Mousie: The Mouse System - by Keyren - 04-13-2012, 10:41 AM
RE: Mousie: The Mouse System - by DerVVulfman - 04-14-2012, 03:15 AM
RE: Mousie: The Mouse System - by JayRay - 11-01-2012, 03:53 AM
RE: Mousie: The Mouse System - by DerVVulfman - 11-01-2012, 06:19 AM
RE: Mousie: The Mouse System - by JayRay - 02-01-2014, 03:58 PM
RE: Mousie: The Mouse System - by JayRay - 02-04-2014, 06:57 PM
RE: Mousie: The Mouse System - by MechanicalPen - 02-04-2014, 11:48 PM
RE: Mousie: The Mouse System - by JayRay - 02-05-2014, 04:36 PM
RE: Mousie: The Mouse System - by MechanicalPen - 02-05-2014, 06:19 PM
RE: Mousie: The Mouse System - by JayRay - 02-14-2014, 07:38 PM
RE: Mousie: The Mouse System - by MechanicalPen - 02-14-2014, 08:48 PM
RE: Mousie: The Mouse System - by JayRay - 02-16-2014, 03:58 AM
RE: Mousie: The Mouse System - by DerVVulfman - 07-19-2015, 10:57 PM
RE: Mousie: The Mouse System - by yamina-chan - 07-19-2015, 11:18 PM
Mousie: The Mouse System - by InnerMobius - 12-06-2009, 10:07 AM
Mousie: The Mouse System - by DerVVulfman - 12-06-2009, 04:18 PM
Mousie: The Mouse System - by explocion200 - 12-06-2009, 06:44 PM
Mousie: The Mouse System - by DerVVulfman - 12-06-2009, 06:53 PM
Mousie: The Mouse System - by explocion200 - 12-06-2009, 07:02 PM
Mousie: The Mouse System - by DerVVulfman - 12-06-2009, 07:10 PM
Mousie: The Mouse System - by explocion200 - 12-06-2009, 07:15 PM
Mousie: The Mouse System - by InnerMobius - 12-06-2009, 08:31 PM
Mousie: The Mouse System - by goth1sniper - 02-06-2010, 03:40 PM
Mousie: The Mouse System - by DerVVulfman - 02-06-2010, 06:53 PM
Mousie: The Mouse System - by goth1sniper - 02-06-2010, 10:41 PM
Mousie: The Mouse System - by Ace - 02-07-2010, 12:45 AM
Mousie: The Mouse System - by goth1sniper - 02-07-2010, 07:15 PM
Mousie: The Mouse System - by Ace - 02-07-2010, 07:38 PM
Mousie: The Mouse System - by DerVVulfman - 02-08-2010, 05:51 AM
Mousie: The Mouse System - by goth1sniper - 02-08-2010, 06:13 PM
Mousie: The Mouse System - by Ace - 02-08-2010, 06:23 PM
Mousie: The Mouse System - by DerVVulfman - 02-09-2010, 05:30 AM
Mousie: The Mouse System - by Makofanuo - 03-21-2010, 05:41 AM
Mousie: The Mouse System - by Norton - 04-07-2010, 08:31 AM
Mousie: The Mouse System - by DerVVulfman - 04-10-2010, 04:26 AM
Mousie: The Mouse System - by Neas - 05-02-2010, 10:34 PM
Mousie: The Mouse System - by DerVVulfman - 05-03-2010, 04:07 AM
Mousie: The Mouse System - by Neas - 05-03-2010, 03:04 PM
Mousie: The Mouse System - by Ace - 05-03-2010, 03:12 PM
Mousie: The Mouse System - by Neas - 05-03-2010, 05:53 PM
Mousie: The Mouse System - by DerVVulfman - 05-04-2010, 03:47 AM
Mousie: The Mouse System - by Neas - 05-04-2010, 12:15 PM
Mousie: The Mouse System - by DerVVulfman - 05-04-2010, 06:55 PM
Mousie: The Mouse System - by Neas - 05-04-2010, 07:41 PM
Mousie: The Mouse System - by trb - 05-30-2010, 03:00 PM
Mousie: The Mouse System - by DerVVulfman - 05-31-2010, 03:28 AM
Mousie: The Mouse System - by sakhawat21 - 05-31-2010, 09:14 AM
Mousie: The Mouse System - by trb - 05-31-2010, 03:12 PM
Mousie: The Mouse System - by DerVVulfman - 10-14-2010, 04:20 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
   Aleworks Input Mouse Sprite Add-On DerVVulfman 2 905 09-21-2023, 02:56 PM
Last Post: DerVVulfman
   MKXP Compatible Mouse Add-on DerVVulfman 1 750 08-30-2023, 08:54 PM
Last Post: kyonides
   Super Simple Vehicle System - Enhanced DerVVulfman 65 83,502 06-02-2023, 06:16 PM
Last Post: Sujabes467
   Zenith Tactical Battle System Plus (ZTBS+) DerVVulfman 0 2,051 05-10-2022, 10:42 PM
Last Post: DerVVulfman
   Commercial System Package DerVVulfman 11 12,176 01-04-2020, 12:37 AM
Last Post: Pelip
   ACBS - Atoa Custom Battle System 3.2 Victor Sant 150 225,587 03-02-2019, 04:47 AM
Last Post: dragonprincess44
   DerVV's Simple Popup System DerVVulfman 4 10,987 10-08-2017, 04:53 PM
Last Post: DerVVulfman
   Melly-Mel's Calendar System DerVVulfman 23 39,011 12-02-2016, 04:31 AM
Last Post: DerVVulfman
   The Magey Mage's Spellbook System DerVVulfman 3 9,084 10-31-2016, 01:45 AM
Last Post: Noctis
   CTB - A Final Fantasy X-like Battle System, Version 3.2 Charlie Fleed 572 648,740 05-19-2016, 05:38 PM
Last Post: Starmage



Users browsing this thread: