Module: Nuklear::UI::TextAlign

Included in:
Button, Label, Menu, MenuItem, Selectable
Defined in:
lib/nuklear/ui/text_align.rb

Instance Method Summary collapse

Instance Method Details

#align_as_flags(align) ⇒ Object



4
5
6
7
8
9
10
11
# File 'lib/nuklear/ui/text_align.rb', line 4

def align_as_flags(align)
  case align
  when :left,   :west   then Nuklear::NK_TEXT_LEFT
  when :center, :middle then Nuklear::NK_TEXT_CENTERED
  when :right,  :east   then Nuklear::NK_TEXT_RIGHT
  else align
  end
end