Jump to content
New account registrations are disabed. This website is now an archive. Read more here.
  • 0
milkattack

Cursor problems please help

Question

hello, I am having problems with the cursor rectangle being stretched in certain menus, I've been able to fix it in some of the menus but not others, here are some pics, the cursors with the green circles around them are what im trying to get all of them to look like, and the ones circled in red are the ones I can't figure out how to fix.

 

this is the windowskin im using:

Dfwindow3_zpsf0354cdb.png

 

It looks fine in the title menu:

Screenshot126_zps64924a15.png

 

It also looks fine in the save menu:

Screenshot131_zps1c4a2fd4.png

 

but when I open the game menu it's stretched on the side, then when I select skill it is the correct size next to the characters:

Screenshot128_zpseb53104b.png

 

BUT THEN when i select a character, it's stretched again in the skill menu, but fine next to the character select:

Screenshot130_zpsfd04c3bb.png

 

and finally, it looks fine during battle when you select "fight" or "run", but is stretched again in the command window:

Screenshot132_zps2421ead9.png

Screenshot133_zps460220cc.png

 

anyways I just want all of the cursors to be the small 32x32 size and not stretched out like the ones circled in red. I feel like I searched all of the window scripts and fixed every rectangle cursor section i found but there are those mystery areas where I just can't find where to alter them. sorry about the pictures too i dont know how to put them behind a spoiler!

Edited by milkattack

Share this post


Link to post
Share on other sites

10 answers to this question

Recommended Posts

  • 0

Your game looks fluffy...

 

Have you checked Window_Base, Window_Selectable, Window_Command, Window_PartyCommand, Scene_Menu, and every part of Scene_Battle?

 

Around line 100 of Window_Selectable looks like it might have what you want.

And line 40 of Window_PartyCommand too.

Share this post


Link to post
Share on other sites
  • 0

I thought there would be some options to change the rectangle cursor in Scene_Menu or any of the Sceen_battle scripts but I didn't see any options at all for altering that in those, and the Window_partycommand script has a section for the rectangle cursor and I fixed it how I need it but it only seems to affect the window that shows the "fight" and "run" options, when the normal attack command window pops up it's stretched again. 

 

this is what my Window_command looks like around the rectangle cursor options:

#--------------------------------------------------------------------------
  # * Update Cursor Rectangle
  #--------------------------------------------------------------------------
 def update_cursor_rect
    # If cursor position is less than 0
    if @index < 0
      self.cursor_rect.empty
      return  
  end
    # Get current row
    row = @index / @column_max
    # If current row is before top row
    if row < self.top_row
      # Scroll so that current row becomes top row
      self.top_row = row
    end
    # If current row is more to back than back row
    if row > self.top_row + (self.page_row_max + 1 )
      # Scroll so that current row becomes back row
      self.top_row = row - (self.page_row_max + 1 )
    end
    # Calculate cursor width
    cursor_width = self.width / @column_max - 64
    # Calculate cursor coordinates
    x = @index % @column_max * (cursor_width + 32)
    y = @index / @column_max * 32 - self.oy
    # Update cursor rectangle
    self.cursor_rect.set(32, y, cursor_width, 32)
  end
end

and this is what it looks like in Window_selectable:

  #--------------------------------------------------------------------------
  # * Update Cursor Rectangle
  #--------------------------------------------------------------------------
  def update_cursor_rect
    # If cursor position is less than 0
    if @index < 0
      self.cursor_rect.empty
      return  
  end
    # Get current row
    row = @index / @column_max
    # If current row is before top row
    if row < self.top_row
      # Scroll so that current row becomes top row
      self.top_row = row
    end
    # If current row is more to back than back row
    if row > self.top_row + (self.page_row_max - 1)
      # Scroll so that current row becomes back row
      self.top_row = row - (self.page_row_max - 1)
    end
    # Calculate cursor width
    cursor_width = self.width / @column_max -64
    # Calculate cursor coordinates
    x = @index % @column_max * (cursor_width + 32)
    y = @index / @column_max * 32 - self.oy
    # Update cursor rectangle
    self.cursor_rect.set(32, y, cursor_width, 32)
  end

do you see anything there that could be stretching the cursor? sorry if I seem like a noob I only started scripting like two weeks ago so just when I think I'm starting to get it something like this happens and I have no idea what to do.

Share this post


Link to post
Share on other sites
  • 0

I thought there would be some options to change the rectangle cursor in Scene_Menu or any of the Sceen_battle scripts but I didn't see any options at all for altering that in those, and the Window_partycommand script has a section for the rectangle cursor and I fixed it how I need it but it only seems to affect the window that shows the "fight" and "run" options, when the normal attack command window pops up it's stretched again. 

 

