Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # ==============================================================================
- # ▼▼▼▼▼▼ TroyZ - FFL Mission Mode ▼▼▼▼▼▼
- # ==============================================================================
- # Change Logs :
- #
- # ------------------------------------------------------------------------------
- # Story dipisah2 berdasarkan misinya. Total ada 20 misi.
- module AGUNG
- module MISSION_MODE
- MISSION_MODE_TITLE = "Mission Mode"
- MISSION_LIST = {
- #No. Nama Misi
- 1 => ["A New Leaf", 4],
- 2 => ["Suspicious Behavior", 5],
- 3 => ["Hidden Power", 6],
- }
- end
- end
- # ------------------------------------------------------------------------------
- # Window_MissionModeTitle, judul scene
- # ------------------------------------------------------------------------------
- class Window_MissionModeTitle < Window_Base
- include AGUNG::MISSION_MODE
- def initialize
- super(0, 0, 640, line_height * 2)
- end
- def draw_help
- draw_text(0, 0, 640, line_height, MISSION_MODE_TITLE, 1)
- end
- end
- # ------------------------------------------------------------------------------
- # Window_MissionHelp, bantuan tombol yang dibawah
- # ------------------------------------------------------------------------------
- class Window_MissionHelp < Window_Base
- def initialize
- super(0, 435, 640, line_height * 2)
- end
- def draw_help
- @text = "Z : OK | X : Cancel | Q : Scroll Up | W : Scroll Down"
- draw_text(0, 0, 640, line_height, @text, 1)
- end
- end
- # ------------------------------------------------------------------------------
- # Window_MissionTitle, judul misi disebelah kanan
- # ------------------------------------------------------------------------------
- class Window_MissionTitle < Window_Base
- def initialize
- super(Graphics.width / 2, 48, Graphics.width / 2, line_height * 2)
- end
- def draw_desc
- @text = "Judul misi ditulis disini"
- draw_text(0, 0, Graphics.width / 2, line_height, @text, 1)
- end
- end
- # ------------------------------------------------------------------------------
- # Window_MissionDesc, deskripsi misi dibawahnya judul misi
- # ------------------------------------------------------------------------------
- class Window_MissionDesc < Window_Base
- def initialize
- super(Graphics.width / 2, 96, Graphics.width / 2, 339)
- end
- def draw_desc
- @text = "Deskripsi misi ditulis disini"
- draw_text(0, 0, Graphics.width / 2, line_height, @text)
- end
- end
- # ------------------------------------------------------------------------------
- # Window_MissionList, semua misi muncul disini
- # ------------------------------------------------------------------------------
- class Window_MissionList < Window_Selectable
- include AGUNG::MISSION_MODE
- def initialize(x, y, width, height)
- super
- @data = []
- end
- def item_max
- @data ? @data.size : 1
- end
- def item
- @data && index >= 0 ? @data[index] : nil
- end
- def include?
- end
- def make_item_list
- @data = MISSION_LIST.values.each do |item| item end
- puts @data
- end
- def draw_item(index)
- item = @data[index]
- if item
- rect = item_rect(index)
- rect.width -= 4
- draw_text(x + 24, y + 24, width, line_height, item)
- end
- end
- def refresh
- make_item_list
- create_contents
- draw_all_items
- end
- def update
- super
- if @old_index != @index
- refresh
- @old_index = @index
- end
- end
- end
- # ------------------------------------------------------------------------------
- # Scene_MissionMode, disinilah semua ini berawal :v
- # ------------------------------------------------------------------------------
- class Scene_MissionMode < Scene_Base
- def start
- super
- create_background
- create_mission_mode_title
- create_mission_mode_help
- create_mission_title
- create_mission_desc
- create_mission_list
- end
- def create_background
- @background_sprite = Sprite.new
- @background_sprite.bitmap = SceneManager.background_bitmap
- @background_sprite.color.set(16, 16, 16, 128)
- end
- def create_mission_mode_title
- @title = Window_MissionModeTitle.new
- @title.draw_help
- end
- def create_mission_mode_help
- @help = Window_MissionHelp.new
- @help.draw_help
- end
- def create_mission_title
- @mission_title = Window_MissionTitle.new
- @mission_title.draw_desc
- end
- def create_mission_desc
- @mission_desc = Window_MissionDesc.new
- @mission_desc.draw_desc
- end
- def create_mission_list
- @mission_list = Window_MissionList.new(0, 48, Graphics.width / 2, 387)
- @mission_list.set_handler(:ok, method(:on_item_ok))
- @mission_list.set_handler(:cancel, method(:on_item_cancel))
- end
- def on_item_ok
- end
- def on_item_cancel
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement