Guest Access
EVENTALIST
EVENTALIST
EVENTALIST
profile
mr_wiggles
profile
Version 1.0
June 11, 2010
This will display a grid that is 10 x 10 pixels in white, has a bold lines every 40 pixels in green and center lines in red. it can be toggled with F5.
looking to add some more features that would help out when making windows.
screen shot:
Script:
Picture file... (needed, place in your picture folder in your project, right click to save)
June 11, 2010
This will display a grid that is 10 x 10 pixels in white, has a bold lines every 40 pixels in green and center lines in red. it can be toggled with F5.
looking to add some more features that would help out when making windows.
screen shot:
Script:
- Code:
#==============================================================================
# ** Window Grid
#------------------------------------------------------------------------------
# Mr Wiggles
# Version 1.0
# 5/5/10
#------------------------------------------------------------------------------
# Instructions:
# Place this script above main in the scripts data base, and place the
# "Window Grid" png file in your picture folder.
#
# Grid can be toggled by useing F5.
#==============================================================================
GRID_OPACITY = 100 # Opacity (0 - 255)
USE_GRID = true # Use the grid
ACTIVE = false # Show grid on game start up
ONTOP = false # Show grid ontop of everything or underneith
#==============================================================================
# ** Window_Grid
#==============================================================================
class Window_Grid < Window_Base
def initialize
super(-16 , -16, 700, 700)
self.contents = Bitmap.new(width - 32, height - 32)
self.opacity = 0
self.z = ONTOP ? 999999 : -1
@grid_active = ACTIVE
@need_refresh = true
refresh
end
def refresh
return if @missing_png or @grid_active == false
self.contents.clear
grid = RPG::Cache.picture("Window Grid") rescue @missing_png = true
if @missing_png
print ("Missing grid png file, be sure it's placed in the pictures folder.")
return
end
self.contents.blt(0, 0, grid, Rect.new(0, 0, 640, 480), GRID_OPACITY)
@need_refresh = false
end
def update
if Input.trigger?(Input::F5)
@grid_active = !@grid_active
return
end
if @grid_active
refresh if @need_refresh
else
self.contents.clear
@need_refresh = true
end
end
end
#==============================================================================
# ** Graphics Module
#==============================================================================
module Graphics
class << self
alias :grid_window_update :update
def update
grid_window_update
if USE_GRID
@window_grid = Window_Grid.new if @window_grid == nil
@window_grid.update
end
end
end
end
Picture file... (needed, place in your picture folder in your project, right click to save)
EVENTALIST
Show Signature
EVENTALIST
Administrator
Administrator
Administrator
profile
G@MeF@Ce
profile
another nifty script, thinking about using this as the quick commands menu.
"So how do you play this game?" PRESS F5! ^,^
"So how do you play this game?" PRESS F5! ^,^
Administrator
Show Signature