Class: GamesAndRpgParadise::GUI::Gtk::SoundEffects

Inherits:
Gtk::BaseModuleBox
  • Object
show all
Defined in:
lib/games_and_rpg_paradise/gui/gtk3/sound_effects/sound_effects.rb

Overview

GamesAndRpgParadise::GUI::Gtk::SoundEffects

Constant Summary collapse

SOUND_EFFECTS_DIRECTORY =
#

SOUND_EFFECTS_DIRECTORY

#
GamesAndRpgParadise.project_base_dir?+'audio/sound_effects/'
STORM_AND_THUNDER =
#

Next list all .mp3 audio files that are used:

#
SOUND_EFFECTS_DIRECTORY+'storm_and_thunder.mp3'
LOGO_IMAGE =
#

LOGO_IMAGE

#
'/home/x/data/images/AUDIO/AUDACITY.png'
TITLE =
#

TITLE

#
'Sound Effects'
WIDTH =
#

WIDTH

#
'75% or minimum 850px'
HEIGHT =
#

HEIGHT

#
'75% or minimum 500px'
USE_THIS_FONT =
#

USE_THIS_FONT

#
:dejavu_condensed_20

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(commandline_arguments = ARGV, run_already = true) ⇒ SoundEffects

#

initialize

#


63
64
65
66
67
68
69
70
71
72
73
# File 'lib/games_and_rpg_paradise/gui/gtk3/sound_effects/sound_effects.rb', line 63

def initialize(
    commandline_arguments = ARGV,
    run_already           = true
  )
  super(:vertical)
  reset
  set_commandline_arguments(
    commandline_arguments
  )
  run if run_already
end

Class Method Details

.run(i = ARGV) ⇒ Object

#

GamesAndRpgParadise::GUI::Gtk::SoundEffects.run

#


142
143
144
145
146
147
148
149
150
151
152
153
# File 'lib/games_and_rpg_paradise/gui/gtk3/sound_effects/sound_effects.rb', line 142

def self.run(
    i = ARGV
  )
  require 'gtk_paradise/run'
  _ = ::GamesAndRpgParadise::GUI::Gtk::SoundEffects.new(i)
  r = ::Gtk.run
  r << _
  r.favicon = '/home/x/data/images/AUDIO/AUDACITY.png'
  r.automatic_size_then_automatic_title
  r.enable_quick_exit
  r.top_left_then_run
end

Instance Method Details

#border_size?Boolean

#

border_size?

#

Returns:

  • (Boolean)


103
104
105
# File 'lib/games_and_rpg_paradise/gui/gtk3/sound_effects/sound_effects.rb', line 103

def border_size?
  0
end

#connect_skeletonObject

#

connect_skeleton (connect tag)

#


117
118
119
120
121
122
123
124
# File 'lib/games_and_rpg_paradise/gui/gtk3/sound_effects/sound_effects.rb', line 117

def connect_skeleton
  abort_on_exception
  header_bar = default_header_bar
  header_bar.padding =  2
  header_bar.spacing = 10
  header_bar.add_left(image(LOGO_IMAGE))
  minimal(header_bar)
end

#create_skeletonObject

#

create_skeleton (create tag, skeleton tag)

#


110
111
112
# File 'lib/games_and_rpg_paradise/gui/gtk3/sound_effects/sound_effects.rb', line 110

def create_skeleton
  # create_the_entries
end

#padding?Boolean

#

padding?

#

Returns:

  • (Boolean)


96
97
98
# File 'lib/games_and_rpg_paradise/gui/gtk3/sound_effects/sound_effects.rb', line 96

def padding?
  0
end

#resetObject

#

reset (reset tag)

#


78
79
80
81
82
83
84
85
86
87
88
89
90
91
# File 'lib/games_and_rpg_paradise/gui/gtk3/sound_effects/sound_effects.rb', line 78

def reset
  reset_the_internal_variables
  infer_the_namespace
  # ======================================================================= #
  # === @configuration
  # ======================================================================= #
  @configuration = [true, __dir__, namespace?]
  # ======================================================================= #
  # === Set the title, width, height and the font in use.
  # ======================================================================= #
  title_width_height_font(TITLE, WIDTH, HEIGHT, USE_THIS_FONT)
  use_gtk_paradise_project_css_file # or use use_project_css_file 
  infer_the_size_automatically
end

#runObject

#

run (run tag)

#


129
130
131
132
133
134
135
136
137
# File 'lib/games_and_rpg_paradise/gui/gtk3/sound_effects/sound_effects.rb', line 129

def run
  super()
  [
    STORM_AND_THUNDER
  ].each {|this_path_to_the_mp3_file|
    audio_button = ::Gtk::AudioButton.new(this_path_to_the_mp3_file)
    minimal(audio_button)
  }
end