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
36d83ccd
Commit
36d83ccd
authored
Mar 12, 2012
by
神楽坂玲奈
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
版本0.4.1
parent
11375057
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
5 deletions
+11
-5
graphics/login/game_background.png
graphics/login/game_background.png
+0
-0
lib/window_gameselect.rb
lib/window_gameselect.rb
+11
-5
No files found.
graphics/login/game_background.png
View file @
36d83ccd
This diff was suppressed by a .gitattributes entry.
lib/window_gameselect.rb
View file @
36d83ccd
...
...
@@ -29,11 +29,12 @@ class Window_GameSelect < Window_List
refresh
end
def
draw_item
(
index
,
status
=
0
)
Surface
.
blit
(
@button
,
@button
.
w
/
3
*
status
,
0
,
@button
.
w
/
3
,
@button
.
h
,
@contents
,
0
,
WLH
*
index
)
Surface
.
blit
(
@button
,
@button
.
w
/
3
*
status
,
@game
==
index
?
@button
.
h
/
2
:
0
,
@button
.
w
/
3
,
@button
.
h
/
2
,
@contents
,
0
,
WLH
*
index
)
draw_stroked_text
(
@items
[
index
][
"name"
],
24
,
WLH
*
index
+
14
,
2
)
end
def
item_rect
(
index
)
[
0
,
WLH
*
index
,
@button
.
w
,
@button
.
h
]
return
[
0
,
0
,
0
,
0
]
unless
index
[
0
,
WLH
*
index
,
@button
.
w
/
3
,
@button
.
h
/
2
]
end
def
draw_stroked_text
(
text
,
x
,
y
,
size
=
1
)
[[
x
-
size
,
y
-
size
],
[
x
-
size
,
y
],
[
x
-
size
,
y
+
size
],
...
...
@@ -46,26 +47,31 @@ class Window_GameSelect < Window_List
self
.
index
=
(
y
-
@y
)
/
WLH
end
def
index
=
(
index
)
return
if
@index
==
index
or
index
.
nil?
return
if
@index
==
index
#
or index.nil?
if
@index
clear
(
*
item_rect
(
@index
))
draw_item
(
@index
,
0
)
end
@index
=
index
clear
(
*
item_rect
(
@index
))
draw_item
(
@index
,
1
)
draw_item
(
@index
,
1
)
if
@index
end
def
clicked
return
unless
@index
load
@items
[
@index
][
"file"
]
#TODO: load的这种架构微蛋疼,一时想不到更好的方案
$config
[
'game'
]
=
@items
[
@index
][
'name'
]
@login_window
.
destroy
if
@login_window
@login_window
=
Window_Login
.
new
(
316
,
316
,
$config
[
$config
[
'game'
]][
"username"
],
$config
[
$config
[
'game'
]][
"password"
])
@announcements_window
.
refresh
if
@announcements_window
@game
=
@index
refresh
end
def
update
@announcements_window
.
update
if
@announcements_window
end
#def lostfocus
# self.index = nil
#end
#def destroy
# @login_window.destroy if @login_window
# super
...
...
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