Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #==============================================================================#
- # Name: DizzyFoxkit_CMS #
- # Refrence Number: 001 #
- # Coder: DizzyFoxkit (Foxkit) #
- # Purpose: A custom Menu system for the Tales Series #
- #==============================================================================#
- #==============================================================================#
- # Refrence Number: 002 #
- #------------------------------------------------------------------------------#
- # Adds the Basic move elements to the Window_Base class so that the window can #
- # move about. And allows the Window to move on updates if @move_y or _x = true #
- #------------------------------------------------------------------------------#
- #==============================================================================#
- class Window_Base < Window
- attr_accessor :move_x
- attr_accessor :move_y
- attr_accessor :dest_x
- attr_accessor :dest_y
- def start(dest_x, dest_y)
- @move_x = move_x
- @move_y = move_y
- @dest_x = dest_x
- @dest_y = dest_y
- end
- def win_move
- if @dest_x != self.x
- @move_x = true
- else
- @move_x = false
- end
- if @dest_y != self.y
- @move_y = true
- else
- @move_y = false
- end
- end
- alias CMS_update update
- def update
- if @move_x == true && self.x < @dest_x
- self.x = self.x + 32
- end
- if @move_x == true && self.x > @dest_x
- self.x = self.x - 32
- end
- if @move_y == true && self.y < @dest_y
- self.y = self.y + 32
- end
- if @move_y == true && self.y > @dest_y
- self.y = self.y - 32
- end
- end
- end
- class Window_MenuStatus < Window_Selectable
- def initialize
- super(0, 0, 480, 480)
- self.contents = Bitmap.new(width - 32, height - 32)
- refresh
- self.active = false
- self.index = -1
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement