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
0fd0f358
Commit
0fd0f358
authored
Aug 21, 2013
by
神楽坂玲奈
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
stat
parent
6c384388
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
25 additions
and
6 deletions
+25
-6
lib/scene_lobby.rb
lib/scene_lobby.rb
+2
-0
lib/window_lobbybuttons.rb
lib/window_lobbybuttons.rb
+2
-2
lib/window_userinfo.rb
lib/window_userinfo.rb
+20
-3
locales/zh.yml
locales/zh.yml
+1
-1
No files found.
lib/scene_lobby.rb
View file @
0fd0f358
...
@@ -67,12 +67,14 @@ class Scene_Lobby < Scene
...
@@ -67,12 +67,14 @@ class Scene_Lobby < Scene
case
event
case
event
when
Game_Event
::
AllUsers
when
Game_Event
::
AllUsers
@userlist
.
items
=
$game
.
users
@userlist
.
items
=
$game
.
users
@userinfo
.
users
=
$game
.
users
.
size
when
Game_Event
::
AllRooms
,
Game_Event
::
AllServers
when
Game_Event
::
AllRooms
,
Game_Event
::
AllServers
@roomlist
.
items
=
$game
.
rooms
.
find_all
{
|
room
|
@roomlist
.
items
=
$game
.
rooms
.
find_all
{
|
room
|
$game
.
filter
[
:servers
].
include?
(
room
.
server
)
and
$game
.
filter
[
:servers
].
include?
(
room
.
server
)
and
$game
.
filter
[
:waiting_only
]
?
(
room
.
status
==
:
wait
)
:
true
and
$game
.
filter
[
:waiting_only
]
?
(
room
.
status
==
:
wait
)
:
true
and
$game
.
filter
[
:normal_only
]
?
(
!
room
.
tag?
&&
(
room
.
ot
==
0
)
&&
(
room
.
lp
=
8000
))
:
true
$game
.
filter
[
:normal_only
]
?
(
!
room
.
tag?
&&
(
room
.
ot
==
0
)
&&
(
room
.
lp
=
8000
))
:
true
}
}
@userinfo
.
rooms
=
$game
.
rooms
.
size
when
Game_Event
::
Join
when
Game_Event
::
Join
join
(
event
.
room
)
join
(
event
.
room
)
when
Game_Event
::
Watch
when
Game_Event
::
Watch
...
...
lib/window_lobbybuttons.rb
View file @
0fd0f358
require_relative
'window_host'
require_relative
'window_host'
class
Window_LobbyButtons
<
Window_List
class
Window_LobbyButtons
<
Window_List
def
initialize
(
x
,
y
)
def
initialize
(
x
,
y
)
@items
=
[
I18n
.
t
(
'lobby.f
aq
'
),
I18n
.
t
(
'lobby.filter'
),
I18n
.
t
(
'lobby.editdeck'
),
I18n
.
t
(
'lobby.newroom'
),
I18n
.
t
(
'lobby.match'
)]
@items
=
[
I18n
.
t
(
'lobby.f
orum
'
),
I18n
.
t
(
'lobby.filter'
),
I18n
.
t
(
'lobby.editdeck'
),
I18n
.
t
(
'lobby.newroom'
),
I18n
.
t
(
'lobby.match'
)]
@button
=
Surface
.
load
(
"graphics/lobby/button.png"
)
@button
=
Surface
.
load
(
"graphics/lobby/button.png"
)
super
(
x
,
y
,
@items
.
size
*
@button
.
w
/
3
+
@items
.
size
*
4
,
30
)
super
(
x
,
y
,
@items
.
size
*
@button
.
w
/
3
+
@items
.
size
*
4
,
30
)
@font
=
TTF
.
open
(
Font
,
15
)
@font
=
TTF
.
open
(
Font
,
15
)
...
@@ -34,7 +34,7 @@ class Window_LobbyButtons < Window_List
...
@@ -34,7 +34,7 @@ class Window_LobbyButtons < Window_List
case
@index
case
@index
when
0
#常见问题
when
0
#常见问题
require_relative
'dialog'
require_relative
'dialog'
Dialog
.
web
"http
s://my-card.in/login?user[name]=
#{
CGI
.
escape
$game
.
user
.
name
}
&user[password]=
#{
CGI
.
escape
$game
.
password
}
&continue=/topics/1453
"
Dialog
.
web
"http
://forum.my-card.in/
"
when
1
#房间筛选
when
1
#房间筛选
if
@filter_window
and
!
@filter_window
.
destroyed?
if
@filter_window
and
!
@filter_window
.
destroyed?
@filter_window
.
destroy
@filter_window
.
destroy
...
...
lib/window_userinfo.rb
View file @
0fd0f358
...
@@ -13,6 +13,10 @@ class Window_UserInfo < Window
...
@@ -13,6 +13,10 @@ class Window_UserInfo < Window
@user
=
user
@user
=
user
@background
=
Surface
.
load
(
"graphics/lobby/userinfo.png"
).
display_format
@background
=
Surface
.
load
(
"graphics/lobby/userinfo.png"
).
display_format
refresh
refresh
require
'open-uri'
Thread
.
new
{
open
(
'https://my-card.in/match_count'
){
|
f
|
self
.
match
=
f
.
read
.
to_i
}
}
end
end
def
refresh
def
refresh
...
@@ -24,9 +28,22 @@ class Window_UserInfo < Window
...
@@ -24,9 +28,22 @@ class Window_UserInfo < Window
end
end
@font
.
draw_blended_utf8
(
@contents
,
@user
.
name
,
160
,
12
,
0x00
,
0x00
,
0x00
)
unless
@user
.
name
.
empty?
@font
.
draw_blended_utf8
(
@contents
,
@user
.
name
,
160
,
12
,
0x00
,
0x00
,
0x00
)
unless
@user
.
name
.
empty?
@font
.
draw_blended_utf8
(
@contents
,
@user
.
id
.
to_s
,
160
,
12
+
16
*
2
,
0x00
,
0x00
,
0x00
)
unless
@user
.
id
.
to_s
.
empty?
#@font.draw_blended_utf8(@contents, @user.id.to_s , 160, 12+16*2, 0x00,0x00,0x00) unless @user.id.to_s.empty?
@font
.
draw_blended_utf8
(
@contents
,
"Lv:
#{
@user
.
level
}
"
,
160
,
12
+
16
*
3
,
0x00
,
0x00
,
0x00
)
if
@user
.
respond_to?
:level
and
@user
.
level
#TODO:规范化,level是iduel专属的,但是又不太想让iduel来重定义这个window
#@font.draw_blended_utf8(@contents, "Lv: #{@user.level}" , 160, 12+16*3, 0x00,0x00,0x00) if @user.respond_to? :level and @user.level #TODO:规范化,level是iduel专属的,但是又不太想让iduel来重定义这个window
@font
.
draw_blended_utf8
(
@contents
,
"经验:
#{
@user
.
exp
}
"
,
160
,
12
+
16
*
4
,
0x00
,
0x00
,
0x00
)
if
@user
.
respond_to?
:exp
and
@user
.
exp
#@font.draw_blended_utf8(@contents, "经验: #{@user.exp}", 160, 12+16*4, 0x00,0x00,0x00) if @user.respond_to? :exp and @user.exp
end
def
match
=
(
count
)
clear
(
160
,
12
+
16
*
5
,
120
,
16
)
@font
.
draw_blended_utf8
(
@contents
,
"匹配:
#{
count
}
"
,
160
,
12
+
16
*
5
,
0x00
,
0x00
,
0x00
)
end
def
rooms
=
(
count
)
clear
(
160
,
12
+
16
*
6
,
120
,
16
)
@font
.
draw_blended_utf8
(
@contents
,
"房间:
#{
count
}
"
,
160
,
12
+
16
*
6
,
0x00
,
0x00
,
0x00
)
end
def
users
=
(
count
)
clear
(
160
,
12
+
16
*
7
,
120
,
16
)
@font
.
draw_blended_utf8
(
@contents
,
"在线人数:
#{
count
}
"
,
160
,
12
+
16
*
7
,
0x00
,
0x00
,
0x00
)
end
end
def
dispose
def
dispose
@thread
.
exit
@thread
.
exit
...
...
locales/zh.yml
View file @
0fd0f358
...
@@ -11,7 +11,7 @@ zh:
...
@@ -11,7 +11,7 @@ zh:
remember
:
"
记住密码"
remember
:
"
记住密码"
replay
:
"
录像"
replay
:
"
录像"
lobby
:
lobby
:
f
aq
:
"
常见问题
"
f
orum
:
"
论坛
"
editdeck
:
"
卡组编辑"
editdeck
:
"
卡组编辑"
newroom
:
"
建立房间"
newroom
:
"
建立房间"
lobby
:
"
大厅"
lobby
:
"
大厅"
...
...
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