this is what my Window_command looks like around the rectangle cursor options:

#--------------------------------------------------------------------------
  # * Update Cursor Rectangle
  #--------------------------------------------------------------------------
 def update_cursor_rect
    # If cursor position is less than 0
    if @index < 0
      self.cursor_rect.empty
      return  
  end
    # Get current row
    row = @index / @column_max
    # If current row is before top row
    if row < self.top_row
      # Scroll so that current row becomes top row
      self.top_row = row
    end
    # If current row is more to back than back row
    if row > self.top_row + (self.page_row_max + 1 )
      # Scroll so that current row becomes back row
      self.top_row = row - (self.page_row_max + 1 )
    end
    # Calculate cursor width
    cursor_width = self.width / @column_max - 64
    # Calculate cursor coordinates
    x = @index % @column_max * (cursor_width + 32)
    y = @index / @column_max * 32 - self.oy
    # Update cursor rectangle
    self.cursor_rect.set(32, y, cursor_width, 32)
  end
end

and this is what it looks like in Window_selectable:

  #--------------------------------------------------------------------------
  # * Update Cursor Rectangle
  #--------------------------------------------------------------------------
  def update_cursor_rect
    # If cursor position is less than 0
    if @index < 0
      self.cursor_rect.empty
      return  
  end
    # Get current row
    row = @index / @column_max
    # If current row is before top row
    if row < self.top_row
      # Scroll so that current row becomes top row
      self.top_row = row
    end
    # If current row is more to back than back row
    if row > self.top_row + (self.page_row_max - 1)
      # Scroll so that current row becomes back row
      self.top_row = row - (self.page_row_max - 1)
    end
    # Calculate cursor width
    cursor_width = self.width / @column_max -64
    # Calculate cursor coordinates
    x = @index % @column_max * (cursor_width + 32)
    y = @index / @column_max * 32 - self.oy
    # Update cursor rectangle
    self.cursor_rect.set(32, y, cursor_width, 32)
  end

do you see anything there that could be stretching the cursor? sorry if I seem like a noob I only started scripting like two weeks ago so just when I think I'm starting to get it something like this happens and I have no idea what to do.

 

As stated above I also think calculate cursor width would be your best bet. how about changing it to say.

 

# Calculate cursor width

cursor_width = self.width

 

instead of

 

# Calculate cursor width

cursor_width = self.width / @column_max -64

 

and maybe you could change it to a specific amount such as 32 pixels

 

# Calculate cursor width

cursor_width = 32

 

This is all just a guess since I am new to coding as well but it seems to work aright (in my head), remember to keep a back up before you try these out!

 

Good luck

Share this post


Link to post
Share on other sites
  • 0

aw man I messed with the calculate cursor width thing and it fixed the stretching in one area but then messed it up in another area X_____X i wish there was a way to just snap the cursor automatically to the end of each word because now in some of my choice menus its either going off the side and getting cut off, or its too close and its on top of the text , i might just give up with the cursor in some areas and just use the normal rectangle highlight thing =____= thanks for trying to help i'll just have to keep messing with it

 

EDIT: i just that that last message I'm gonna try out what you suggested and i'll let you know if it works ^^ thanks

 

EDIT: YES!!!!!! it worked drago thank you, idk why i didnt think sooner of just putting cursor_width= 32 lol I was thinking it would be something more complicated

Edited by Bob423
Merging Posts

Share this post


Link to post
Share on other sites
  • 0

YES!!!!!! it worked drago thank you, idk why i didnt think sooner of just putting cursor_width= 32 lol I was thinking it would be something more complicated

 

