Class: ExampleApp::FutureLabel

Inherits:
Zif::UI::Label show all
Includes:
Zif::Serializable
Defined in:
app/ui/labels/future_label.rb

Overview

Settings for the Kenney Future font

Constant Summary collapse

FONT =
'sprites/kenney-uipack-space/Fonts/kenvector_future.ttf'.freeze
COLOR =
{
  r: 51,
  g: 51,
  b: 51,
  a: 255
}.freeze

Constants inherited from Zif::UI::Label

Zif::UI::Label::ALIGNMENT, Zif::UI::Label::BLENDMODE, Zif::UI::Label::MAGIC_NEWLINE_DELIMITER, Zif::UI::Label::VERTICAL_ALIGNMENT

Instance Attribute Summary

Attributes inherited from Zif::UI::Label

#a, #anchor_x, #anchor_y, #b, #ellipsis, #font, #full_text, #g, #max_width, #min_height, #min_width, #r, #size, #size_px, #text, #x, #y

Attributes included from Zif::Actions::Actionable

#actions, #dirty

Instance Method Summary collapse

Methods included from Zif::Serializable

#exclude_from_serialize, #inspect, #serialize, #to_s

Methods inherited from Zif::UI::Label

#align, #align=, #blend, #blend=, #color, #color=, #full_size_rect, #primitive_marker, #recalculate_minimums, #recenter_in, #rect, #retruncate, #right, #split_labels, #truncate, #vertical_align, #vertical_align=, #wrap

Methods included from Zif::Actions::Actionable

#bounce_forever_around, #delayed_action, #fade_in, #fade_out, #fade_out_and_in_forever, #new_action, #perform_actions, #run_action, #running_actions?, #stop_action

Constructor Details

#initialize(text, size: -1,, alignment: :left, r: COLOR[:r], g: COLOR[:g], b: COLOR[:b], a: COLOR[:a], blend: :alpha) ⇒ FutureLabel

Returns a new instance of FutureLabel.



15
16
17
18
19
20
21
22
23
24
25
26
# File 'app/ui/labels/future_label.rb', line 15

def initialize(
  text,
  size: -1,
  alignment: :left,
  r: COLOR[:r],
  g: COLOR[:g],
  b: COLOR[:b],
  a: COLOR[:a],
  blend: :alpha
)
  super(text, size: size, alignment: alignment, font: FONT, r: r, g: g, b: b, a: a, blend: blend)
end