Problems with increasing the Input Number command font size

Hello all! So I'm trying to use the Input Number command with a picture to display a combination lock on the screen. For some reason, the numbers are cut in half. Not sure how to fix this.

1712192991765.png


So I'm using a script call to increase the size of the font size before the Number Input command. And I adjusted the Window_NumberInput - specifically the fitting height. I'm removing the frame with a windowskin changer but I'm just using the basic windowskin in this pic.

1712193605181.png


Two other questions - not as important, though. I wonder if it's possible to space the Number Input options a bit further apart? The other is is it possible for the game to play a scroll or click sound when the player moves the number up or down? Thanks everyone!
It will probably be necessary to recreate a lot of things, I don't know if you have any experience with events, perhaps it would be more worthwhile to do it with pictures, this way it could be visually similar to a briefcase or safe, depending on what the player is interacting with.
Nah, it's because he never changed the actual line_height.

Add this method as a separate script:

Ruby:
class Window_NumberInput
  def line_height
    36
  end
end

It doesn't have to be 36, you can change that number at will.
It will probably be necessary to recreate a lot of things, I don't know if you have any experience with events, perhaps it would be more worthwhile to do it with pictures, this way it could be visually similar to a briefcase or safe, depending on what the player is interacting with.
That was my original idea but I figured I'd try this first - looking for shortcuts where I can find them. I'd like to event something but it'd require more art and time. Ultimately, that would look much nicer and adding SFX would be more straightforward. But I think I might be able to add sfx to the current idea using a parallel process, right?

Nah, it's because he never changed the actual line_height.

Add this method as a separate script:

Ruby:
class Window_NumberInput
  def line_height
    36
  end
end

It doesn't have to be 36, you can change that number at will.
Thanks a bunch! That did it - the entire number displays now!🙂
If you want to add (or change) the SE played there, look for the calls to :UP and 😀OWN in that script and add a call to your favorite SE.

Ruby:
class Window_NumberInput
  NUMBER_SE = RPG::SE.new("name", 100)
  def process_digit_change
    return unless active
    if Input.repeat?(:UP) || Input.repeat?(:DOWN)
      NUMBER_SE.play
      place = 10 ** (@digits_max - 1 - @index)
      n = @number / place % 10
      @number -= n * place
      n = (n + 1) % 10 if Input.repeat?(:UP)
      n = (n + 9) % 10 if Input.repeat?(:DOWN)
      @number += n * place
      refresh
    end
  end
end

You can add the method I posted on my previous post to keep it all in a single script.
In this case, is it possible to change the default sound effect, with something like this?
Ruby:
Window_NumberInput::NUMBER_SE.name = "Decision1"
I imagine that even if it works even saving the progress when restarting the game it would return to the value defined in the Script.
I don't understand RGSS, I just assumed it because of line 2 of the Script itself.
In this case, is it possible to change the default sound effect, with something like this?
Ruby:
Window_NumberInput::NUMBER_SE.name = "Decision1"
I imagine that even if it works even saving the progress when restarting the game it would return to the value defined in the Script.
I don't understand RGSS, I just assumed it because of line 2 of the Script itself.
This does seem to work. I added a script call with it and it changes the SFX even with kyonides script. Thanks for the tip!
If you want to add (or change) the SE played there, look for the calls to :UP and 😀OWN in that script and add a call to your favorite SE.

Ruby:
class Window_NumberInput
  NUMBER_SE = RPG::SE.new("name", 100)
  def process_digit_change
    return unless active
    if Input.repeat?(:UP) || Input.repeat?(:DOWN)
      NUMBER_SE.play
      place = 10 ** (@digits_max - 1 - @index)
      n = @number / place % 10
      @number -= n * place
      n = (n + 1) % 10 if Input.repeat?(:UP)
      n = (n + 9) % 10 if Input.repeat?(:DOWN)
      @number += n * place
      refresh
    end
  end
end

You can add the method I posted on my previous post to keep it all in a single script.
Thanks for this too! It works perfectly! Any thoughts on how I might space the numbers a bit more? I'm thinking the easiest way would be to adjust that the actual ttf font file, right?

1712268868925.png
Well, you seem to always like to do it the hard way to do stuff so to say...
You'd have to change its draw_text method on that script or another specific method for that window.
I guess it'd require you to alter that window's update_cursor method to adapt its cursor box to the new location of each digit.
You are using FPLE, so I need to ask you something. Do you intend to use the Input Number with different padlock graphics of this type or will they all be the same?
Well, you seem to always like to do it the hard way to do stuff so to say...
You'd have to change its draw_text method on that script or another specific method for that window.
I guess it'd require you to alter that window's update_cursor method to adapt its cursor box to the new location of each digit.
Hehe, yes, I know 🙂 My artist brain always wants to do something complicated. Thank you for the help and explanation. I'll research and attempt it somehow. Ultimately, I may adjust the spacing thru the font file since it seems easier for my artist brain.

You are using FPLE, so I need to ask you something. Do you intend to use the Input Number with different padlock graphics of this type or will they all be the same?
Well, I was only planning on using this padlock/Input Number event once in game. If I were to use it multiple times, I'd most likely use the same padlock graphic. That would make sense in the world. Once I'm able to adjust the spacing of the input numbers then I could use multiple different graphics.

Original thread: https://forums.rpgmakerweb.com/threads/problems-with-increasing-the-input-number-command-font-size.167452/