Commit 873082dc authored by 神楽坂玲奈's avatar 神楽坂玲奈

Merge pull request #2 from IamIpanda/master

parents 194e405d 7701d054
This diff was suppressed by a .gitattributes entry.
This diff was suppressed by a .gitattributes entry.
This diff was suppressed by a .gitattributes entry.
This diff was suppressed by a .gitattributes entry.
This diff was suppressed by a .gitattributes entry.
This diff was suppressed by a .gitattributes entry.
...@@ -8,7 +8,7 @@ begin ...@@ -8,7 +8,7 @@ begin
$config['bgm'] = true if $config['bgm'].nil? $config['bgm'] = true if $config['bgm'].nil?
$config['screen'] ||= {} $config['screen'] ||= {}
$config['screen']['width'] ||= 1024 $config['screen']['width'] ||= 1024
$config['screen']['height'] ||= 768 $config['screen']['height'] ||= 640
end end
def save_config(file="config.yml") def save_config(file="config.yml")
......
...@@ -25,7 +25,7 @@ class Scene_Lobby < Scene ...@@ -25,7 +25,7 @@ class Scene_Lobby < Scene
@userinfo = Window_UserInfo.new(24,24, $game.user) @userinfo = Window_UserInfo.new(24,24, $game.user)
@host_window = Window_LobbyButtons.new(748,18) @host_window = Window_LobbyButtons.new(748,18)
@active_window = @roomlist @active_window = @roomlist
@chat_window = Window_Chat.new(313,543,698,212) @chat_window = Window_Chat.new(313,$config['screen']['height'] - 225,698,212)
@count = 0 @count = 0
super super
end end
......
...@@ -13,7 +13,19 @@ class Scene_Login < Scene ...@@ -13,7 +13,19 @@ class Scene_Login < Scene
def start def start
WM::set_caption("MyCard v#{Update::Version}", "MyCard") WM::set_caption("MyCard v#{Update::Version}", "MyCard")
@background = Surface.load("graphics/login/background.png").display_format @background = Surface.load("graphics/login/background.png").display_format
#======================================================
# We'll pay fpr that soon or later.
#======================================================
if $config['screen']['height'] == 768
@gameselect_window = Window_GameSelect.new(117,269) @gameselect_window = Window_GameSelect.new(117,269)
elsif $config['screen']['height'] == 640
@gameselect_window = Window_GameSelect.new(117,134)
else
raise "无法分辨的分辨率"
end
#======================================================
# ENDS HERE
#======================================================
super super
end end
def update def update
......
...@@ -24,7 +24,19 @@ class Window_GameSelect < Window_List ...@@ -24,7 +24,19 @@ class Window_GameSelect < Window_List
self.items = @items self.items = @items
self.index = @items.find_index{|game|game["name"] == $config['game']} || 0 self.index = @items.find_index{|game|game["name"] == $config['game']} || 0
clicked clicked
#======================================================
# We'll pay fpr that soon or later.
#======================================================
if $config['screen']['height'] == 768
@announcements_window = Window_Announcements.new(313,265,600,24) @announcements_window = Window_Announcements.new(313,265,600,24)
elsif $config['screen']['height'] == 640
@announcements_window = Window_Announcements.new(313,130,600,24)
else
raise "无法分辨的分辨率"
end
#======================================================
# ENDS HERE
#======================================================
refresh refresh
end end
def draw_item(index, status=0) def draw_item(index, status=0)
...@@ -60,7 +72,19 @@ class Window_GameSelect < Window_List ...@@ -60,7 +72,19 @@ class Window_GameSelect < Window_List
load @items[@index]["file"].encode("GBK") #TODO: load的这种架构微蛋疼,一时想不到更好的方案 load @items[@index]["file"].encode("GBK") #TODO: load的这种架构微蛋疼,一时想不到更好的方案
$config['game'] = @items[@index]['name'] $config['game'] = @items[@index]['name']
@login_window.destroy if @login_window @login_window.destroy if @login_window
#======================================================
# We'll pay fpr that soon or later.
#======================================================
if $config['screen']['height'] == 768
@login_window = Window_Login.new(316,316,$config[$config['game']]["username"],$config[$config['game']]["password"]) @login_window = Window_Login.new(316,316,$config[$config['game']]["username"],$config[$config['game']]["password"])
elsif $config['screen']['height'] == 640
@login_window = Window_Login.new(316,183,$config[$config['game']]["username"],$config[$config['game']]["password"])
else
raise "无法分辨的分辨率"
end
#======================================================
# ENDS HERE
#======================================================
@announcements_window.refresh if @announcements_window @announcements_window.refresh if @announcements_window
@game = @index @game = @index
refresh refresh
......
...@@ -14,7 +14,7 @@ class Window_RoomList < Window_Scrollable ...@@ -14,7 +14,7 @@ class Window_RoomList < Window_Scrollable
@button.set_alpha(RLEACCEL, 255) @button.set_alpha(RLEACCEL, 255)
#@background = Surface.load 'graphics/lobby/roomitems.png' #@background = Surface.load 'graphics/lobby/roomitems.png'
#@contents = Surface.load 'graphics/lobby/roomitems.png' #@contents = Surface.load 'graphics/lobby/roomitems.png'
super(x,y,@button.w / 3, 48 * 10) super(x,y,@button.w / 3, ($config['screen']['height'] - 288) / 48 * 48)
@item_max = 0 @item_max = 0
@font = TTF.open("fonts/wqy-microhei.ttc", 16) @font = TTF.open("fonts/wqy-microhei.ttc", 16)
@color = [0x03, 0x11, 0x22] @color = [0x03, 0x11, 0x22]
......
...@@ -11,7 +11,7 @@ class Window_UserList < Window_Scrollable ...@@ -11,7 +11,7 @@ class Window_UserList < Window_Scrollable
def initialize(x, y, items) def initialize(x, y, items)
#@contents = Surface.load "graphics/lobby/useritems.png" #@contents = Surface.load "graphics/lobby/useritems.png"
#@background = Surface.load "graphics/lobby/useritems.png" #@background = Surface.load "graphics/lobby/useritems.png"
super(x,y,272,540) super(x,y,272,$config['screen']['height'] - 220)
@font = TTF.open("fonts/wqy-microhei.ttc", 16) @font = TTF.open("fonts/wqy-microhei.ttc", 16)
@color = [0x03, 0x11, 0x22] @color = [0x03, 0x11, 0x22]
@color_friend = [0, 128, 0] @color_friend = [0, 128, 0]
......
This diff was suppressed by a .gitattributes entry.
This diff was suppressed by a .gitattributes entry.
This diff was suppressed by a .gitattributes entry.
This diff was suppressed by a .gitattributes entry.
This diff was suppressed by a .gitattributes entry.
This diff was suppressed by a .gitattributes entry.
This diff was suppressed by a .gitattributes entry.
This diff was suppressed by a .gitattributes entry.
This diff was suppressed by a .gitattributes entry.
This diff was suppressed by a .gitattributes entry.
This diff was suppressed by a .gitattributes entry.
This diff was suppressed by a .gitattributes entry.
This diff was suppressed by a .gitattributes entry.
This diff was suppressed by a .gitattributes entry.
This diff was suppressed by a .gitattributes entry.
This diff was suppressed by a .gitattributes entry.
This diff was suppressed by a .gitattributes entry.
This diff was suppressed by a .gitattributes entry.
This diff was suppressed by a .gitattributes entry.
This diff was suppressed by a .gitattributes entry.
This diff was suppressed by a .gitattributes entry.
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