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
514961ce
Commit
514961ce
authored
May 16, 2012
by
神楽坂玲奈
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
losses设置界面,加房TCG修正,空房名引起崩溃修正
parent
cd5faab0
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
21 additions
and
22 deletions
+21
-22
graphics/config/background.png
graphics/config/background.png
+0
-0
lib/window_config.rb
lib/window_config.rb
+16
-16
lib/window_host.rb
lib/window_host.rb
+2
-3
lib/window_roomlist.rb
lib/window_roomlist.rb
+3
-3
No files found.
graphics/config/background.png
View file @
514961ce
This diff was suppressed by a .gitattributes entry.
lib/window_config.rb
View file @
514961ce
...
...
@@ -10,34 +10,34 @@ class Window_Config < Window
@index
=
nil
@items
=
{
:fullscreen
=>
[
0
,
0
,
120
,
WLH
],
:bgm
=>
[
0
,
WLH
,
120
,
WLH
],
:avatar_cache
=>
[
2
20
,
WLH
*
2
,
@button
.
w
/
3
,
@button
.
h
],
:return
=>
[
0
,
WLH
*
3
+
10
,
100
,
WLH
]
:fullscreen
=>
[
200
,
16
0
,
120
,
WLH
],
:bgm
=>
[
200
,
160
+
WLH
,
120
,
WLH
],
:avatar_cache
=>
[
2
00
+
220
,
160
+
WLH
*
2
,
@button
.
w
/
3
,
@button
.
h
],
:return
=>
[
200
,
160
+
WLH
*
3
+
10
,
100
,
WLH
]
}
refresh
end
def
draw_item
(
index
,
status
=
0
)
case
index
when
:fullscreen
Surface
.
blit
(
@checkbox
,
20
*
status
,
$config
[
'screen'
][
'fullscreen'
]
?
20
:
0
,
20
,
20
,
@contents
,
0
,
0
)
Surface
.
blit
(
@checkbox
,
20
*
status
,
$config
[
'screen'
][
'fullscreen'
]
?
20
:
0
,
20
,
20
,
@contents
,
@items
[
:fullscreen
][
0
],
@items
[
:fullscreen
][
1
]
)
case
status
when
0
@font
.
draw_blended_utf8
(
@contents
,
"全屏模式"
,
24
,
0
,
0x00
,
0x00
,
0x00
)
@font
.
draw_blended_utf8
(
@contents
,
"全屏模式"
,
@items
[
:fullscreen
][
0
]
+
24
,
@items
[
:fullscreen
][
1
],
0xFF
,
0xFF
,
0xFF
)
when
1
@font
.
draw_shaded_utf8
(
@contents
,
"全屏模式"
,
24
,
0
,
0x00
,
0x00
,
0x00
,
0xEE
,
0xEE
,
0xEE
)
@font
.
draw_shaded_utf8
(
@contents
,
"全屏模式"
,
@items
[
:fullscreen
][
0
]
+
24
,
@items
[
:fullscreen
][
1
],
0xFF
,
0xFF
,
0xFF
,
0x11
,
0x11
,
0x11
)
when
2
@font
.
draw_shaded_utf8
(
@contents
,
"全屏模式"
,
24
,
0
,
0xEE
,
0xEE
,
0xEE
,
0x00
,
0x00
,
0x00
)
@font
.
draw_shaded_utf8
(
@contents
,
"全屏模式"
,
@items
[
:fullscreen
][
0
]
+
24
,
@items
[
:fullscreen
][
1
],
0x11
,
0x11
,
0x11
,
0xFF
,
0xFF
,
0xFF
)
end
when
:bgm
Surface
.
blit
(
@checkbox
,
20
*
status
,
$config
[
'bgm'
]
?
20
:
0
,
20
,
20
,
@contents
,
0
,
WLH
)
Surface
.
blit
(
@checkbox
,
20
*
status
,
$config
[
'bgm'
]
?
20
:
0
,
20
,
20
,
@contents
,
@items
[
:bgm
][
0
],
@items
[
:bgm
][
1
]
)
case
status
when
0
@font
.
draw_blended_utf8
(
@contents
,
"BGM"
,
24
,
WLH
,
0x00
,
0x00
,
0x00
)
@font
.
draw_blended_utf8
(
@contents
,
"BGM"
,
@items
[
:bgm
][
0
]
+
24
,
@items
[
:bgm
][
1
],
0xFF
,
0xFF
,
0xFF
)
when
1
@font
.
draw_shaded_utf8
(
@contents
,
"BGM"
,
24
,
WLH
,
0x00
,
0x00
,
0x00
,
0xEE
,
0xEE
,
0xEE
)
@font
.
draw_shaded_utf8
(
@contents
,
"BGM"
,
@items
[
:bgm
][
0
]
+
24
,
@items
[
:bgm
][
1
],
0xFF
,
0xFF
,
0xFF
,
0x11
,
0x11
,
0x11
)
when
2
@font
.
draw_shaded_utf8
(
@contents
,
"BGM"
,
24
,
WLH
,
0xEE
,
0xEE
,
0xEE
,
0x00
,
0x00
,
0x00
)
@font
.
draw_shaded_utf8
(
@contents
,
"BGM"
,
@items
[
:bgm
][
0
]
+
24
,
@items
[
:bgm
][
1
],
0x11
,
0x11
,
0x11
,
0xFF
,
0xFF
,
0xFF
)
end
when
:avatar_cache
size
=
0
...
...
@@ -46,11 +46,11 @@ class Window_Config < Window
count
+=
1
size
+=
File
.
size
(
file
)
end
@font
.
draw_blended_utf8
(
@contents
,
"头像缓存:
#{
count
}
个文件,
#{
filesize_inspect
(
size
)
}
"
,
0
,
WLH
*
2
,
0x00
,
0x00
,
0x00
)
Surface
.
blit
(
@button
,
@button
.
w
/
3
*
status
,
0
,
@button
.
w
/
3
,
@button
.
h
,
@contents
,
220
,
WLH
*
2
)
@font
.
draw_blended_utf8
(
@contents
,
"清空"
,
220
+
10
,
WLH
*
2
+
5
,
0x00
,
0x00
,
0x00
)
@font
.
draw_blended_utf8
(
@contents
,
"头像缓存:
#{
count
}
个文件,
#{
filesize_inspect
(
size
)
}
"
,
200
,
@items
[
:avatar_cache
][
1
],
0xFF
,
0xFF
,
0xFF
)
Surface
.
blit
(
@button
,
@button
.
w
/
3
*
status
,
0
,
@button
.
w
/
3
,
@button
.
h
,
@contents
,
@items
[
:avatar_cache
][
0
],
@items
[
:avatar_cache
][
1
]
)
@font
.
draw_blended_utf8
(
@contents
,
"清空"
,
@items
[
:avatar_cache
][
0
]
+
10
,
@items
[
:avatar_cache
][
1
]
+
5
,
0xFF
,
0xFF
,
0xFF
)
when
:return
@font
.
draw_blended_utf8
(
@contents
,
"回到标题画面"
,
0
,
WLH
*
3
+
10
,
0x00
,
0x00
,
0x00
)
@font
.
draw_blended_utf8
(
@contents
,
"回到标题画面"
,
@items
[
:return
][
0
],
@items
[
:return
][
1
],
0xFF
,
0xFF
,
0xFF
)
end
end
...
...
lib/window_host.rb
View file @
514961ce
...
...
@@ -12,11 +12,11 @@ class Window_Host < Window
@roomname_inputbox
=
Widget_InputBox
.
new
(
@x
+
96
,
@y
+
41
,
165
,
WLH
)
@password_inputbox
=
Widget_InputBox
.
new
(
@x
+
96
,
@y
+
41
+
WLH
,
165
,
WLH
)
@pvp
=
Widget_Checkbox
.
new
(
self
,
33
+
@x
,
@y
+
41
+
WLH
*
2
,
120
,
24
,
false
,
"竞技场"
)
{
|
checked
|
@tag
.
checked
=
false
if
checked
}
@pvp
=
Widget_Checkbox
.
new
(
self
,
33
+
@x
,
@y
+
41
+
WLH
*
2
,
120
,
24
,
false
,
"竞技场"
)
{
|
checked
|
(
@ocg
.
checked
=
true
;
@tcg
.
checked
=
@tag
.
checked
=
false
)
if
checked
}
@pvp
.
background
=
@background
.
copy_rect
(
33
,
70
,
120
,
24
)
@match
=
Widget_Checkbox
.
new
(
self
,
120
+
@x
,
@y
+
41
+
WLH
*
2
,
120
,
24
,
true
,
"三回决斗"
){
|
checked
|
@tag
.
checked
=
false
if
checked
}
@match
.
background
=
@background
.
copy_rect
(
120
,
70
,
120
,
24
)
@tag
=
Widget_Checkbox
.
new
(
self
,
33
+
@x
,
@y
+
41
+
WLH
*
4
+
4
,
120
,
24
,
false
,
"TAG双打"
){
|
checked
|
(
@pvp
.
checked
=
false
;
@match
.
checked
=
false
)
if
checked
}
@tag
=
Widget_Checkbox
.
new
(
self
,
33
+
@x
,
@y
+
41
+
WLH
*
4
+
4
,
120
,
24
,
false
,
"TAG双打"
){
|
checked
|
@pvp
.
checked
=
@match
.
checked
=
false
if
checked
}
@tag
.
background
=
@background
.
copy_rect
(
120
,
70
,
120
,
24
)
@ocg
=
Widget_Checkbox
.
new
(
self
,
33
+
@x
,
@y
+
41
+
WLH
*
5
+
4
,
120
,
24
,
true
,
"OCG"
){
|
checked
|
@tcg
.
checked
=
true
if
!
checked
}
@ocg
.
background
=
@background
.
copy_rect
(
120
,
70
,
120
,
24
)
...
...
@@ -39,7 +39,6 @@ class Window_Host < Window
@font
.
draw_blended_utf8
(
@contents
,
"房间密码"
,
33
,
43
+
WLH
,
*
@color
)
@contents
.
fill_rect
(
4
,
43
+
WLH
*
3
,
@contents
.
w
-
8
,
2
,
0xAA0A7AC5
)
@font
.
draw_blended_utf8
(
@contents
,
"自定义模式"
,
20
,
43
+
WLH
*
3
+
4
,
*
@color
)
@font
.
draw_blended_utf8
(
@contents
,
"TCG目前不能用,只是给以后预留位置"
,
20
,
43
+
WLH
*
6
+
4
,
*
@color
)
@items
.
each_key
do
|
index
|
draw_item
(
index
,
self
.
index
==
index
?
1
:
0
)
end
...
...
lib/window_roomlist.rb
View file @
514961ce
...
...
@@ -26,12 +26,12 @@ class Window_RoomList < Window_Scrollable
y
=
item_rect
(
index
)[
1
]
room
=
@items
[
index
]
Surface
.
blit
(
@button
,
@width
*
status
,
room
.
full?
?
WLH
:
0
,
@width
,
WLH
,
@contents
,
0
,
y
)
@font
.
draw_blended_utf8
(
@contents
,
"R-
#{
room
.
id
}
"
,
24
,
y
+
8
,
*
@color
)
@font
.
draw_blended_utf8
(
@contents
,
room
.
id
.
to_s
,
24
,
y
+
8
,
*
@color
)
@font
.
draw_blended_utf8
(
@contents
,
room
.
full?
?
"【决斗中】"
:
room
.
private?
?
"【私密房】"
:
"【等待中】"
,
8
,
y
+
24
,
*
@color
)
@font
.
draw_blended_utf8
(
@contents
,
room
.
name
,
128
,
y
+
8
,
*
room
.
color
)
unless
room
.
name
.
empty?
or
room
.
name
.
size
>
100
$log
.
error
(
'标题过长'
)
{
room
.
name
}
if
room
.
name
.
size
>
100
@font
.
draw_blended_utf8
(
@contents
,
room
.
player1
.
name
,
128
,
y
+
24
,
*
room
.
player1
.
color
)
if
room
.
player1
@font
.
draw_blended_utf8
(
@contents
,
room
.
player2
.
name
,
320
,
y
+
24
,
*
room
.
player2
.
color
)
if
room
.
player2
@font
.
draw_blended_utf8
(
@contents
,
room
.
player1
.
name
,
128
,
y
+
24
,
*
room
.
player1
.
color
)
if
room
.
player1
and
!
room
.
player1
.
name
.
empty?
@font
.
draw_blended_utf8
(
@contents
,
room
.
player2
.
name
,
320
,
y
+
24
,
*
room
.
player2
.
color
)
if
room
.
player2
and
!
room
.
player2
.
name
.
empty?
room
.
extra
.
each_with_index
do
|
extra
,
index
|
str
,
color
=
extra
@font
.
draw_blended_utf8
(
@contents
,
str
,
300
+
index
*
96
,
y
+
8
,
*
color
)
...
...
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