mirror of
https://github.com/cyberarm/i-mic-fps.git
synced 2025-12-15 15:42:35 +00:00
Added DebugCommand, added support for 'subcommands'
This commit is contained in:
31
lib/ui/commands/debug_command.rb
Normal file
31
lib/ui/commands/debug_command.rb
Normal file
@@ -0,0 +1,31 @@
|
||||
class IMICFPS
|
||||
class Commands
|
||||
class DebugCommand < Command
|
||||
def group
|
||||
:global
|
||||
end
|
||||
|
||||
def command
|
||||
:debug
|
||||
end
|
||||
|
||||
def setup
|
||||
subcommand(:boundingboxes, :boolean)
|
||||
subcommand(:wireframe, :boolean)
|
||||
subcommand(:fps, :boolean)
|
||||
subcommand(:stats, :boolean)
|
||||
subcommand(:motd, :string)
|
||||
subcommand(:mode, :integer)
|
||||
subcommand(:gravity, :decimal)
|
||||
end
|
||||
|
||||
def handle(arguments, console)
|
||||
handle_subcommand(arguments, console)
|
||||
end
|
||||
|
||||
def usage
|
||||
string = "debug\n #{@subcommands.map { |sub| sub.usage }.join("\n ")}"
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user