Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- module Flip
- Erfolge = [
- # [Text, Wert, Maximalwert, Trophäenbild]
- # Wert, Maximalwert und Trophäenbild entsprechen der Variable.
- ["Getötete Gegner", 1, 2, 3], # der Beistrich ist hier ganz wichtig, ebenso alles
- # in eckigen Klammern halten.
- ["Erhaltenes Geld", 4],
- ] # <-- NICHT ENTFERNEN!!
- Trophaen_ID = [ # Hier kannst du die Icon-ID für die Trophäen angeben.
- 0, # keine Trophäe
- 1, # Trophäe 1
- 2, # Trophäe 2
- 3, # Trophäe 3
- 4, # Trophäe 4
- ] # <-- NICHT ENTFERNEN!!
- end
- class Window_MenuCommand < Window_Command
- #--------------------------------------------------------------------------
- # * Add Exit Game to Command List
- #--------------------------------------------------------------------------
- def add_game_end_command
- add_command("Erfolge", :erfolge)
- add_command(Vocab::game_end, :game_end)
- end
- end
- class Scene_Menu < Scene_MenuBase
- #--------------------------------------------------------------------------
- # * Create Command Window
- #--------------------------------------------------------------------------
- def create_command_window
- @command_window = Window_MenuCommand.new
- @command_window.set_handler(:item, method(:command_item))
- @command_window.set_handler(:skill, method(:command_personal))
- @command_window.set_handler(:equip, method(:command_personal))
- @command_window.set_handler(:status, method(:command_personal))
- @command_window.set_handler(:formation, method(:command_formation))
- @command_window.set_handler(:save, method(:command_save))
- @command_window.set_handler(:erfolge, method(:command_erfolge))
- @command_window.set_handler(:game_end, method(:command_game_end))
- @command_window.set_handler(:cancel, method(:return_scene))
- end
- def command_erfolge
- SceneManager.call(Scene_Erfolge)
- end
- end
- class Scene_Erfolge < Scene_Base
- #--------------------------------------------------------------------------
- # * Start Processing
- #--------------------------------------------------------------------------
- def start
- super
- @erfolgs_window = Window_Erfolge.new
- @erfolgs_window.set_handler(:cancel, method(:return_scene))
- end
- end
- class Window_Erfolge < Window_Selectable
- #--------------------------------------------------------------------------
- # * Object Initialization
- #--------------------------------------------------------------------------
- def initialize
- super(0, 0, Graphics.width, Graphics.height)
- refresh
- activate
- end
- #--------------------------------------------------------------------------
- # * Refresh
- #--------------------------------------------------------------------------
- def refresh
- contents.clear
- for i in 0...Flip::Erfolge.size
- if Flip::Erfolge[i].size > 2
- draw_line_with_slash(i)
- else
- draw_line_without_slash(i)
- end
- end
- end
- def draw_line_with_slash(i)
- text = sprintf("%s: %s / %s",Flip::Erfolge[i][0],$game_variables[Flip::Erfolge[i][1]],$game_variables[Flip::Erfolge[i][2]])
- y = 24 * i
- draw_text_ex(34, y, text)
- draw_icon(Flip::Trophaen_ID[$game_variables[Flip::Erfolge[i][3]]], 10, y)
- end
- def draw_line_without_slash(i)
- text = sprintf("%s: %s",Flip::Erfolge[i][0], $game_variables[Flip::Erfolge[i][1]])
- draw_text_ex(34, 24 * i, text)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement