class SpecialPlug
Public Instance Methods
layout()
click to toggle source
# File Views/Special/PlugEdit.rb, line 4 def layout @order = 150 set_data_class :Plugs @update = true gui_hbox do gui_vbox :nogroup do vtlp_list :plugs, :center_name show_button :delete, :new end gui_vbox :nogroup do show_block :default show_arg :internal_id, :width => 150 show_button :save end gui_vbox :nogroup do show_text :stats, height: 300, width: 250 show_int_ro :operator show_int_ro :credit_left show_int :recharge_credit show_str :cmd_str show_button :recharge, :charge, :cmd end end end
plugs(data)
click to toggle source
# File Views/Special/PlugEdit.rb, line 41 def plugs(data) Plugs.match_by_plug_id(data._plugs.first) end
rpc_update(session)
click to toggle source
# File Views/Special/PlugEdit.rb, line 30 def rpc_update(session) op, cl = if $MobileControl [$MobileControl.operator_name, $MobileControl.operator_missing? ? -1 : $MobileControl.operator.credit_left] else ['None', -1] end reply(:update, operator: op, credit_left: cl) end