mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-07 21:24:59 +00:00
More aligning of code
This commit is contained in:
@@ -223,7 +223,7 @@ class AnimationWindow < SpriteWrapper
|
||||
@contents.fill_rect(0, 0, @contents.width, @contents.height, Color.new(180, 180, 180))
|
||||
@contents.blt(0, 0, @arrows.bitmap, Rect.new(0, 0, arrowwidth, 96))
|
||||
@contents.blt(arrowwidth + NUMFRAMES * 96, 0, @arrows.bitmap,
|
||||
Rect.new(arrowwidth, 0, arrowwidth, 96))
|
||||
Rect.new(arrowwidth, 0, arrowwidth, 96))
|
||||
havebitmap = (self.animbitmap && !self.animbitmap.disposed?)
|
||||
if havebitmap
|
||||
rect = Rect.new(0, 0, 0, 0)
|
||||
@@ -484,7 +484,7 @@ class AnimationCanvas < Sprite
|
||||
else
|
||||
begin
|
||||
@animbitmap = AnimatedBitmap.new("Graphics/Animations/" + @animation.graphic,
|
||||
@animation.hue).deanimate
|
||||
@animation.hue).deanimate
|
||||
rescue
|
||||
@animbitmap = nil
|
||||
end
|
||||
@@ -527,13 +527,13 @@ class AnimationCanvas < Sprite
|
||||
@sprites["pokemon_1"].bitmap = @target
|
||||
@sprites["pokemon_1"].z = 16
|
||||
pbSpriteSetAnimFrame(@sprites["pokemon_0"],
|
||||
pbCreateCel(Battle::Scene::FOCUSUSER_X,
|
||||
Battle::Scene::FOCUSUSER_Y, -1, 2),
|
||||
@sprites["pokemon_0"], @sprites["pokemon_1"])
|
||||
pbCreateCel(Battle::Scene::FOCUSUSER_X,
|
||||
Battle::Scene::FOCUSUSER_Y, -1, 2),
|
||||
@sprites["pokemon_0"], @sprites["pokemon_1"])
|
||||
pbSpriteSetAnimFrame(@sprites["pokemon_1"],
|
||||
pbCreateCel(Battle::Scene::FOCUSTARGET_X,
|
||||
Battle::Scene::FOCUSTARGET_Y, -2, 1),
|
||||
@sprites["pokemon_0"], @sprites["pokemon_1"])
|
||||
pbCreateCel(Battle::Scene::FOCUSTARGET_X,
|
||||
Battle::Scene::FOCUSTARGET_Y, -2, 1),
|
||||
@sprites["pokemon_0"], @sprites["pokemon_1"])
|
||||
usersprite = @sprites["pokemon_#{oppmove ? 1 : 0}"]
|
||||
targetsprite = @sprites["pokemon_#{oppmove ? 0 : 1}"]
|
||||
olduserx = usersprite ? usersprite.x : 0
|
||||
@@ -541,12 +541,15 @@ class AnimationCanvas < Sprite
|
||||
oldtargetx = targetsprite ? targetsprite.x : 0
|
||||
oldtargety = targetsprite ? targetsprite.y : 0
|
||||
@player = PBAnimationPlayerX.new(@animation,
|
||||
@battle.battlers[oppmove ? 1 : 0], @battle.battlers[oppmove ? 0 : 1], self, oppmove, true)
|
||||
@battle.battlers[oppmove ? 1 : 0],
|
||||
@battle.battlers[oppmove ? 0 : 1],
|
||||
self, oppmove, true)
|
||||
@player.setLineTransform(
|
||||
Battle::Scene::FOCUSUSER_X, Battle::Scene::FOCUSUSER_Y,
|
||||
Battle::Scene::FOCUSTARGET_X, Battle::Scene::FOCUSTARGET_Y,
|
||||
olduserx, oldusery,
|
||||
oldtargetx, oldtargety)
|
||||
Battle::Scene::FOCUSUSER_X, Battle::Scene::FOCUSUSER_Y,
|
||||
Battle::Scene::FOCUSTARGET_X, Battle::Scene::FOCUSTARGET_Y,
|
||||
olduserx, oldusery,
|
||||
oldtargetx, oldtargety
|
||||
)
|
||||
@player.start
|
||||
@playing = true
|
||||
@sprites["pokemon_0"].x += BORDERSIZE
|
||||
@@ -992,10 +995,9 @@ class BitmapDisplayWindow < SpriteWindow_Base
|
||||
wh = sx * wh
|
||||
ww = self.contents.width
|
||||
end
|
||||
dest = Rect.new(
|
||||
(self.contents.width - ww) / 2,
|
||||
(self.contents.height - wh) / 2,
|
||||
ww, wh)
|
||||
dest = Rect.new((self.contents.width - ww) / 2,
|
||||
(self.contents.height - wh) / 2,
|
||||
ww, wh)
|
||||
src = Rect.new(0, 0, bmap.width, bmap.height)
|
||||
self.contents.stretch_blt(dest, bmap, src)
|
||||
bmap.dispose
|
||||
@@ -1009,7 +1011,8 @@ class AnimationNameWindow
|
||||
@canvas = canvas
|
||||
@oldname = nil
|
||||
@window = Window_UnformattedTextPokemon.newWithSize(
|
||||
_INTL("Name: {1}", @canvas.animation.name), x, y, width, height, viewport)
|
||||
_INTL("Name: {1}", @canvas.animation.name), x, y, width, height, viewport
|
||||
)
|
||||
end
|
||||
|
||||
def viewport=(value); @window.viewport = value; end
|
||||
|
||||
@@ -8,8 +8,8 @@ module ShadowText
|
||||
x += (w / 2) - (width / 2)
|
||||
end
|
||||
pbDrawShadowText(bitmap, x, y, w, h, t,
|
||||
disabled ? Color.new(26 * 8, 26 * 8, 25 * 8) : Color.new(12 * 8, 12 * 8, 12 * 8),
|
||||
Color.new(26 * 8, 26 * 8, 25 * 8))
|
||||
disabled ? Color.new(26 * 8, 26 * 8, 25 * 8) : Color.new(12 * 8, 12 * 8, 12 * 8),
|
||||
Color.new(26 * 8, 26 * 8, 25 * 8))
|
||||
end
|
||||
end
|
||||
|
||||
@@ -47,10 +47,7 @@ class UIControl
|
||||
end
|
||||
|
||||
def toAbsoluteRect(rc)
|
||||
return Rect.new(
|
||||
rc.x + self.parentX,
|
||||
rc.y + self.parentY,
|
||||
rc.width, rc.height)
|
||||
return Rect.new(rc.x + self.parentX, rc.y + self.parentY, rc.width, rc.height)
|
||||
end
|
||||
|
||||
def parentX
|
||||
@@ -442,7 +439,7 @@ class Slider < UIControl
|
||||
shadowtext(bitmap, x, y, size, height, self.label)
|
||||
x += size
|
||||
shadowtext(bitmap, x, y, leftarrows.width, height, _INTL(" << "),
|
||||
self.disabled || self.curvalue == self.minvalue)
|
||||
self.disabled || self.curvalue == self.minvalue)
|
||||
@leftarrow = Rect.new(x, y, leftarrows.width, height)
|
||||
x += leftarrows.width
|
||||
if !self.disabled
|
||||
@@ -451,7 +448,7 @@ class Slider < UIControl
|
||||
end
|
||||
x += numbers
|
||||
shadowtext(bitmap, x, y, rightarrows.width, height, _INTL(" >> "),
|
||||
self.disabled || self.curvalue == self.maxvalue)
|
||||
self.disabled || self.curvalue == self.maxvalue)
|
||||
@rightarrow = Rect.new(x, y, rightarrows.width, height)
|
||||
end
|
||||
end
|
||||
@@ -690,7 +687,7 @@ class TextSlider < UIControl
|
||||
shadowtext(bitmap, x, y, size, height, self.label)
|
||||
x += size
|
||||
shadowtext(bitmap, x, y, leftarrows.width, height, _INTL(" << "),
|
||||
self.disabled || self.curvalue == self.minvalue)
|
||||
self.disabled || self.curvalue == self.minvalue)
|
||||
@leftarrow = Rect.new(x, y, leftarrows.width, height)
|
||||
x += leftarrows.width
|
||||
if !self.disabled
|
||||
@@ -699,7 +696,7 @@ class TextSlider < UIControl
|
||||
end
|
||||
x += @maxoptionwidth
|
||||
shadowtext(bitmap, x, y, rightarrows.width, height, _INTL(" >> "),
|
||||
self.disabled || self.curvalue == self.maxvalue)
|
||||
self.disabled || self.curvalue == self.maxvalue)
|
||||
@rightarrow = Rect.new(x, y, rightarrows.width, height)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -283,8 +283,9 @@ def pbDefinePath(canvas)
|
||||
showline = false
|
||||
sliderwin2.visible = false
|
||||
# This window displays the mouse's current position
|
||||
window = Window_UnformattedTextPokemon.newWithSize("",
|
||||
0, 320 - 64, 128, 64, canvas.viewport)
|
||||
window = Window_UnformattedTextPokemon.newWithSize(
|
||||
"", 0, 320 - 64, 128, 64, canvas.viewport
|
||||
)
|
||||
loop do
|
||||
Graphics.update
|
||||
Input.update
|
||||
@@ -363,8 +364,9 @@ def pbDefinePath(canvas)
|
||||
point.dispose
|
||||
end
|
||||
points.clear
|
||||
window = Window_UnformattedTextPokemon.newWithSize("",
|
||||
0, 320 - 64, 128, 64, canvas.viewport)
|
||||
window = Window_UnformattedTextPokemon.newWithSize(
|
||||
"", 0, 320 - 64, 128, 64, canvas.viewport
|
||||
)
|
||||
sliderwin2.visible = false
|
||||
loop do
|
||||
Graphics.update
|
||||
|
||||
@@ -128,8 +128,9 @@ def pbAnimList(animations, canvas, animwin)
|
||||
cmdwin.index = animations.selected
|
||||
cmdwin.viewport = canvas.viewport
|
||||
helpwindow = Window_UnformattedTextPokemon.newWithSize(
|
||||
_INTL("Enter: Load/rename an animation\nEsc: Cancel"),
|
||||
320, 0, 320, 128, canvas.viewport)
|
||||
_INTL("Enter: Load/rename an animation\nEsc: Cancel"),
|
||||
320, 0, 320, 128, canvas.viewport
|
||||
)
|
||||
maxsizewindow = ControlWindow.new(0, 416, 320, 32 * 3)
|
||||
maxsizewindow.addSlider(_INTL("Total Animations:"), 1, 2000, animations.length)
|
||||
maxsizewindow.addButton(_INTL("Resize Animation List"))
|
||||
|
||||
Reference in New Issue
Block a user