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
3acdcc3f
Commit
3acdcc3f
authored
Feb 28, 2012
by
神楽坂玲奈
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
公告添加时间,决斗界面坐标微调
parent
43a04a2a
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
34 additions
and
18 deletions
+34
-18
lib/card.rb
lib/card.rb
+2
-2
lib/scene_duel.rb
lib/scene_duel.rb
+3
-3
lib/scene_lobby.rb
lib/scene_lobby.rb
+1
-1
lib/window_announcements.rb
lib/window_announcements.rb
+20
-4
lib/window_field.rb
lib/window_field.rb
+8
-8
No files found.
lib/card.rb
View file @
3acdcc3f
...
@@ -161,12 +161,12 @@ class Card
...
@@ -161,12 +161,12 @@ class Card
@image
||=
Surface
.
load
(
"
#{
PicPath
}
/
#{
@id
-
1
}
.jpg"
).
display_format
rescue
create_image
@image
||=
Surface
.
load
(
"
#{
PicPath
}
/
#{
@id
-
1
}
.jpg"
).
display_format
rescue
create_image
end
end
def
image_small
def
image_small
@image_small
||=
image
.
transform_surface
(
0xFF000000
,
0
,
54.0
/
image
.
w
,
81.0
/
image
.
h
,
Surface
::
TRANSFORM_SAFE
)
@image_small
||=
image
.
transform_surface
(
0xFF000000
,
0
,
54.0
/
image
.
w
,
81.0
/
image
.
h
,
Surface
::
TRANSFORM_SAFE
)
.
copy_rect
(
1
,
1
,
54
,
81
).
display_format
end
end
def
image_horizontal
def
image_horizontal
if
@image_horizontal
.
nil?
if
@image_horizontal
.
nil?
image_horizontal
=
image_small
.
transform_surface
(
0xFF000000
,
90
,
1
,
1
,
Surface
::
TRANSFORM_SAFE
)
image_horizontal
=
image_small
.
transform_surface
(
0xFF000000
,
90
,
1
,
1
,
Surface
::
TRANSFORM_SAFE
)
@image_horizontal
=
image_horizontal
.
copy_rect
(
1
,
1
,
81
,
54
)
#SDL的bug,会多出1像素的黑边
@image_horizontal
=
image_horizontal
.
copy_rect
(
1
,
1
,
81
,
54
)
.
display_format
#SDL的bug,会多出1像素的黑边
image_horizontal
.
destroy
image_horizontal
.
destroy
end
end
@image_horizontal
@image_horizontal
...
...
lib/scene_duel.rb
View file @
3acdcc3f
...
@@ -37,11 +37,11 @@ class Scene_Duel < Scene
...
@@ -37,11 +37,11 @@ class Scene_Duel < Scene
init_replay
init_replay
@phases_window
=
Window_Phases
.
new
(
122
,
356
)
@phases_window
=
Window_Phases
.
new
(
122
,
356
)
@fieldback_window
=
Window_FieldBack
.
new
(
13
0
,
174
)
@fieldback_window
=
Window_FieldBack
.
new
(
13
1
,
173
)
@cardinfo_window
=
Window_CardInfo
.
new
(
715
,
0
)
@cardinfo_window
=
Window_CardInfo
.
new
(
715
,
0
)
@player_field_window
=
Window_Field
.
new
(
4
,
398
,
$game
.
player_field
,
true
)
@player_field_window
=
Window_Field
.
new
(
2
,
397
,
$game
.
player_field
,
true
)
@opponent_field_window
=
Window_Field
.
new
(
4
,
60
,
$game
.
opponent_field
,
false
)
@opponent_field_window
=
Window_Field
.
new
(
2
,
56
,
$game
.
opponent_field
,
false
)
@player_lp_window
=
Window_LP
.
new
(
0
,
0
,
@room
.
player1
,
true
)
@player_lp_window
=
Window_LP
.
new
(
0
,
0
,
@room
.
player1
,
true
)
@opponent_lp_window
=
Window_LP
.
new
(
360
,
0
,
@room
.
player2
,
false
)
@opponent_lp_window
=
Window_LP
.
new
(
360
,
0
,
@room
.
player2
,
false
)
...
...
lib/scene_lobby.rb
View file @
3acdcc3f
...
@@ -82,7 +82,7 @@ class Scene_Lobby < Scene
...
@@ -82,7 +82,7 @@ class Scene_Lobby < Scene
when
Game_Event
::
AllRooms
when
Game_Event
::
AllRooms
@roomlist
.
items
=
$game
.
rooms
@roomlist
.
items
=
$game
.
rooms
when
Game_Event
::
Join
when
Game_Event
::
Join
$scene
=
Scene_Duel
.
new
(
event
.
room
,
Deck
.
load
(
"
test1
.TXT"
))
$scene
=
Scene_Duel
.
new
(
event
.
room
,
Deck
.
load
(
"
妖鸟
.TXT"
))
when
Game_Event
::
Watch
when
Game_Event
::
Watch
require_relative
'scene_watch'
require_relative
'scene_watch'
$scene
=
Scene_Watch
.
new
(
event
.
room
)
$scene
=
Scene_Watch
.
new
(
event
.
room
)
...
...
lib/window_announcements.rb
View file @
3acdcc3f
...
@@ -7,17 +7,27 @@ class Window_Announcements < Window
...
@@ -7,17 +7,27 @@ class Window_Announcements < Window
@last_item
=
@item
=
@items
.
first
@last_item
=
@item
=
@items
.
first
@font
=
TTF
.
open
(
"fonts/WenQuanYi Micro Hei.ttf"
,
18
)
@font
=
TTF
.
open
(
"fonts/WenQuanYi Micro Hei.ttf"
,
18
)
@color
=
[
44
,
64
,
78
]
@color
=
[
44
,
64
,
78
]
@time_color
=
[
0x66
,
0x66
,
0x66
]
@time_font
=
TTF
.
open
(
"fonts/WenQuanYi Micro Hei.ttf"
,
14
)
@transforming
=
nil
@transforming
=
nil
refresh
refresh
end
end
def
refresh
def
refresh
clear
clear
@index
=
0
if
!
@items
[
@index
]
return
unless
@item
if
@transforming
if
@focus
@font
.
style
=
TTF
::
STYLE_UNDERLINE
@font
.
draw_blended_utf8
(
@contents
,
@item
.
title
,
0
,
0
,
*
@color
)
@time_font
.
draw_blended_utf8
(
@contents
,
@item
.
time
.
strftime
(
'%Y-%m-%d'
),
300
,
4
,
*
@time_color
)
if
@item
.
time
@font
.
style
=
TTF
::
STYLE_NORMAL
elsif
@transforming
@font
.
draw_blended_utf8
(
@contents
,
@last_item
.
title
,
0
,
-
@transforming
,
*
@color
)
@font
.
draw_blended_utf8
(
@contents
,
@last_item
.
title
,
0
,
-
@transforming
,
*
@color
)
@time_font
.
draw_blended_utf8
(
@contents
,
@last_item
.
time
.
strftime
(
'%Y-%m-%d'
),
300
,
-
@transforming
+
4
,
*
@time_color
)
if
@last_item
.
time
@font
.
draw_blended_utf8
(
@contents
,
@item
.
title
,
0
,
-
@transforming
+
24
,
*
@color
)
@font
.
draw_blended_utf8
(
@contents
,
@item
.
title
,
0
,
-
@transforming
+
24
,
*
@color
)
@time_font
.
draw_blended_utf8
(
@contents
,
@item
.
time
.
strftime
(
'%Y-%m-%d'
),
300
,
-
@transforming
+
24
+
4
,
*
@time_color
)
if
@item
.
time
else
else
@font
.
draw_blended_utf8
(
@contents
,
@item
.
title
,
0
,
0
,
*
@color
)
@font
.
draw_blended_utf8
(
@contents
,
@item
.
title
,
0
,
0
,
*
@color
)
@time_font
.
draw_blended_utf8
(
@contents
,
@item
.
time
.
strftime
(
'%Y-%m-%d'
),
300
,
4
,
*
@time_color
)
if
@item
.
time
end
end
end
end
def
update
def
update
...
@@ -44,7 +54,7 @@ class Window_Announcements < Window
...
@@ -44,7 +54,7 @@ class Window_Announcements < Window
else
else
@count
+=
1
@count
+=
1
end
end
if
@count
>=
1
2
0
if
@count
>=
1
8
0
@index
=
(
@index
+
1
)
%
@items
.
size
@index
=
(
@index
+
1
)
%
@items
.
size
@count
=
0
@count
=
0
@item
=
@items
[
@index
]
@item
=
@items
[
@index
]
...
@@ -56,9 +66,15 @@ class Window_Announcements < Window
...
@@ -56,9 +66,15 @@ class Window_Announcements < Window
Launchy
.
open
(
@item
.
url
)
if
@item
.
url
Launchy
.
open
(
@item
.
url
)
if
@item
.
url
end
end
def
mousemoved
(
x
,
y
)
def
mousemoved
(
x
,
y
)
@focus
=
true
if
!
@focus
@focus
=
true
refresh
else
@focus
=
true
end
end
end
def
lostfocus
(
active_window
=
nil
)
def
lostfocus
(
active_window
=
nil
)
@focus
=
false
@focus
=
false
refresh
end
end
end
end
lib/window_field.rb
View file @
3acdcc3f
...
@@ -9,13 +9,13 @@ class Window_Field < Window
...
@@ -9,13 +9,13 @@ class Window_Field < Window
require_relative
'card'
require_relative
'card'
require_relative
'window_action'
require_relative
'window_action'
require_relative
'window_cardinfo'
require_relative
'window_cardinfo'
Field_Pos
=
[[
5
6
,
0
],
#场地魔法
Field_Pos
=
[[
5
9
,
0
],
#场地魔法
[
14
0
,
84
],
[
234
,
84
],
[
328
,
84
],[
422
,
84
],
[
516
,
84
],
#后场
[
14
3
,
84
],
[
237
,
84
],
[
331
,
84
],[
425
,
84
],
[
519
,
84
],
#后场
[
14
0
,
0
],
[
234
,
0
],
[
328
,
0
],[
422
,
0
],
[
516
,
0
]]
#前场
[
14
3
,
0
],
[
237
,
0
],
[
331
,
0
],[
425
,
0
],
[
519
,
0
]]
#前场
Extra_Pos
=
[
5
6
,
84
]
#额外卡组
Extra_Pos
=
[
5
9
,
84
]
#额外卡组
Graveyard_Pos
=
[
598
,
0
]
#墓地
Graveyard_Pos
=
[
601
,
0
]
#墓地
Removed_Pos
=
[
6
57
,
0
]
#除外区
Removed_Pos
=
[
6
60
,
0
]
#除外区
Deck_Pos
=
[
598
,
84
]
Deck_Pos
=
[
601
,
84
]
Hand_Pos
=
[
0
,
201
,
62
,
8
]
#手卡: x, y, width, 间距
Hand_Pos
=
[
0
,
201
,
62
,
8
]
#手卡: x, y, width, 间距
#Card_Size = [Card::CardBack.w, Card::CardBack.h]
#Card_Size = [Card::CardBack.w, Card::CardBack.h]
Card_Size
=
[
54
,
81
]
Card_Size
=
[
54
,
81
]
...
@@ -24,7 +24,7 @@ class Window_Field < Window
...
@@ -24,7 +24,7 @@ class Window_Field < Window
def
initialize
(
x
,
y
,
field
,
player
=
true
)
def
initialize
(
x
,
y
,
field
,
player
=
true
)
@border
=
Surface
.
load
(
'graphics/field/border.png'
)
@border
=
Surface
.
load
(
'graphics/field/border.png'
)
@border_horizontal
=
Surface
.
load
(
'graphics/field/border_horizontal.png'
)
#@border.transform_surface(0x66000000,90,1,1,Surface::TRANSFORM_SAFE|Surface::TRANSFORM_AA)#FUCK!
@border_horizontal
=
Surface
.
load
(
'graphics/field/border_horizontal.png'
)
#@border.transform_surface(0x66000000,90,1,1,Surface::TRANSFORM_SAFE|Surface::TRANSFORM_AA)#FUCK!
super
(
x
,
y
,
71
1
,
282
)
super
(
x
,
y
,
71
4
,
282
)
@field
=
field
@field
=
field
@player
=
player
@player
=
player
@font
=
TTF
.
open
(
'fonts/WenQuanYi Micro Hei.ttf'
,
12
)
@font
=
TTF
.
open
(
'fonts/WenQuanYi Micro Hei.ttf'
,
12
)
...
...
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