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
syntax_j
mycard
Commits
99fda169
Commit
99fda169
authored
Jan 06, 2012
by
神楽坂玲奈
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
临时提交
parent
5a2f4348
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
127 additions
and
78 deletions
+127
-78
graphics/system/icon.gif
graphics/system/icon.gif
+0
-0
lib/iduel/game.rb
lib/iduel/game.rb
+38
-35
lib/main.rb
lib/main.rb
+1
-0
lib/nbx/event.rb
lib/nbx/event.rb
+3
-0
lib/nbx/game.rb
lib/nbx/game.rb
+68
-41
lib/nbx/user.rb
lib/nbx/user.rb
+5
-0
lib/scene.rb
lib/scene.rb
+1
-0
lib/scene_duel.rb
lib/scene_duel.rb
+1
-1
lib/widget_inputbox.rb
lib/widget_inputbox.rb
+1
-0
lib/window.rb
lib/window.rb
+1
-0
lib/window_field.rb
lib/window_field.rb
+6
-0
lib/window_userlist.rb
lib/window_userlist.rb
+2
-1
No files found.
graphics/system/icon.gif
View replaced file @
5a2f4348
View file @
99fda169
5.56 KB
|
W:
|
H:
5.48 KB
|
W:
|
H:
2-up
Swipe
Onion skin
lib/iduel/game.rb
View file @
99fda169
...
@@ -16,29 +16,7 @@ class Iduel < Game
...
@@ -16,29 +16,7 @@ class Iduel < Game
load
File
.
expand_path
(
'user.rb'
,
File
.
dirname
(
__FILE__
))
load
File
.
expand_path
(
'user.rb'
,
File
.
dirname
(
__FILE__
))
load
File
.
expand_path
(
'replay.rb'
,
File
.
dirname
(
__FILE__
))
load
File
.
expand_path
(
'replay.rb'
,
File
.
dirname
(
__FILE__
))
end
end
def
connect
require
'socket'
require
'open-uri'
begin
@conn
=
TCPSocket
.
new
(
Server
,
Port
)
#TODO: 阻塞优化,注意login。下面注释掉的两句实现connect无阻塞,但是login依然会阻塞所以只优化这里没有意义
#@conn = Socket.new(:INET, :STREAM)
@conn
.
set_encoding
"GBK"
,
"UTF-8"
,
:invalid
=>
:replace
,
:undef
=>
:replace
@recv
=
Thread
.
new
do
begin
#@conn.connect Socket.pack_sockaddr_in(Port, Server)
recv
@conn
.
gets
(
RS
)
while
@conn
rescue
=>
exception
Game_Event
.
push
Game_Event
::
Error
.
new
(
exception
.
class
.
to_s
,
exception
.
message
)
$log
.
error
[
exception
.
inspect
,
*
exception
.
backtrace
].
join
(
"
\n
"
)
ensure
self
.
exit
end
end
rescue
=>
exception
Game_Event
.
push
Game_Event
::
Error
.
new
(
"网络错误"
,
"连接服务器失败"
)
$log
.
error
[
exception
.
inspect
,
*
exception
.
backtrace
].
join
(
"
\n
"
)
end
end
def
rename
def
rename
##8|241019,测试改昵称,5b58559aaf8869282fe3cb9585ffa909¢
##8|241019,测试改昵称,5b58559aaf8869282fe3cb9585ffa909¢
#$N|iDuel系统,您的改名请求已经提交,重新登录后即可看到效果。¢
#$N|iDuel系统,您的改名请求已经提交,重新登录后即可看到效果。¢
...
@@ -61,6 +39,7 @@ class Iduel < Game
...
@@ -61,6 +39,7 @@ class Iduel < Game
send
(
5
,
@key
,
room
.
id
,
password
,
checknum
(
"WATCHROOMMSG"
,
"
#{
@session
}#{
room
.
id
}#{
password
}
"
))
send
(
5
,
@key
,
room
.
id
,
password
,
checknum
(
"WATCHROOMMSG"
,
"
#{
@session
}#{
room
.
id
}#{
password
}
"
))
end
end
def
leave
def
leave
return
unless
@room
if
@room
.
include?
@user
if
@room
.
include?
@user
send
(
10
,
@key
,
room
.
id
,
checknum
(
"QROOM"
,
@session
+
room
.
id
.
to_s
))
send
(
10
,
@key
,
room
.
id
,
checknum
(
"QROOM"
,
@session
+
room
.
id
.
to_s
))
else
else
...
@@ -81,13 +60,7 @@ class Iduel < Game
...
@@ -81,13 +60,7 @@ class Iduel < Game
end
end
def
send
(
head
,
*
args
)
return
unless
@conn
info
=
"#
#{
head
.
to_s
(
16
).
upcase
}
|
#{
args
.
join
(
','
)
}
"
+
RS
$log
.
info
"<<
#{
info
}
"
info
.
gsub!
(
"
\n
"
,
"
\r\n
"
)
(
@conn
.
write
info
)
rescue
Game_Event
.
push
Game_Event
::
Error
.
new
(
$!
.
class
.
to_s
,
$!
.
message
)
end
def
recv
(
info
)
def
recv
(
info
)
if
info
.
nil?
if
info
.
nil?
@conn
.
close
@conn
.
close
...
@@ -100,9 +73,7 @@ class Iduel < Game
...
@@ -100,9 +73,7 @@ class Iduel < Game
Game_Event
.
push
Game_Event
.
parse
info
Game_Event
.
push
Game_Event
.
parse
info
end
end
end
end
def
checknum
(
head
,
*
args
)
Digest
::
MD5
.
hexdigest
(
"[
#{
head
}
]_
#{
args
.
join
(
'_'
)
}
_SCNERO"
.
gsub
(
"
\n
"
,
"
\r\n
"
).
encode
(
"GBK"
))
end
def
qroom
(
room
)
def
qroom
(
room
)
send
(
10
,
@key
,
room
.
id
,
checknum
(
"QROOM"
,
@session
+
room
.
id
.
to_s
))
send
(
10
,
@key
,
room
.
id
,
checknum
(
"QROOM"
,
@session
+
room
.
id
.
to_s
))
end
end
...
@@ -110,6 +81,38 @@ class Iduel < Game
...
@@ -110,6 +81,38 @@ class Iduel < Game
send
(
4
,
@key
,
msg
,
checknum
(
"CHATP"
,
@session
))
send
(
4
,
@key
,
msg
,
checknum
(
"CHATP"
,
@session
))
#4|241019,test,2368c6b89b3e2eedb92e1b624a2a157c
#4|241019,test,2368c6b89b3e2eedb92e1b624a2a157c
end
end
private
def
connect
require
'socket'
require
'open-uri'
begin
@conn
=
TCPSocket
.
new
(
Server
,
Port
)
#TODO: 阻塞优化,注意login。下面注释掉的两句实现connect无阻塞,但是login依然会阻塞所以只优化这里没有意义
#@conn = Socket.new(:INET, :STREAM)
@conn
.
set_encoding
"GBK"
,
"UTF-8"
,
:invalid
=>
:replace
,
:undef
=>
:replace
@recv
=
Thread
.
new
do
begin
#@conn.connect Socket.pack_sockaddr_in(Port, Server)
recv
@conn
.
gets
(
RS
)
while
@conn
rescue
=>
exception
Game_Event
.
push
Game_Event
::
Error
.
new
(
exception
.
class
.
to_s
,
exception
.
message
)
$log
.
error
(
'iduel-connect-1'
)
{[
exception
.
inspect
,
*
exception
.
backtrace
].
join
(
"
\n
"
)}
ensure
self
.
exit
end
end
rescue
=>
exception
Game_Event
.
push
Game_Event
::
Error
.
new
(
"网络错误"
,
"连接服务器失败"
)
$log
.
error
(
'iduel-connect-2'
)
{[
exception
.
inspect
,
*
exception
.
backtrace
].
join
(
"
\n
"
)}
end
end
def
checknum
(
head
,
*
args
)
Digest
::
MD5
.
hexdigest
(
"[
#{
head
}
]_
#{
args
.
join
(
'_'
)
}
_SCNERO"
.
gsub
(
"
\n
"
,
"
\r\n
"
).
encode
(
"GBK"
))
end
def
send
(
head
,
*
args
)
return
unless
@conn
info
=
"#
#{
head
.
to_s
(
16
).
upcase
}
|
#{
args
.
join
(
','
)
}
"
+
RS
$log
.
info
"<<
#{
info
}
"
info
.
gsub!
(
"
\n
"
,
"
\r\n
"
)
(
@conn
.
write
info
)
rescue
Game_Event
.
push
Game_Event
::
Error
.
new
(
$!
.
class
.
to_s
,
$!
.
message
)
end
end
end
\ No newline at end of file
lib/main.rb
View file @
99fda169
...
@@ -48,6 +48,7 @@ begin
...
@@ -48,6 +48,7 @@ begin
rescue
Exception
=>
exception
rescue
Exception
=>
exception
exception
.
backtrace
.
each
{
|
backtrace
|
break
if
backtrace
=~
/^(.*)\.rb:\d+:in `.*'"$/
}
#由于脚本是从main.rb开始执行的,总会有个能匹配成功的文件
exception
.
backtrace
.
each
{
|
backtrace
|
break
if
backtrace
=~
/^(.*)\.rb:\d+:in `.*'"$/
}
#由于脚本是从main.rb开始执行的,总会有个能匹配成功的文件
$log
.
fatal
(
$1
){[
exception
.
inspect
,
*
exception
.
backtrace
].
join
(
"
\n
"
)}
$log
.
fatal
(
$1
){[
exception
.
inspect
,
*
exception
.
backtrace
].
join
(
"
\n
"
)}
$game
.
exit
if
$game
require_relative
'scene_error'
require_relative
'scene_error'
$scene
=
Scene_Error
.
new
$scene
=
Scene_Error
.
new
retry
retry
...
...
lib/nbx/event.rb
View file @
99fda169
...
@@ -71,6 +71,9 @@ class Game_Event
...
@@ -71,6 +71,9 @@ class Game_Event
end
end
end
end
class
PlayerLeave
class
PlayerLeave
def
self
.
parse
(
info
)
self
.
new
end
end
end
class
Action
class
Action
def
self
.
parse
(
info
)
def
self
.
parse
(
info
)
...
...
lib/nbx/game.rb
View file @
99fda169
...
@@ -9,25 +9,71 @@ class NBX < Game
...
@@ -9,25 +9,71 @@ class NBX < Game
require
'digest/md5'
require
'digest/md5'
load
File
.
expand_path
(
'action.rb'
,
File
.
dirname
(
__FILE__
))
load
File
.
expand_path
(
'action.rb'
,
File
.
dirname
(
__FILE__
))
load
File
.
expand_path
(
'event.rb'
,
File
.
dirname
(
__FILE__
))
load
File
.
expand_path
(
'event.rb'
,
File
.
dirname
(
__FILE__
))
load
File
.
expand_path
(
'user.rb'
,
File
.
dirname
(
__FILE__
))
end
end
def
login
(
username
)
connect
Game_Event
.
push
Game_Event
::
Login
.
new
(
User
.
new
(
'localhost'
,
username
))
if
@conn_hall
end
def
host
(
name
=
@user
.
name
)
@room
=
Room
.
new
(
@user
.
id
,
name
,
@user
)
Game_Event
.
push
Game_Event
::
Host
.
new
(
@room
)
send
(
nil
,
"NewRoom"
,
@room
.
player1
.
name
)
@conn_room_server
=
TCPServer
.
new
'0.0.0.0'
,
Port
#为了照顾NBX强制IPv4
@accept_room
=
Thread
.
new
{
Thread
.
start
(
@conn_room_server
.
accept
)
{
|
client
|
accept
(
client
)}
while
@conn_room_server
}
end
def
action
(
action
)
if
@room
.
player2
action
.
from_player
=
false
send
(
:room
,
action
.
escape
)
action
.
from_player
=
true
end
end
def
refresh
send
(
nil
,
'NewUser'
,
@user
.
name
,
1
)
end
def
join
(
host
,
port
=
Port
)
Thread
.
new
do
begin
connect_loop
TCPSocket
.
new
(
host
,
port
)
rescue
Game_Event
.
push
Game_Event
::
Error
.
new
(
"网络错误"
,
"连接服务器失败"
)
$log
.
error
[
exception
.
inspect
,
*
exception
.
backtrace
].
join
(
"
\n
"
)
end
end
end
def
exit
send
(
:room
,
"关闭游戏王NetBattleX 2.7.2▊▊▊730462"
)
rescue
nil
@recv_hall
.
kill
rescue
nil
@conn_hall
.
close
rescue
nil
@conn_hall
=
nil
@conn_room
.
close
rescue
nil
@conn_room
=
nil
@conn_room_server
.
close
rescue
nil
@conn_room_server
=
nil
end
def
exit_room
end
private
def
send
(
user
,
head
,
*
args
)
def
send
(
user
,
head
,
*
args
)
case
user
case
user
when
User
#大厅里给特定用户的回复
when
User
#大厅里给特定用户的回复
@conn_hall
.
send
(
"
#{
head
}
|
#{
args
.
join
(
','
)
}
"
,
0
,
user
.
host
,
Port
)
@conn_hall
.
send
(
"
#{
head
}
|
#{
args
.
join
(
','
)
}
"
,
0
,
user
.
host
,
Port
)
if
@conn_hall
when
nil
#大厅里的广播
when
nil
#大厅里的广播
@conn_hall
.
send
(
"
#{
head
}
|
#{
args
.
join
(
','
)
}
"
,
0
,
'<broadcast>'
,
Port
)
@conn_hall
.
send
(
"
#{
head
}
|
#{
args
.
join
(
','
)
}
"
,
0
,
'<broadcast>'
,
Port
)
if
@conn_hall
when
:room
#房间里,发给对手和观战者
when
:room
#房间里,发给对手和观战者
@conn_room
.
write
(
head
.
gsub
(
"
\n
"
,
"
\r\n
"
)
+
RS
)
@conn_room
.
write
(
head
.
gsub
(
"
\n
"
,
"
\r\n
"
)
+
RS
)
if
@conn_room
when
:watchers
#房间里,发给观战者
when
:watchers
#房间里,发给观战者
end
end
end
end
def
login
(
username
)
connect
Game_Event
.
push
Game_Event
::
Login
.
new
(
User
.
new
(
'localhost'
,
username
))
if
@conn_hall
end
def
connect
def
connect
require
'socket'
require
'socket'
require
'open-uri'
require
'open-uri'
...
@@ -35,26 +81,20 @@ class NBX < Game
...
@@ -35,26 +81,20 @@ class NBX < Game
@conn_hall
=
UDPSocket
.
new
@conn_hall
=
UDPSocket
.
new
@conn_hall
.
setsockopt
(
Socket
::
SOL_SOCKET
,
Socket
::
SO_BROADCAST
,
true
)
@conn_hall
.
setsockopt
(
Socket
::
SOL_SOCKET
,
Socket
::
SO_BROADCAST
,
true
)
@conn_hall
.
bind
(
'0.0.0.0'
,
Port
)
@conn_hall
.
bind
(
'0.0.0.0'
,
Port
)
@recv_hall
=
Thread
.
new
{
recv
*
@conn_hall
.
recvfrom
(
1024
)
while
@conn_hall
}
Thread
.
abort_on_exception
=
true
Thread
.
abort_on_exception
=
true
rescue
=>
exception
@recv_hall
=
Thread
.
new
do
@conn_hall
=
nil
begin
recv
*
@conn_hall
.
recvfrom
(
1024
)
while
@conn_hall
rescue
Exception
=>
exception
self
.
exit
Game_Event
.
push
Game_Event
::
Error
.
new
(
exception
.
class
.
to_s
,
exception
.
message
)
$log
.
error
(
'nbx-connect-1'
)
{[
exception
.
inspect
,
*
exception
.
backtrace
].
join
(
"
\n
"
)}
end
end
rescue
Exception
=>
exception
self
.
exit
Game_Event
.
push
Game_Event
::
Error
.
new
(
exception
.
class
.
to_s
,
exception
.
message
)
Game_Event
.
push
Game_Event
::
Error
.
new
(
exception
.
class
.
to_s
,
exception
.
message
)
$log
.
error
[
exception
.
inspect
,
*
exception
.
backtrace
].
join
(
"
\n
"
)
$log
.
error
(
'nbx-connect-2'
)
{[
exception
.
inspect
,
*
exception
.
backtrace
].
join
(
"
\n
"
)}
end
end
def
host
(
name
=
@user
.
name
)
@room
=
Room
.
new
(
@user
.
id
,
name
,
@user
)
Game_Event
.
push
Game_Event
::
Host
.
new
(
@room
)
send
(
nil
,
"NewRoom"
,
@room
.
player1
.
name
)
@conn_room_server
=
TCPServer
.
new
'0.0.0.0'
,
Port
#为了照顾NBX强制IPv4
@accept_room
=
Thread
.
new
{
Thread
.
start
(
@conn_room_server
.
accept
)
{
|
client
|
accept
(
client
)}
while
@conn_room_server
}
end
def
action
(
action
)
if
@room
.
player2
action
.
from_player
=
false
send
(
:room
,
action
.
escape
)
action
.
from_player
=
true
end
end
end
end
def
accept
(
client
)
def
accept
(
client
)
...
@@ -70,19 +110,6 @@ class NBX < Game
...
@@ -70,19 +110,6 @@ class NBX < Game
$log
.
info
">>
#{
info
}
"
$log
.
info
">>
#{
info
}
"
Game_Event
.
push
Game_Event
.
parse
info
Game_Event
.
push
Game_Event
.
parse
info
end
end
def
refresh
send
(
nil
,
'NewUser'
,
@user
.
name
,
1
)
end
def
join
(
host
,
port
=
Port
)
Thread
.
new
do
begin
connect_loop
TCPSocket
.
new
(
host
,
port
)
rescue
Game_Event
.
push
Game_Event
::
Error
.
new
(
"网络错误"
,
"连接服务器失败"
)
$log
.
error
[
exception
.
inspect
,
*
exception
.
backtrace
].
join
(
"
\n
"
)
end
end
end
def
connect_loop
(
conn
)
def
connect_loop
(
conn
)
@conn_room
=
conn
@conn_room
=
conn
begin
begin
...
@@ -92,13 +119,13 @@ class NBX < Game
...
@@ -92,13 +119,13 @@ class NBX < Game
send
(
:room
,
"[VerInf]|
#{
Version
}
"
)
send
(
:room
,
"[VerInf]|
#{
Version
}
"
)
send
(
:room
,
"▓SetName:
#{
@user
.
name
}
▓"
)
send
(
:room
,
"▓SetName:
#{
@user
.
name
}
▓"
)
send
(
:room
,
"[☆]开启 游戏王NetBattleX Version 2.7.0
\r\n
[10年3月1日禁卡表]
\r\n
▊▊▊E8CB04"
)
send
(
:room
,
"[☆]开启 游戏王NetBattleX Version 2.7.0
\r\n
[10年3月1日禁卡表]
\r\n
▊▊▊E8CB04"
)
@room
.
player2
=
User
.
new
(
host
,
"对手"
)
@room
.
player2
=
User
.
new
(
conn
.
addr
[
2
]
,
"对手"
)
while
info
=
@conn_room
.
gets
(
RS
)
while
info
=
@conn_room
.
gets
(
RS
)
recv_room
(
info
)
recv_room
(
info
)
end
end
rescue
Exception
=>
exception
rescue
Exception
=>
exception
Game_Event
.
push
Game_Event
::
Error
.
new
(
exception
.
class
.
to_s
,
exception
.
message
)
Game_Event
.
push
Game_Event
::
Error
.
new
(
exception
.
class
.
to_s
,
exception
.
message
)
$log
.
error
[
exception
.
inspect
,
*
exception
.
backtrace
].
join
(
"
\n
"
)
$log
.
error
(
'nbx-connect-loop'
)
{
[
exception
.
inspect
,
*
exception
.
backtrace
].
join
(
"
\n
"
)}
ensure
ensure
@conn_room
.
close
@conn_room
.
close
@conn_room
=
nil
@conn_room
=
nil
...
...
lib/nbx/user.rb
0 → 100644
View file @
99fda169
class
User
def
avatar
(
size
=
:small
)
Surface
.
load
(
"
#{
ENV
[
'TEMP'
]
}
/
#{
ENV
[
'USERNAME'
]
}
.bmp"
)
rescue
Surface
.
new
(
SWSURFACE
,
1
,
1
,
32
,
0
,
0
,
0
,
0
)
end
end
lib/scene.rb
View file @
99fda169
...
@@ -103,6 +103,7 @@ class Scene
...
@@ -103,6 +103,7 @@ class Scene
def
handle_game
(
event
)
def
handle_game
(
event
)
case
event
case
event
when
Game_Event
::
Error
when
Game_Event
::
Error
$game
.
exit
if
$game
Widget_Msgbox
.
new
(
event
.
title
,
event
.
message
,
:ok
=>
"确定"
){
$scene
=
Scene_Title
.
new
if
event
.
fatal
}
Widget_Msgbox
.
new
(
event
.
title
,
event
.
message
,
:ok
=>
"确定"
){
$scene
=
Scene_Title
.
new
if
event
.
fatal
}
else
else
$log
.
debug
event
$log
.
debug
event
...
...
lib/scene_duel.rb
View file @
99fda169
...
@@ -40,7 +40,7 @@ class Scene_Duel < Scene
...
@@ -40,7 +40,7 @@ class Scene_Duel < Scene
@opponent_lp_window
=
Window_LP
.
new
(
360
,
0
,
@room
.
player2
,
false
)
@opponent_lp_window
=
Window_LP
.
new
(
360
,
0
,
@room
.
player2
,
false
)
@player_field_window
=
Window_Field
.
new
(
4
,
398
,
$game
.
player_field
,
true
)
@player_field_window
=
Window_Field
.
new
(
4
,
398
,
$game
.
player_field
,
true
)
@opponent_field_window
=
Window_Field
.
new
(
4
,
60
,
$game
.
opponent_field
,
false
)
@opponent_field_window
=
Window_Field
.
new
(
4
,
60
,
$game
.
opponent_field
,
false
)
@opponent_field_window
.
angle
=
180
#
@opponent_field_window.angle=180
@phases_window
=
Window_Phases
.
new
(
122
,
356
)
@phases_window
=
Window_Phases
.
new
(
122
,
356
)
@fieldback_window
=
Window_FieldBack
.
new
(
130
,
174
)
@fieldback_window
=
Window_FieldBack
.
new
(
130
,
174
)
...
...
lib/widget_inputbox.rb
View file @
99fda169
#encoding: UTF-8
class
Widget_InputBox
<
Window
class
Widget_InputBox
<
Window
attr_reader
:value
,
:proc
attr_reader
:value
,
:proc
attr_accessor
:type
attr_accessor
:type
...
...
lib/window.rb
View file @
99fda169
class
Window
class
Window
WLH
=
24
WLH
=
24
attr_accessor
:x
,
:y
,
:width
,
:height
,
:z
,
:contents
,
:angle
,
:visible
,
:viewport
attr_accessor
:x
,
:y
,
:width
,
:height
,
:z
,
:contents
,
:angle
,
:visible
,
:viewport
alias
visible?
visible
def
initialize
(
x
,
y
,
width
,
height
,
z
=
200
)
def
initialize
(
x
,
y
,
width
,
height
,
z
=
200
)
@x
=
x
@x
=
x
@y
=
y
@y
=
y
...
...
lib/window_field.rb
View file @
99fda169
...
@@ -382,4 +382,10 @@ class Window_Field < Window
...
@@ -382,4 +382,10 @@ class Window_Field < Window
refresh
refresh
mousemoved
(
Mouse
.
state
[
0
],
Mouse
.
state
[
1
])
mousemoved
(
Mouse
.
state
[
0
],
Mouse
.
state
[
1
])
end
end
def
clear
(
x
=
0
,
y
=
0
,
width
=
@width
,
height
=
@height
)
super
if
$scene
.
fieldback_window
.
visible?
Surface
.
blit
(
$scene
.
fieldback_window
.
contents
,
@x
+
x
-
$scene
.
fieldback_window
.
x
,
@y
+
y
-
$scene
.
fieldback_window
.
y
,
width
,
height
,
@contents
,
x
,
y
)
end
end
end
end
\ No newline at end of file
lib/window_userlist.rb
View file @
99fda169
...
@@ -41,7 +41,8 @@ class Window_UserList < Window_List
...
@@ -41,7 +41,8 @@ class Window_UserList < Window_List
#end
#end
def
clicked
def
clicked
#$scene.refresh_rect(*item_rect(@index)){draw_item(@index, 2)} if @index
#$scene.refresh_rect(*item_rect(@index)){draw_item(@index, 2)} if @index
@userwindow
=
Window_User
.
new
(
100
,
100
,
@list
[
@index
])
return
unless
@index
@userwindow
=
Window_User
.
new
(
100
,
100
,
@list
[
@index
])
end
end
def
mousemoved
(
x
,
y
)
def
mousemoved
(
x
,
y
)
return
unless
include
?(
x
,
y
)
return
unless
include
?(
x
,
y
)
...
...
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