samples/07_advanced_rendering/03_render_target_viewports/app/main.rb
# The mouse and keyboard focus are set to "yes" when the Dragonruby window is the active window.
The mouse and keyboard focus are set to "yes" when the Dragonruby window is the active window.
The mouse and keyboard focus are set to " yes " when the Dragonruby window is the active window .
def window_state_demo
    m = $gtk.args.inputs.mouse.has_focus ? 'Y' : 'N' 
    k = $gtk.args.inputs.keyboard.has_focus ? 'Y' : 'N'
    outputs.labels << [460, 20, "mouse focus: #{m}   keyboard focus: #{k}", small_font]
  end
def window_state_demo m = $gtk . args . inputs . mouse . has_focus ? 'Y' : 'N' k = $gtk . args . inputs . keyboard . has_focus ? 'Y' : 'N' outputs . labels << [ 460 , 20 , "mouse focus: #{m}   keyboard focus: #{k}" , small_font ] end
The mouse and keyboard focus are set to "yes" when the Dragonruby window is the active window.
The mouse and keyboard focus are set to " yes " when the Dragonruby window is the active window .
# ternary operator (similar to if statement)