mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-06 06:01:46 +00:00
Added descriptions for Options screen options, tweaked appearance of Options screen, fixed SpriteWindow#back_opacity not applying to all parts of the window graphic
This commit is contained in:
@@ -485,12 +485,12 @@ class SpriteWindow < Window
|
|||||||
@sprites["contents"].bitmap = @contents
|
@sprites["contents"].bitmap = @contents
|
||||||
if haveskin
|
if haveskin
|
||||||
4.times do |i|
|
4.times do |i|
|
||||||
@sprites["corner#{i}"].opacity = @opacity
|
@sprites["corner#{i}"].opacity = backopac
|
||||||
@sprites["corner#{i}"].tone = @tone
|
@sprites["corner#{i}"].tone = @tone
|
||||||
@sprites["corner#{i}"].color = @color
|
@sprites["corner#{i}"].color = @color
|
||||||
@sprites["corner#{i}"].visible = @visible
|
@sprites["corner#{i}"].visible = @visible
|
||||||
@sprites["corner#{i}"].blend_type = @blend_type
|
@sprites["corner#{i}"].blend_type = @blend_type
|
||||||
@sprites["side#{i}"].opacity = @opacity
|
@sprites["side#{i}"].opacity = backopac
|
||||||
@sprites["side#{i}"].tone = @tone
|
@sprites["side#{i}"].tone = @tone
|
||||||
@sprites["side#{i}"].color = @color
|
@sprites["side#{i}"].color = @color
|
||||||
@sprites["side#{i}"].blend_type = @blend_type
|
@sprites["side#{i}"].blend_type = @blend_type
|
||||||
|
|||||||
@@ -38,11 +38,11 @@ module PropertyMixin
|
|||||||
attr_reader :name
|
attr_reader :name
|
||||||
|
|
||||||
def get
|
def get
|
||||||
(@getProc) ? @getProc.call : nil
|
return @get_proc&.call
|
||||||
end
|
end
|
||||||
|
|
||||||
def set(*args)
|
def set(*args)
|
||||||
@setProc&.call(*args)
|
@set_proc&.call(*args)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -53,11 +53,11 @@ class EnumOption
|
|||||||
include PropertyMixin
|
include PropertyMixin
|
||||||
attr_reader :values
|
attr_reader :values
|
||||||
|
|
||||||
def initialize(name, values, getProc, setProc)
|
def initialize(name, values, get_proc, set_proc)
|
||||||
@name = name
|
@name = name
|
||||||
@values = values.map { |val| _INTL(val) }
|
@values = values.map { |val| _INTL(val) }
|
||||||
@getProc = getProc
|
@get_proc = get_proc
|
||||||
@setProc = setProc
|
@set_proc = set_proc
|
||||||
end
|
end
|
||||||
|
|
||||||
def next(current)
|
def next(current)
|
||||||
@@ -78,35 +78,35 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
class NumberOption
|
class NumberOption
|
||||||
include PropertyMixin
|
include PropertyMixin
|
||||||
attr_reader :optstart
|
attr_reader :lowest_value
|
||||||
attr_reader :optend
|
attr_reader :highest_value
|
||||||
|
|
||||||
def initialize(name, range, getProc, setProc)
|
def initialize(name, range, get_proc, set_proc)
|
||||||
@name = name
|
@name = name
|
||||||
case range
|
case range
|
||||||
when Range
|
when Range
|
||||||
@optstart = range.begin
|
@lowest_value = range.begin
|
||||||
@optend = range.end
|
@highest_value = range.end
|
||||||
when Array
|
when Array
|
||||||
@optstart = range[0]
|
@lowest_value = range[0]
|
||||||
@optend = range[1]
|
@highest_value = range[1]
|
||||||
end
|
end
|
||||||
@getProc = getProc
|
@get_proc = get_proc
|
||||||
@setProc = setProc
|
@set_proc = set_proc
|
||||||
end
|
end
|
||||||
|
|
||||||
def next(current)
|
def next(current)
|
||||||
index = current + @optstart
|
index = current + @lowest_value
|
||||||
index += 1
|
index += 1
|
||||||
index = @optstart if index > @optend
|
index = @lowest_value if index > @highest_value
|
||||||
return index - @optstart
|
return index - @lowest_value
|
||||||
end
|
end
|
||||||
|
|
||||||
def prev(current)
|
def prev(current)
|
||||||
index = current + @optstart
|
index = current + @lowest_value
|
||||||
index -= 1
|
index -= 1
|
||||||
index = @optend if index < @optstart
|
index = @highest_value if index < @lowest_value
|
||||||
return index - @optstart
|
return index - @lowest_value
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -115,30 +115,30 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
class SliderOption
|
class SliderOption
|
||||||
include PropertyMixin
|
include PropertyMixin
|
||||||
attr_reader :optstart
|
attr_reader :lowest_value
|
||||||
attr_reader :optend
|
attr_reader :highest_value
|
||||||
|
|
||||||
def initialize(name, range, getProc, setProc)
|
def initialize(name, range, get_proc, set_proc)
|
||||||
@name = name
|
@name = name
|
||||||
@optstart = range[0]
|
@lowest_value = range[0]
|
||||||
@optend = range[1]
|
@highest_value = range[1]
|
||||||
@optinterval = range[2]
|
@interval = range[2]
|
||||||
@getProc = getProc
|
@get_proc = get_proc
|
||||||
@setProc = setProc
|
@set_proc = set_proc
|
||||||
end
|
end
|
||||||
|
|
||||||
def next(current)
|
def next(current)
|
||||||
index = current + @optstart
|
index = current + @lowest_value
|
||||||
index += @optinterval
|
index += @interval
|
||||||
index = @optend if index > @optend
|
index = @highest_value if index > @highest_value
|
||||||
return index - @optstart
|
return index - @lowest_value
|
||||||
end
|
end
|
||||||
|
|
||||||
def prev(current)
|
def prev(current)
|
||||||
index = current + @optstart
|
index = current + @lowest_value
|
||||||
index -= @optinterval
|
index -= @interval
|
||||||
index = @optstart if index < @optstart
|
index = @lowest_value if index < @lowest_value
|
||||||
return index - @optstart
|
return index - @lowest_value
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -146,33 +146,32 @@ end
|
|||||||
# Main options list
|
# Main options list
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class Window_PokemonOption < Window_DrawableCommand
|
class Window_PokemonOption < Window_DrawableCommand
|
||||||
attr_reader :mustUpdateOptions
|
attr_reader :value_changed
|
||||||
|
|
||||||
|
SEL_NAME_BASE_COLOR = Color.new(192, 120, 0)
|
||||||
|
SEL_NAME_SHADOW_COLOR = Color.new(248, 176, 80)
|
||||||
|
SEL_VALUE_BASE_COLOR = Color.new(248, 48, 24)
|
||||||
|
SEL_VALUE_SHADOW_COLOR = Color.new(248, 136, 128)
|
||||||
|
|
||||||
def initialize(options, x, y, width, height)
|
def initialize(options, x, y, width, height)
|
||||||
@options = options
|
@options = options
|
||||||
@nameBaseColor = Color.new(192, 120, 0)
|
@values = []
|
||||||
@nameShadowColor = Color.new(248, 176, 80)
|
@options.length.times { |i| @values[i] = 0 }
|
||||||
@selBaseColor = Color.new(248, 48, 24)
|
@value_changed = false
|
||||||
@selShadowColor = Color.new(248, 136, 128)
|
|
||||||
@optvalues = []
|
|
||||||
@mustUpdateOptions = false
|
|
||||||
@options.length.times do |i|
|
|
||||||
@optvalues[i] = 0
|
|
||||||
end
|
|
||||||
super(x, y, width, height)
|
super(x, y, width, height)
|
||||||
end
|
end
|
||||||
|
|
||||||
def [](i)
|
def [](i)
|
||||||
return @optvalues[i]
|
return @values[i]
|
||||||
end
|
end
|
||||||
|
|
||||||
def []=(i, value)
|
def []=(i, value)
|
||||||
@optvalues[i] = value
|
@values[i] = value
|
||||||
refresh
|
refresh
|
||||||
end
|
end
|
||||||
|
|
||||||
def setValueNoRefresh(i, value)
|
def setValueNoRefresh(i, value)
|
||||||
@optvalues[i] = value
|
@values[i] = value
|
||||||
end
|
end
|
||||||
|
|
||||||
def itemCount
|
def itemCount
|
||||||
@@ -181,11 +180,15 @@ class Window_PokemonOption < Window_DrawableCommand
|
|||||||
|
|
||||||
def drawItem(index, _count, rect)
|
def drawItem(index, _count, rect)
|
||||||
rect = drawCursor(index, rect)
|
rect = drawCursor(index, rect)
|
||||||
|
sel_index = self.index
|
||||||
|
# Draw option's name
|
||||||
optionname = (index == @options.length) ? _INTL("Close") : @options[index].name
|
optionname = (index == @options.length) ? _INTL("Close") : @options[index].name
|
||||||
optionwidth = rect.width * 9 / 20
|
optionwidth = rect.width * 9 / 20
|
||||||
pbDrawShadowText(self.contents, rect.x, rect.y, optionwidth, rect.height, optionname,
|
pbDrawShadowText(self.contents, rect.x, rect.y, optionwidth, rect.height, optionname,
|
||||||
@nameBaseColor, @nameShadowColor)
|
(index == sel_index) ? SEL_NAME_BASE_COLOR : self.baseColor,
|
||||||
|
(index == sel_index) ? SEL_NAME_SHADOW_COLOR : self.shadowColor)
|
||||||
return if index == @options.length
|
return if index == @options.length
|
||||||
|
# Draw option's values
|
||||||
case @options[index]
|
case @options[index]
|
||||||
when EnumOption
|
when EnumOption
|
||||||
if @options[index].values.length > 1
|
if @options[index].values.length > 1
|
||||||
@@ -193,14 +196,14 @@ class Window_PokemonOption < Window_DrawableCommand
|
|||||||
@options[index].values.each do |value|
|
@options[index].values.each do |value|
|
||||||
totalwidth += self.contents.text_size(value).width
|
totalwidth += self.contents.text_size(value).width
|
||||||
end
|
end
|
||||||
spacing = (optionwidth - totalwidth) / (@options[index].values.length - 1)
|
spacing = (rect.width - rect.x - optionwidth - totalwidth) / (@options[index].values.length - 1)
|
||||||
spacing = 0 if spacing < 0
|
spacing = 0 if spacing < 0
|
||||||
xpos = optionwidth + rect.x
|
xpos = optionwidth + rect.x
|
||||||
ivalue = 0
|
ivalue = 0
|
||||||
@options[index].values.each do |value|
|
@options[index].values.each do |value|
|
||||||
pbDrawShadowText(self.contents, xpos, rect.y, optionwidth, rect.height, value,
|
pbDrawShadowText(self.contents, xpos, rect.y, optionwidth, rect.height, value,
|
||||||
(ivalue == self[index]) ? @selBaseColor : self.baseColor,
|
(ivalue == self[index]) ? SEL_VALUE_BASE_COLOR : self.baseColor,
|
||||||
(ivalue == self[index]) ? @selShadowColor : self.shadowColor)
|
(ivalue == self[index]) ? SEL_VALUE_SHADOW_COLOR : self.shadowColor)
|
||||||
xpos += self.contents.text_size(value).width
|
xpos += self.contents.text_size(value).width
|
||||||
xpos += spacing
|
xpos += spacing
|
||||||
ivalue += 1
|
ivalue += 1
|
||||||
@@ -210,48 +213,47 @@ class Window_PokemonOption < Window_DrawableCommand
|
|||||||
optionname, self.baseColor, self.shadowColor)
|
optionname, self.baseColor, self.shadowColor)
|
||||||
end
|
end
|
||||||
when NumberOption
|
when NumberOption
|
||||||
value = _INTL("Type {1}/{2}", @options[index].optstart + self[index],
|
value = _INTL("Type {1}/{2}", @options[index].lowest_value + self[index],
|
||||||
@options[index].optend - @options[index].optstart + 1)
|
@options[index].highest_value - @options[index].lowest_value + 1)
|
||||||
xpos = optionwidth + rect.x
|
xpos = optionwidth + rect.x * 2
|
||||||
pbDrawShadowText(self.contents, xpos, rect.y, optionwidth, rect.height, value,
|
pbDrawShadowText(self.contents, xpos, rect.y, optionwidth, rect.height, value,
|
||||||
@selBaseColor, @selShadowColor)
|
SEL_VALUE_BASE_COLOR, SEL_VALUE_SHADOW_COLOR, 1)
|
||||||
when SliderOption
|
when SliderOption
|
||||||
value = sprintf(" %d", @options[index].optend)
|
value = sprintf(" %d", @options[index].highest_value)
|
||||||
sliderlength = optionwidth - self.contents.text_size(value).width
|
sliderlength = rect.width - rect.x - optionwidth - self.contents.text_size(value).width
|
||||||
xpos = optionwidth + rect.x
|
xpos = optionwidth + rect.x
|
||||||
self.contents.fill_rect(xpos, rect.y - 2 + (rect.height / 2),
|
self.contents.fill_rect(xpos, rect.y - 2 + (rect.height / 2), sliderlength, 4, self.baseColor)
|
||||||
optionwidth - self.contents.text_size(value).width, 4, self.baseColor)
|
|
||||||
self.contents.fill_rect(
|
self.contents.fill_rect(
|
||||||
xpos + ((sliderlength - 8) * (@options[index].optstart + self[index]) / @options[index].optend),
|
xpos + ((sliderlength - 8) * (@options[index].lowest_value + self[index]) / @options[index].highest_value),
|
||||||
rect.y - 8 + (rect.height / 2),
|
rect.y - 8 + (rect.height / 2),
|
||||||
8, 16, @selBaseColor
|
8, 16, SEL_VALUE_BASE_COLOR
|
||||||
)
|
)
|
||||||
value = sprintf("%d", @options[index].optstart + self[index])
|
value = sprintf("%d", @options[index].lowest_value + self[index])
|
||||||
xpos += optionwidth - self.contents.text_size(value).width
|
xpos += (rect.width - rect.x - optionwidth) - self.contents.text_size(value).width
|
||||||
pbDrawShadowText(self.contents, xpos, rect.y, optionwidth, rect.height, value,
|
pbDrawShadowText(self.contents, xpos, rect.y, optionwidth, rect.height, value,
|
||||||
@selBaseColor, @selShadowColor)
|
SEL_VALUE_BASE_COLOR, SEL_VALUE_SHADOW_COLOR)
|
||||||
else
|
else
|
||||||
value = @options[index].values[self[index]]
|
value = @options[index].values[self[index]]
|
||||||
xpos = optionwidth + rect.x
|
xpos = optionwidth + rect.x
|
||||||
pbDrawShadowText(self.contents, xpos, rect.y, optionwidth, rect.height, value,
|
pbDrawShadowText(self.contents, xpos, rect.y, optionwidth, rect.height, value,
|
||||||
@selBaseColor, @selShadowColor)
|
SEL_VALUE_BASE_COLOR, SEL_VALUE_SHADOW_COLOR)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def update
|
def update
|
||||||
oldindex = self.index
|
oldindex = self.index
|
||||||
@mustUpdateOptions = false
|
@value_changed = false
|
||||||
super
|
super
|
||||||
dorefresh = (self.index != oldindex)
|
dorefresh = (self.index != oldindex)
|
||||||
if self.active && self.index < @options.length
|
if self.active && self.index < @options.length
|
||||||
if Input.repeat?(Input::LEFT)
|
if Input.repeat?(Input::LEFT)
|
||||||
self[self.index] = @options[self.index].prev(self[self.index])
|
self[self.index] = @options[self.index].prev(self[self.index])
|
||||||
dorefresh = true
|
dorefresh = true
|
||||||
@mustUpdateOptions = true
|
@value_changed = true
|
||||||
elsif Input.repeat?(Input::RIGHT)
|
elsif Input.repeat?(Input::RIGHT)
|
||||||
self[self.index] = @options[self.index].next(self[self.index])
|
self[self.index] = @options[self.index].next(self[self.index])
|
||||||
dorefresh = true
|
dorefresh = true
|
||||||
@mustUpdateOptions = true
|
@value_changed = true
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
refresh if dorefresh
|
refresh if dorefresh
|
||||||
@@ -265,71 +267,73 @@ class PokemonOption_Scene
|
|||||||
attr_reader :sprites
|
attr_reader :sprites
|
||||||
attr_reader :in_load_screen
|
attr_reader :in_load_screen
|
||||||
|
|
||||||
def pbUpdate
|
|
||||||
pbUpdateSpriteHash(@sprites)
|
|
||||||
end
|
|
||||||
|
|
||||||
def pbStartScene(in_load_screen = false)
|
def pbStartScene(in_load_screen = false)
|
||||||
@in_load_screen = in_load_screen
|
@in_load_screen = in_load_screen
|
||||||
@sprites = {}
|
|
||||||
@viewport = Viewport.new(0, 0, Graphics.width, Graphics.height)
|
|
||||||
@viewport.z = 99999
|
|
||||||
@sprites["title"] = Window_UnformattedTextPokemon.newWithSize(
|
|
||||||
_INTL("Options"), 0, 0, Graphics.width, 64, @viewport
|
|
||||||
)
|
|
||||||
@sprites["textbox"] = pbCreateMessageWindow
|
|
||||||
@sprites["textbox"].text = _INTL("Speech frame {1}.", 1 + $PokemonSystem.textskin)
|
|
||||||
@sprites["textbox"].letterbyletter = false
|
|
||||||
pbSetSystemFont(@sprites["textbox"].contents)
|
|
||||||
# Get all options
|
# Get all options
|
||||||
@options = []
|
@options = []
|
||||||
|
@hashes = []
|
||||||
MenuHandlers.each_available(:options_menu) do |option, hash, name|
|
MenuHandlers.each_available(:options_menu) do |option, hash, name|
|
||||||
@options.push(
|
@options.push(
|
||||||
hash["type"].new(name, hash["parameters"], hash["get_proc"], hash["set_proc"])
|
hash["type"].new(name, hash["parameters"], hash["get_proc"], hash["set_proc"])
|
||||||
)
|
)
|
||||||
|
@hashes.push(hash)
|
||||||
end
|
end
|
||||||
|
# Create sprites
|
||||||
|
@viewport = Viewport.new(0, 0, Graphics.width, Graphics.height)
|
||||||
|
@viewport.z = 99999
|
||||||
|
@sprites = {}
|
||||||
|
addBackgroundOrColoredPlane(@sprites, "bg", "optionsbg", Color.new(192, 200, 208), @viewport)
|
||||||
|
@sprites["title"] = Window_UnformattedTextPokemon.newWithSize(
|
||||||
|
_INTL("Options"), 0, -16, Graphics.width, 64, @viewport
|
||||||
|
)
|
||||||
|
@sprites["title"].back_opacity = 0
|
||||||
|
@sprites["textbox"] = pbCreateMessageWindow
|
||||||
|
pbSetSystemFont(@sprites["textbox"].contents)
|
||||||
@sprites["option"] = Window_PokemonOption.new(
|
@sprites["option"] = Window_PokemonOption.new(
|
||||||
@options, 0, @sprites["title"].height, Graphics.width,
|
@options, 0, @sprites["title"].y + @sprites["title"].height - 16, Graphics.width,
|
||||||
Graphics.height - @sprites["title"].height - @sprites["textbox"].height
|
Graphics.height - (@sprites["title"].y + @sprites["title"].height - 16) - @sprites["textbox"].height
|
||||||
)
|
)
|
||||||
@sprites["option"].viewport = @viewport
|
@sprites["option"].viewport = @viewport
|
||||||
@sprites["option"].visible = true
|
@sprites["option"].visible = true
|
||||||
# Get the values of each option
|
# Get the values of each option
|
||||||
@options.length.times do |i|
|
@options.length.times { |i| @sprites["option"].setValueNoRefresh(i, @options[i].get || 0) }
|
||||||
@sprites["option"].setValueNoRefresh(i, (@options[i].get || 0))
|
|
||||||
end
|
|
||||||
@sprites["option"].refresh
|
@sprites["option"].refresh
|
||||||
|
pbChangeSelection
|
||||||
pbDeactivateWindows(@sprites)
|
pbDeactivateWindows(@sprites)
|
||||||
pbFadeInAndShow(@sprites) { pbUpdate }
|
pbFadeInAndShow(@sprites) { pbUpdate }
|
||||||
end
|
end
|
||||||
|
|
||||||
def pbAddOnOptions(options)
|
def pbChangeSelection
|
||||||
return options
|
hash = @hashes[@sprites["option"].index]
|
||||||
|
# Call selected option's "on_select" proc (if defined)
|
||||||
|
@sprites["textbox"].letterbyletter = false
|
||||||
|
hash["on_select"]&.call(self) if hash
|
||||||
|
# Set descriptive text
|
||||||
|
description = ""
|
||||||
|
if hash
|
||||||
|
if hash["description"].is_a?(Proc)
|
||||||
|
description = hash["description"].call
|
||||||
|
elsif !hash["description"].nil?
|
||||||
|
description = _INTL(hash["description"])
|
||||||
|
end
|
||||||
|
else
|
||||||
|
description = _INTL("Close the screen.")
|
||||||
|
end
|
||||||
|
@sprites["textbox"].text = description
|
||||||
end
|
end
|
||||||
|
|
||||||
def pbOptions
|
def pbOptions
|
||||||
oldSystemSkin = $PokemonSystem.frame # Menu
|
|
||||||
oldTextSkin = $PokemonSystem.textskin # Speech
|
|
||||||
pbActivateWindow(@sprites, "option") {
|
pbActivateWindow(@sprites, "option") {
|
||||||
|
index = -1
|
||||||
loop do
|
loop do
|
||||||
Graphics.update
|
Graphics.update
|
||||||
Input.update
|
Input.update
|
||||||
pbUpdate
|
pbUpdate
|
||||||
if @sprites["option"].mustUpdateOptions
|
if @sprites["option"].index != index
|
||||||
@sprites["textbox"].letterbyletter = false
|
pbChangeSelection
|
||||||
# Set the values of each option
|
index = @sprites["option"].index
|
||||||
@options.length.times do |i|
|
|
||||||
@options[i].set(@sprites["option"][i], self)
|
|
||||||
end
|
|
||||||
if $PokemonSystem.textskin != oldTextSkin
|
|
||||||
@sprites["textbox"].text = _INTL("Speech frame {1}.", 1 + $PokemonSystem.textskin)
|
|
||||||
oldTextSkin = $PokemonSystem.textskin
|
|
||||||
end
|
|
||||||
if $PokemonSystem.frame != oldSystemSkin
|
|
||||||
@sprites["title"].setSkin(MessageConfig.pbGetSystemFrame)
|
|
||||||
oldSystemSkin = $PokemonSystem.frame
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
@options[index].set(@sprites["option"][index], self) if @sprites["option"].value_changed
|
||||||
if Input.trigger?(Input::BACK)
|
if Input.trigger?(Input::BACK)
|
||||||
break
|
break
|
||||||
elsif Input.trigger?(Input::USE)
|
elsif Input.trigger?(Input::USE)
|
||||||
@@ -342,7 +346,7 @@ class PokemonOption_Scene
|
|||||||
def pbEndScene
|
def pbEndScene
|
||||||
pbPlayCloseMenuSE
|
pbPlayCloseMenuSE
|
||||||
pbFadeOutAndHide(@sprites) { pbUpdate }
|
pbFadeOutAndHide(@sprites) { pbUpdate }
|
||||||
# Set the values of each option
|
# Set the values of each option, to make sure they're all set
|
||||||
@options.length.times do |i|
|
@options.length.times do |i|
|
||||||
@options[i].set(@sprites["option"][i], self)
|
@options[i].set(@sprites["option"][i], self)
|
||||||
end
|
end
|
||||||
@@ -351,6 +355,10 @@ class PokemonOption_Scene
|
|||||||
pbRefreshSceneMap
|
pbRefreshSceneMap
|
||||||
@viewport.dispose
|
@viewport.dispose
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def pbUpdate
|
||||||
|
pbUpdateSpriteHash(@sprites)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
@@ -376,6 +384,7 @@ MenuHandlers.add(:options_menu, :bgm_volume, {
|
|||||||
"order" => 10,
|
"order" => 10,
|
||||||
"type" => SliderOption,
|
"type" => SliderOption,
|
||||||
"parameters" => [0, 100, 5], # [minimum_value, maximum_value, interval]
|
"parameters" => [0, 100, 5], # [minimum_value, maximum_value, interval]
|
||||||
|
"description" => _INTL("Adjust the volume of the background music."),
|
||||||
"get_proc" => proc { next $PokemonSystem.bgmvolume },
|
"get_proc" => proc { next $PokemonSystem.bgmvolume },
|
||||||
"set_proc" => proc { |value, scene|
|
"set_proc" => proc { |value, scene|
|
||||||
next if $PokemonSystem.bgmvolume == value
|
next if $PokemonSystem.bgmvolume == value
|
||||||
@@ -392,6 +401,7 @@ MenuHandlers.add(:options_menu, :se_volume, {
|
|||||||
"order" => 20,
|
"order" => 20,
|
||||||
"type" => SliderOption,
|
"type" => SliderOption,
|
||||||
"parameters" => [0, 100, 5], # [minimum_value, maximum_value, interval]
|
"parameters" => [0, 100, 5], # [minimum_value, maximum_value, interval]
|
||||||
|
"description" => _INTL("Adjust the volume of sound effects."),
|
||||||
"get_proc" => proc { next $PokemonSystem.sevolume },
|
"get_proc" => proc { next $PokemonSystem.sevolume },
|
||||||
"set_proc" => proc { |value, _scene|
|
"set_proc" => proc { |value, _scene|
|
||||||
next if $PokemonSystem.sevolume == value
|
next if $PokemonSystem.sevolume == value
|
||||||
@@ -411,6 +421,8 @@ MenuHandlers.add(:options_menu, :text_speed, {
|
|||||||
"order" => 30,
|
"order" => 30,
|
||||||
"type" => EnumOption,
|
"type" => EnumOption,
|
||||||
"parameters" => [_INTL("Slow"), _INTL("Normal"), _INTL("Fast")],
|
"parameters" => [_INTL("Slow"), _INTL("Normal"), _INTL("Fast")],
|
||||||
|
"description" => _INTL("Choose the speed at which text appears."),
|
||||||
|
"on_select" => proc { |scene| scene.sprites["textbox"].letterbyletter = true },
|
||||||
"get_proc" => proc { next $PokemonSystem.textspeed },
|
"get_proc" => proc { next $PokemonSystem.textspeed },
|
||||||
"set_proc" => proc { |value, scene|
|
"set_proc" => proc { |value, scene|
|
||||||
next if value == $PokemonSystem.textspeed
|
next if value == $PokemonSystem.textspeed
|
||||||
@@ -428,6 +440,7 @@ MenuHandlers.add(:options_menu, :battle_animations, {
|
|||||||
"order" => 40,
|
"order" => 40,
|
||||||
"type" => EnumOption,
|
"type" => EnumOption,
|
||||||
"parameters" => [_INTL("On"), _INTL("Off")],
|
"parameters" => [_INTL("On"), _INTL("Off")],
|
||||||
|
"description" => _INTL("Choose whether you wish to see move animations in battle."),
|
||||||
"get_proc" => proc { next $PokemonSystem.battlescene },
|
"get_proc" => proc { next $PokemonSystem.battlescene },
|
||||||
"set_proc" => proc { |value, _scene| $PokemonSystem.battlescene = value }
|
"set_proc" => proc { |value, _scene| $PokemonSystem.battlescene = value }
|
||||||
})
|
})
|
||||||
@@ -437,6 +450,7 @@ MenuHandlers.add(:options_menu, :battle_style, {
|
|||||||
"order" => 50,
|
"order" => 50,
|
||||||
"type" => EnumOption,
|
"type" => EnumOption,
|
||||||
"parameters" => [_INTL("Switch"), _INTL("Set")],
|
"parameters" => [_INTL("Switch"), _INTL("Set")],
|
||||||
|
"description" => _INTL("Choose whether you can switch Pokémon when an opponent's Pokémon faints."),
|
||||||
"get_proc" => proc { next $PokemonSystem.battlestyle },
|
"get_proc" => proc { next $PokemonSystem.battlestyle },
|
||||||
"set_proc" => proc { |value, _scene| $PokemonSystem.battlestyle = value }
|
"set_proc" => proc { |value, _scene| $PokemonSystem.battlestyle = value }
|
||||||
})
|
})
|
||||||
@@ -446,6 +460,7 @@ MenuHandlers.add(:options_menu, :movement_style, {
|
|||||||
"order" => 60,
|
"order" => 60,
|
||||||
"type" => EnumOption,
|
"type" => EnumOption,
|
||||||
"parameters" => [_INTL("Walking"), _INTL("Running")],
|
"parameters" => [_INTL("Walking"), _INTL("Running")],
|
||||||
|
"description" => _INTL("Choose your movement speed. Hold Back while moving to move at the other speed."),
|
||||||
"condition" => proc { next $player&.has_running_shoes },
|
"condition" => proc { next $player&.has_running_shoes },
|
||||||
"get_proc" => proc { next $PokemonSystem.runstyle },
|
"get_proc" => proc { next $PokemonSystem.runstyle },
|
||||||
"set_proc" => proc { |value, _sceme| $PokemonSystem.runstyle = value }
|
"set_proc" => proc { |value, _sceme| $PokemonSystem.runstyle = value }
|
||||||
@@ -456,6 +471,7 @@ MenuHandlers.add(:options_menu, :give_nicknames, {
|
|||||||
"order" => 70,
|
"order" => 70,
|
||||||
"type" => EnumOption,
|
"type" => EnumOption,
|
||||||
"parameters" => [_INTL("Give"), _INTL("Don't give")],
|
"parameters" => [_INTL("Give"), _INTL("Don't give")],
|
||||||
|
"description" => _INTL("Choose whether you can give a nickname to a Pokémon when you obtain it."),
|
||||||
"get_proc" => proc { next $PokemonSystem.givenicknames },
|
"get_proc" => proc { next $PokemonSystem.givenicknames },
|
||||||
"set_proc" => proc { |value, _scene| $PokemonSystem.givenicknames = value }
|
"set_proc" => proc { |value, _scene| $PokemonSystem.givenicknames = value }
|
||||||
})
|
})
|
||||||
@@ -465,6 +481,7 @@ MenuHandlers.add(:options_menu, :speech_frame, {
|
|||||||
"order" => 80,
|
"order" => 80,
|
||||||
"type" => NumberOption,
|
"type" => NumberOption,
|
||||||
"parameters" => 1..Settings::SPEECH_WINDOWSKINS.length,
|
"parameters" => 1..Settings::SPEECH_WINDOWSKINS.length,
|
||||||
|
"description" => _INTL("Choose the appearance of dialogue boxes."),
|
||||||
"get_proc" => proc { next $PokemonSystem.textskin },
|
"get_proc" => proc { next $PokemonSystem.textskin },
|
||||||
"set_proc" => proc { |value, scene|
|
"set_proc" => proc { |value, scene|
|
||||||
$PokemonSystem.textskin = value
|
$PokemonSystem.textskin = value
|
||||||
@@ -479,6 +496,7 @@ MenuHandlers.add(:options_menu, :menu_frame, {
|
|||||||
"order" => 90,
|
"order" => 90,
|
||||||
"type" => NumberOption,
|
"type" => NumberOption,
|
||||||
"parameters" => 1..Settings::MENU_WINDOWSKINS.length,
|
"parameters" => 1..Settings::MENU_WINDOWSKINS.length,
|
||||||
|
"description" => _INTL("Choose the appearance of menu boxes."),
|
||||||
"get_proc" => proc { next $PokemonSystem.frame },
|
"get_proc" => proc { next $PokemonSystem.frame },
|
||||||
"set_proc" => proc { |value, scene|
|
"set_proc" => proc { |value, scene|
|
||||||
$PokemonSystem.frame = value
|
$PokemonSystem.frame = value
|
||||||
@@ -493,6 +511,7 @@ MenuHandlers.add(:options_menu, :text_input_style, {
|
|||||||
"order" => 100,
|
"order" => 100,
|
||||||
"type" => EnumOption,
|
"type" => EnumOption,
|
||||||
"parameters" => [_INTL("Cursor"), _INTL("Keyboard")],
|
"parameters" => [_INTL("Cursor"), _INTL("Keyboard")],
|
||||||
|
"description" => _INTL("Choose how you want to enter text."),
|
||||||
"get_proc" => proc { next $PokemonSystem.textinput },
|
"get_proc" => proc { next $PokemonSystem.textinput },
|
||||||
"set_proc" => proc { |value, _scene| $PokemonSystem.textinput = value }
|
"set_proc" => proc { |value, _scene| $PokemonSystem.textinput = value }
|
||||||
})
|
})
|
||||||
@@ -502,6 +521,7 @@ MenuHandlers.add(:options_menu, :screen_size, {
|
|||||||
"order" => 110,
|
"order" => 110,
|
||||||
"type" => EnumOption,
|
"type" => EnumOption,
|
||||||
"parameters" => [_INTL("S"), _INTL("M"), _INTL("L"), _INTL("XL"), _INTL("Full")],
|
"parameters" => [_INTL("S"), _INTL("M"), _INTL("L"), _INTL("XL"), _INTL("Full")],
|
||||||
|
"description" => _INTL("Choose the size of the game window."),
|
||||||
"get_proc" => proc { next [$PokemonSystem.screensize, 4].min },
|
"get_proc" => proc { next [$PokemonSystem.screensize, 4].min },
|
||||||
"set_proc" => proc { |value, _scene|
|
"set_proc" => proc { |value, _scene|
|
||||||
next if $PokemonSystem.screensize == value
|
next if $PokemonSystem.screensize == value
|
||||||
|
|||||||
Reference in New Issue
Block a user