Sha256: f1f63ae4b6082cd33d373198316bebabc760e9717a0e25786ce4e54822025ed2

Contents?: true

Size: 344 Bytes

Versions: 5

Compression:

Stored size: 344 Bytes

Contents

module IconLoader
	IconBasePath = File.expand_path(File.join(File.dirname(__FILE__), "..", "icons"))

	def get_icon(name, type = "png")
		icon = File.join(IconBasePath, name)
		case name[-3..-1].downcase
		when "png"
			bitmap_type = BITMAP_TYPE_PNG
		else
			bitmap_type = BITMAP_TYPE_GIF
		end

		Wx::Bitmap.new(icon, bitmap_type)
	end

end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
tekkub-fugit-0.0.0 lib/fugit/icon_loader.rb
tekkub-fugit-0.0.1 lib/fugit/icon_loader.rb
tekkub-fugit-0.0.2 lib/fugit/icon_loader.rb
tekkub-fugit-0.0.3 lib/fugit/icon_loader.rb
tekkub-fugit-0.0.4 lib/fugit/icon_loader.rb