Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
M
mycard
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
xiaoye
mycard
Commits
eaa75dde
Commit
eaa75dde
authored
Mar 07, 2012
by
神楽坂玲奈
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ygocore
parent
55e3947e
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
7 deletions
+13
-7
lib/user.rb
lib/user.rb
+3
-0
lib/widget_scrollbar.rb
lib/widget_scrollbar.rb
+1
-0
lib/ygocore/game.rb
lib/ygocore/game.rb
+5
-4
lib/ygocore/user.rb
lib/ygocore/user.rb
+4
-3
No files found.
lib/user.rb
View file @
eaa75dde
...
...
@@ -34,4 +34,7 @@ class User
def
color
[
0
,
0
,
0
]
end
def
space
end
end
\ No newline at end of file
lib/widget_scrollbar.rb
View file @
eaa75dde
...
...
@@ -75,6 +75,7 @@ class Widget_ScrollBar < Window
when
:down
scroll_down
when
:scroll
return
if
@scroll_max
.
zero?
y
=
(
@height
-
40
-
24
)
*
@scroll
/
(
@scroll_max
)
case
Mouse
.
state
[
1
]
-
@y
-
20
when
0
...
y
...
...
lib/ygocore/game.rb
View file @
eaa75dde
...
...
@@ -48,13 +48,14 @@ class Ygocore < Game
Dir
.
chdir
(
File
.
dirname
(
$config
[
'ygocore'
][
'path'
]))
do
system_conf
=
{}
IO
.
readlines
(
'system.conf'
).
each
do
|
line
|
line
.
force_encoding
"UTF-8"
next
if
line
[
0
,
1
]
==
'#'
field
,
contents
=
line
.
chomp
.
split
(
' = '
,
2
)
system_conf
[
field
]
=
contents
system_conf
[
'nickname'
]
=
"
#{
@user
.
name
}#{
"$"
unless
@password
.
empty?
}#{
@password
}
"
system_conf
[
'lastip'
]
=
Server
system_conf
[
'lastport'
]
=
Port
.
to_s
end
system_conf
[
'nickname'
]
=
"
#{
@user
.
name
}#{
"$"
unless
@password
.
empty?
}#{
@password
}
"
system_conf
[
'lastip'
]
=
Server
system_conf
[
'lastport'
]
=
Port
.
to_s
open
(
'system.conf'
,
'w'
)
{
|
file
|
file
.
write
system_conf
.
collect
{
|
key
,
value
|
"
#{
key
}
=
#{
value
}
"
}.
join
(
"
\n
"
)}
#运行ygocore
...
...
@@ -80,7 +81,7 @@ class Ygocore < Game
#操作ygocore进入主机
@@SendMessage
.
call
(
hwnd
,
WM_LBUTTONDOWN
,
0
,
MAKELPARAM
(
507
,
242
))
@@SendMessage
.
call
(
hwnd
,
WM_LBUTTONUP
,
0
,
MAKELPARAM
(
507
,
242
))
sleep
0.
2
sleep
0.
3
require
'win32/clipboard'
Win32
::
Clipboard
.
set_data
(
room
.
name
.
encode
(
"GBK"
).
force_encoding
(
"UTF-8"
))
@@SetForegroundWindow
.
call
(
hwnd
)
...
...
lib/ygocore/user.rb
View file @
eaa75dde
# To change this template, choose Tools | Templates
# and open the template in the editor.
#encoding: UTF-8
class
User
def
initialize
(
id
,
name
=
""
,
certified
=
true
)
@id
=
id
...
...
@@ -15,4 +13,7 @@ class User
def
color
@certified
?
[
0
,
0
,
255
]
:
[
128
,
128
,
128
]
end
def
space
Widget_Msgbox
.
new
(
"查看资料"
,
"ygocore没有这个功能"
,
:ok
=>
"确定"
)
end
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment