Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #encoding: utf-8
- # KURS RUBY & SHOES: https://www.youtube.com/watch?v=kIrWFPyZMwI&index=1&list=PLcbGBiker9IJwokPtnPaz_SwovRfVtvWr
- Shoes.app title: "Edit line i edit box", width:800, height:600, resizable: false do
- def show_info(x)
- alert x
- end
- def hide_login
- @login.text = "Hacker" if @login != nil
- @password.text = "Sekret" if @password != nil
- @description.text = "Hacker" if @description != nil
- end
- def main_screen
- stack {
- title "Edytowalne pola"
- caption "Podaj login"
- @login = edit_line
- @password = edit_line
- @password.style(secret: true)
- @description = edit_box
- button("Wyświetl komunikat") { show_info(@login.text+"\n"+@password.text+"\n"+@description.text) }
- button("Ukryj login") { hide_login }
- }
- end
- main_screen
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement