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
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
@image
||=
Surface
.
load
(
"
#{
PicPath
}
/
#{
@id
-
1
}
.jpg"
).
display_format
rescue
create_image
end
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
def
image_horizontal
if
@image_horizontal
.
nil?
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
end
@image_horizontal
...
...
lib/scene_duel.rb
View file @
3acdcc3f
...
...
@@ -37,11 +37,11 @@ class Scene_Duel < Scene
init_replay
@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
)
@player_field_window
=
Window_Field
.
new
(
4
,
398
,
$game
.
player_field
,
true
)
@opponent_field_window
=
Window_Field
.
new
(
4
,
60
,
$game
.
opponent_field
,
false
)
@player_field_window
=
Window_Field
.
new
(
2
,
397
,
$game
.
player_field
,
true
)
@opponent_field_window
=
Window_Field
.
new
(
2
,
56
,
$game
.
opponent_field
,
false
)
@player_lp_window
=
Window_LP
.
new
(
0
,
0
,
@room
.
player1
,
true
)
@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
when
Game_Event
::
AllRooms
@roomlist
.
items
=
$game
.
rooms
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
require_relative
'scene_watch'
$scene
=
Scene_Watch
.
new
(
event
.
room
)
...
...
lib/window_announcements.rb
View file @
3acdcc3f
...
...
@@ -7,17 +7,27 @@ class Window_Announcements < Window
@last_item
=
@item
=
@items
.
first
@font
=
TTF
.
open
(
"fonts/WenQuanYi Micro Hei.ttf"
,
18
)
@color
=
[
44
,
64
,
78
]
@time_color
=
[
0x66
,
0x66
,
0x66
]
@time_font
=
TTF
.
open
(
"fonts/WenQuanYi Micro Hei.ttf"
,
14
)
@transforming
=
nil
refresh
end
def
refresh
clear
@index
=
0
if
!
@items
[
@index
]
if
@transforming
return
unless
@item
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
)
@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
)
@time_font
.
draw_blended_utf8
(
@contents
,
@item
.
time
.
strftime
(
'%Y-%m-%d'
),
300
,
-
@transforming
+
24
+
4
,
*
@time_color
)
if
@item
.
time
else
@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
def
update
...
...
@@ -44,7 +54,7 @@ class Window_Announcements < Window
else
@count
+=
1
end
if
@count
>=
1
2
0
if
@count
>=
1
8
0
@index
=
(
@index
+
1
)
%
@items
.
size
@count
=
0
@item
=
@items
[
@index
]
...
...
@@ -56,9 +66,15 @@ class Window_Announcements < Window
Launchy
.
open
(
@item
.
url
)
if
@item
.
url
end
def
mousemoved
(
x
,
y
)
@focus
=
true
if
!
@focus
@focus
=
true
refresh
else
@focus
=
true
end
end
def
lostfocus
(
active_window
=
nil
)
@focus
=
false
refresh
end
end
lib/window_field.rb
View file @
3acdcc3f
...
...
@@ -9,13 +9,13 @@ class Window_Field < Window
require_relative
'card'
require_relative
'window_action'
require_relative
'window_cardinfo'
Field_Pos
=
[[
5
6
,
0
],
#场地魔法
[
14
0
,
84
],
[
234
,
84
],
[
328
,
84
],[
422
,
84
],
[
516
,
84
],
#后场
[
14
0
,
0
],
[
234
,
0
],
[
328
,
0
],[
422
,
0
],
[
516
,
0
]]
#前场
Extra_Pos
=
[
5
6
,
84
]
#额外卡组
Graveyard_Pos
=
[
598
,
0
]
#墓地
Removed_Pos
=
[
6
57
,
0
]
#除外区
Deck_Pos
=
[
598
,
84
]
Field_Pos
=
[[
5
9
,
0
],
#场地魔法
[
14
3
,
84
],
[
237
,
84
],
[
331
,
84
],[
425
,
84
],
[
519
,
84
],
#后场
[
14
3
,
0
],
[
237
,
0
],
[
331
,
0
],[
425
,
0
],
[
519
,
0
]]
#前场
Extra_Pos
=
[
5
9
,
84
]
#额外卡组
Graveyard_Pos
=
[
601
,
0
]
#墓地
Removed_Pos
=
[
6
60
,
0
]
#除外区
Deck_Pos
=
[
601
,
84
]
Hand_Pos
=
[
0
,
201
,
62
,
8
]
#手卡: x, y, width, 间距
#Card_Size = [Card::CardBack.w, Card::CardBack.h]
Card_Size
=
[
54
,
81
]
...
...
@@ -24,7 +24,7 @@ class Window_Field < Window
def
initialize
(
x
,
y
,
field
,
player
=
true
)
@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!
super
(
x
,
y
,
71
1
,
282
)
super
(
x
,
y
,
71
4
,
282
)
@field
=
field
@player
=
player
@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