Commit eaa75dde authored by 神楽坂玲奈's avatar 神楽坂玲奈

ygocore

parent 55e3947e
...@@ -34,4 +34,7 @@ class User ...@@ -34,4 +34,7 @@ class User
def color def color
[0,0,0] [0,0,0]
end end
def space
end
end end
\ No newline at end of file
...@@ -75,6 +75,7 @@ class Widget_ScrollBar < Window ...@@ -75,6 +75,7 @@ class Widget_ScrollBar < Window
when :down when :down
scroll_down scroll_down
when :scroll when :scroll
return if @scroll_max.zero?
y = (@height-40-24)*@scroll/(@scroll_max) y = (@height-40-24)*@scroll/(@scroll_max)
case Mouse.state[1] - @y - 20 case Mouse.state[1] - @y - 20
when 0...y when 0...y
......
...@@ -48,13 +48,14 @@ class Ygocore < Game ...@@ -48,13 +48,14 @@ class Ygocore < Game
Dir.chdir(File.dirname($config['ygocore']['path'])) do Dir.chdir(File.dirname($config['ygocore']['path'])) do
system_conf = {} system_conf = {}
IO.readlines('system.conf').each do |line| IO.readlines('system.conf').each do |line|
line.force_encoding "UTF-8"
next if line[0,1] == '#' next if line[0,1] == '#'
field, contents = line.chomp.split(' = ',2) field, contents = line.chomp.split(' = ',2)
system_conf[field] = contents system_conf[field] = contents
end
system_conf['nickname'] = "#{@user.name}#{"$" unless @password.empty?}#{@password}" system_conf['nickname'] = "#{@user.name}#{"$" unless @password.empty?}#{@password}"
system_conf['lastip'] = Server system_conf['lastip'] = Server
system_conf['lastport'] = Port.to_s system_conf['lastport'] = Port.to_s
end
open('system.conf', 'w') {|file|file.write system_conf.collect{|key,value|"#{key} = #{value}"}.join("\n")} open('system.conf', 'w') {|file|file.write system_conf.collect{|key,value|"#{key} = #{value}"}.join("\n")}
#运行ygocore #运行ygocore
...@@ -80,7 +81,7 @@ class Ygocore < Game ...@@ -80,7 +81,7 @@ class Ygocore < Game
#操作ygocore进入主机 #操作ygocore进入主机
@@SendMessage.call(hwnd, WM_LBUTTONDOWN, 0, MAKELPARAM(507,242)) @@SendMessage.call(hwnd, WM_LBUTTONDOWN, 0, MAKELPARAM(507,242))
@@SendMessage.call(hwnd, WM_LBUTTONUP, 0, MAKELPARAM(507,242)) @@SendMessage.call(hwnd, WM_LBUTTONUP, 0, MAKELPARAM(507,242))
sleep 0.2 sleep 0.3
require 'win32/clipboard' require 'win32/clipboard'
Win32::Clipboard.set_data(room.name.encode("GBK").force_encoding("UTF-8")) Win32::Clipboard.set_data(room.name.encode("GBK").force_encoding("UTF-8"))
@@SetForegroundWindow.call(hwnd) @@SetForegroundWindow.call(hwnd)
......
# To change this template, choose Tools | Templates #encoding: UTF-8
# and open the template in the editor.
class User class User
def initialize(id, name = "", certified = true) def initialize(id, name = "", certified = true)
@id = id @id = id
...@@ -15,4 +13,7 @@ class User ...@@ -15,4 +13,7 @@ class User
def color def color
@certified ? [0,0,255] : [128,128,128] @certified ? [0,0,255] : [128,128,128]
end end
def space
Widget_Msgbox.new("查看资料", "ygocore没有这个功能", :ok => "确定")
end
end end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment