Sha256: 36301de4f71bbdfa1b14e3a037557e4d8d3f395947dc88dca1a8510bef4be4d8
Contents?: true
Size: 794 Bytes
Versions: 51
Compression:
Stored size: 794 Bytes
Contents
require_relative '../model/playing_card' class KlondikeSolitaire module View class EmptyPlayingCard include Glimmer::UI::CustomShape options :card_x, :card_y, :suit before_body do self.card_x ||= 0 self.card_y ||= 0 end body { rectangle(card_x, card_y, PLAYING_CARD_WIDTH - 1, PLAYING_CARD_HEIGHT - 1, 15, 15) { foreground :gray if suit text { string Model::PlayingCard.suit_text(suit) font height: 20 x :default y :default is_transparent true foreground Model::PlayingCard::BLACK_SUITS.include?(suit) ? :black : :red } end } } end end end
Version data entries
51 entries across 51 versions & 1 rubygems