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

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

parent 43a04a2a
......@@ -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
......
......@@ -37,11 +37,11 @@ class Scene_Duel < Scene
init_replay
@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)
@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)
......
......@@ -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)
......
......@@ -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>= 120
if @count>= 180
@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
......@@ -9,13 +9,13 @@ class Window_Field < Window
require_relative 'card'
require_relative 'window_action'
require_relative 'window_cardinfo'
Field_Pos = [[56,0], #场地魔法
[140, 84], [234,84], [328,84],[422,84], [516, 84], #后场
[140, 0], [234, 0], [328, 0],[422, 0], [516, 0]] #前场
Extra_Pos = [56,84] #额外卡组
Graveyard_Pos = [598,0] #墓地
Removed_Pos = [657,0] #除外区
Deck_Pos = [598, 84]
Field_Pos = [[59,0], #场地魔法
[143, 84], [237,84], [331,84],[425,84], [519, 84], #后场
[143, 0], [237, 0], [331, 0],[425, 0], [519, 0]] #前场
Extra_Pos = [59,84] #额外卡组
Graveyard_Pos = [601,0] #墓地
Removed_Pos = [660,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,711,282)
super(x,y,714,282)
@field = field
@player = player
@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