:D you are welcome! Scripts always look daunting. I Even didn't know for sure that would work but I'm glad it did! You just have to remember that you edited it so make sure you comment above it saying that you did, (that's just in case you want to change it).

Share this post


Link to post
Share on other sites
  • 0

Awesome! :D

 

Normal members can't delete posts, so just edit it asking for it to be deleted. The third post was a bit unnecessary, but not a big deal, so I combined them all into 1.

Share this post


Link to post
Share on other sites
  • 0

thanks for fixing my posts, sorry about that lol. anyways I finally got all the size and cursor position the way I want it, but I have one more problem I can't seem to figure out, when i go into the skill menu or the item menu the cursor moves up and down in the first row perfectly fine, but when I move it to the second row the cursor stays on the first row! however it's still in the second row because it shows the description for the item, like so :
Screenshot134_zpsfccfc2ed.png
 
see? its showing the description for remedy even though the cursor is still stuck in the first row, technically i can still select things in the second row but I would prefer if the cursor changes position too. is this an issue with the rows themselves? or do i need to change something here with the x coordinates?

 #--------------------------------------------------------------------------
  # * Update Cursor Rectangle
  #--------------------------------------------------------------------------
  def update_cursor_rect
    # If cursor position is less than 0
    if @index < 0
      self.cursor_rect.empty
      return  
  end
    # Get current row
    row = @index / @column_max
    # If current row is before top row
    if row < self.top_row
      # Scroll so that current row becomes top row
      self.top_row = row
    end
    # If current row is more to back than back row
    if row > self.top_row + (self.page_row_max - 1)
      # Scroll so that current row becomes back row
      self.top_row = row - (self.page_row_max - 1)
    end
    # Calculate cursor width
    cursor_width = 32
    # Calculate cursor coordinates
    x = @index % @column_max * (cursor_width + 64)
    y = @index / @column_max * 32 - self.oy
    # Update cursor rectangle
    self.cursor_rect.set(-20, y, cursor_width, 32)
  end

EDIT: THANK YOU Tigarus it worked perfectly!!!!! finally all my menus work correctly and I can move on to something else ^^

Edited by milkattack

Share this post


Link to post
Share on other sites
  • 0
# Update cursor rectangle
self.cursor_rect.set(-20, y, cursor_width, 32)

This should be:

# Update cursor rectangle
self.cursor_rect.set(x, y, cursor_width, 32)

Else you tell the cursor to be at -20 (x) always, regardless if you moved it.

 

Edit: Quickly tested it with your windowskin. Gotta need to adjust the cursor a bit more.

   # Calculate cursor coordinates
    x = @index % @column_max * (cursor_width + 320 - 32)
    y = @index / @column_max * 32 - self.oy
   # Update cursor rectangle
    self.cursor_rect.set(-20 + x, y, cursor_width, 32)

The first change is the cursor with with value X, as else the cursor would only go 64 pixels to the right (bear with me, it's 2:21AM, so I don't want to make calculations lol)

With the final value I gave above, I added a "+ X" so that you still can set the initial starting point and it still goes to the next item.

Edited by Tigurus

Share this post


Link to post
Share on other sites
  • 0

 

thanks for fixing my posts, sorry about that lol. anyways I finally got all the size and cursor position the way I want it, but I have one more problem I can't seem to figure out, when i go into the skill menu or the item menu the cursor moves up and down in the first row perfectly fine, but when I move it to the second row the cursor stays on the first row! however it's still in the second row because it shows the description for the item, like so :

Screenshot134_zpsfccfc2ed.png

 

see? its showing the description for remedy even though the cursor is still stuck in the first row, technically i can still select things in the second row but I would prefer if the cursor changes position too. is this an issue with the rows themselves? or do i need to change something here with the x coordinates?

 #--------------------------------------------------------------------------
  # * Update Cursor Rectangle
  #--------------------------------------------------------------------------
  def update_cursor_rect
    # If cursor position is less than 0
    if @index < 0
      self.cursor_rect.empty
      return  
  end
    # Get current row
    row = @index / @column_max
    # If current row is before top row
    if row < self.top_row
      # Scroll so that current row becomes top row
      self.top_row = row
    end
    # If current row is more to back than back row
    if row > self.top_row + (self.page_row_max - 1)
      # Scroll so that current row becomes back row
      self.top_row = row - (self.page_row_max - 1)
    end
    # Calculate cursor width
    cursor_width = 32
    # Calculate cursor coordinates
    x = @index % @column_max * (cursor_width + 64)
    y = @index / @column_max * 32 - self.oy
    # Update cursor rectangle
    self.cursor_rect.set(-20, y, cursor_width, 32)
  end

 

How about trying this out: (again i have no prof of this working always remember to backup)

 

#create old_cursor_width variable

old_cursor_width = self.width / @column_max -64

# create cursor_width edited to 32 pixels

# Calculate Cursor width

cursor_width = 32

# Calculate cursor coordinates

# edit the next  line to have old_cursor_width instead of the new one

x = @index % @column_max * (old_cursor_width + 64)

y = @index / @column_max * 32 - self.oy

 

 

Im not entirely sure that it would be work but hopefully it will work. All I did was make a new variable with the same value as the old one and replaced the variable call with it where x = (blah). Get back to me if this doesn't work

 

Guess what it doesn't work, Thanks to Tigurus for testing it out. Follow the reply on top of me, Tested and worked for him!

Edited by drago2308

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...