Sha256: f161e3f5f92a495cd3894e642c37a31dd5a3e429b18b060d9a3955f97ef17d22

Contents?: true

Size: 941 Bytes

Versions: 35

Compression:

Stored size: 941 Bytes

Contents

# frozen_string_literal: true

require 'glimmer-dsl-libui'

include Glimmer

window('Login') {
  margined true
  
  vertical_box {
    form {
      @username_entry = entry {
        label 'Username:'
      }
      
      @password_entry = password_entry {
        label 'Password:'
      }
    }
    
    horizontal_box {
      @login_button = button('Login') {
        on_clicked do
          @username_entry.enabled = false
          @password_entry.enabled = false
          @login_button.enabled = false
          @logout_button.enabled = true
        end
      }
      
      @logout_button = button('Logout') {
        enabled false
        
        on_clicked do
          @username_entry.text = ''
          @password_entry.text = ''
          @username_entry.enabled = true
          @password_entry.enabled = true
          @login_button.enabled = true
          @logout_button.enabled = false
        end
      }
    }
  }
}.show

Version data entries

35 entries across 35 versions & 1 rubygems

Version Path
glimmer-dsl-libui-0.4.2 examples/login.rb
glimmer-dsl-libui-0.4.1 examples/login.rb
glimmer-dsl-libui-0.4.0 examples/login.rb
glimmer-dsl-libui-0.3.5 examples/login.rb
glimmer-dsl-libui-0.3.4 examples/login.rb
glimmer-dsl-libui-0.3.3 examples/login.rb
glimmer-dsl-libui-0.3.2 examples/login.rb
glimmer-dsl-libui-0.3.1 examples/login.rb
glimmer-dsl-libui-0.3.0 examples/login.rb
glimmer-dsl-libui-0.2.24 examples/login.rb
glimmer-dsl-libui-0.2.23 examples/login.rb
glimmer-dsl-libui-0.2.22 examples/login.rb
glimmer-dsl-libui-0.2.21 examples/login.rb
glimmer-dsl-libui-0.2.20 examples/login.rb
glimmer-dsl-libui-0.2.19 examples/login.rb
glimmer-dsl-libui-0.2.18 examples/login.rb
glimmer-dsl-libui-0.2.17 examples/login.rb
glimmer-dsl-libui-0.2.16 examples/login.rb
glimmer-dsl-libui-0.2.15 examples/login.rb
glimmer-dsl-libui-0.2.14 examples/login.rb