Commit 3acdcc3f authored by 神楽坂玲奈's avatar 神楽坂玲奈

公告添加时间,决斗界面坐标微调

parent 43a04a2a
...@@ -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
......
...@@ -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(130,174) @fieldback_window = Window_FieldBack.new(131,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)
......
...@@ -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)
......
...@@ -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>= 120 if @count>= 180
@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)
if !@focus
@focus = true
refresh
else
@focus = true @focus = true
end end
end
def lostfocus(active_window=nil) def lostfocus(active_window=nil)
@focus = false @focus = false
refresh
end end
end end
...@@ -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 = [[56,0], #场地魔法 Field_Pos = [[59,0], #场地魔法
[140, 84], [234,84], [328,84],[422,84], [516, 84], #后场 [143, 84], [237,84], [331,84],[425,84], [519, 84], #后场
[140, 0], [234, 0], [328, 0],[422, 0], [516, 0]] #前场 [143, 0], [237, 0], [331, 0],[425, 0], [519, 0]] #前场
Extra_Pos = [56,84] #额外卡组 Extra_Pos = [59,84] #额外卡组
Graveyard_Pos = [598,0] #墓地 Graveyard_Pos = [601,0] #墓地
Removed_Pos = [657,0] #除外区 Removed_Pos = [660,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,711,282) super(x,y,714,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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment