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
xiaoye
mycard
Commits
3349bd95
Commit
3349bd95
authored
Apr 02, 2012
by
zh99998
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
版本0.5.0 ygocore头像
parent
804cdbc3
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
23 additions
and
4 deletions
+23
-4
Rakefile
Rakefile
+1
-1
lib/main.rb
lib/main.rb
+1
-1
lib/update.rb
lib/update.rb
+1
-1
lib/ygocore/user.rb
lib/ygocore/user.rb
+20
-1
No files found.
Rakefile
View file @
3349bd95
...
@@ -24,7 +24,7 @@ end
...
@@ -24,7 +24,7 @@ end
spec
=
Gem
::
Specification
.
new
do
|
s
|
spec
=
Gem
::
Specification
.
new
do
|
s
|
s
.
name
=
'mycard'
s
.
name
=
'mycard'
s
.
version
=
'0.
4.9
'
s
.
version
=
'0.
5.0
'
s
.
extra_rdoc_files
=
[
'README.txt'
,
'LICENSE.txt'
]
s
.
extra_rdoc_files
=
[
'README.txt'
,
'LICENSE.txt'
]
s
.
summary
=
'a card game'
s
.
summary
=
'a card game'
s
.
description
=
s
.
summary
s
.
description
=
s
.
summary
...
...
lib/main.rb
View file @
3349bd95
...
@@ -46,7 +46,7 @@ begin
...
@@ -46,7 +46,7 @@ begin
WM
::
set_caption
(
"MyCard"
,
"MyCard"
)
WM
::
set_caption
(
"MyCard"
,
"MyCard"
)
WM
::
icon
=
Surface
.
load
(
"graphics/system/icon.gif"
)
WM
::
icon
=
Surface
.
load
(
"graphics/system/icon.gif"
)
$screen
=
Screen
.
open
(
$config
[
'screen'
][
'width'
],
$config
[
'screen'
][
'height'
],
0
,
HWSURFACE
|
(
$config
[
'screen'
][
'fullscreen'
]
?
FULLSCREEN
:
0
))
$screen
=
Screen
.
open
(
$config
[
'screen'
][
'width'
],
$config
[
'screen'
][
'height'
],
0
,
HWSURFACE
|
(
$config
[
'screen'
][
'fullscreen'
]
?
FULLSCREEN
:
0
))
Mixer
.
open
(
Mixer
::
DEFAULT_FREQUENCY
,
Mixer
::
DEFAULT_FORMAT
,
Mixer
::
DEFAULT_CHANNELS
,
512
)
Mixer
.
open
(
Mixer
::
DEFAULT_FREQUENCY
,
Mixer
::
DEFAULT_FORMAT
,
Mixer
::
DEFAULT_CHANNELS
,
4096
)
Mixer
.
set_volume_music
(
60
)
Mixer
.
set_volume_music
(
60
)
TTF
.
init
TTF
.
init
Thread
.
abort_on_exception
=
true
Thread
.
abort_on_exception
=
true
...
...
lib/update.rb
View file @
3349bd95
...
@@ -2,7 +2,7 @@ require 'open-uri'
...
@@ -2,7 +2,7 @@ require 'open-uri'
require
"fileutils"
require
"fileutils"
require_relative
'card'
require_relative
'card'
module
Update
module
Update
Version
=
'0.
4.9
'
Version
=
'0.
5.0
'
URL
=
"http://card.touhou.cc/mycard/update.json?version=
#{
Version
}
"
URL
=
"http://card.touhou.cc/mycard/update.json?version=
#{
Version
}
"
class
<<
self
class
<<
self
attr_reader
:thumbnails
,
:images
,
:status
attr_reader
:thumbnails
,
:images
,
:status
...
...
lib/ygocore/user.rb
View file @
3349bd95
...
@@ -13,6 +13,25 @@ class User
...
@@ -13,6 +13,25 @@ class User
@certified
?
[
0
,
0
,
0
]
:
[
128
,
128
,
128
]
@certified
?
[
0
,
0
,
0
]
:
[
128
,
128
,
128
]
end
end
def
space
def
space
Widget_Msgbox
.
new
(
"查看资料"
,
"功能未实现"
,
:ok
=>
"确定"
)
if
@certified
system
(
"start http://card.touhou.cc/users/
#{
CGI
.
escape
@id
.
to_s
}
"
)
else
Widget_Msgbox
.
new
(
"查看资料"
,
"用户
#{
@name
}
没有注册"
,
:ok
=>
"确定"
)
end
end
def
avatar
(
size
=
:small
)
cache
=
"graphics/avatars/mycard_
#{
@id
}
_
#{
size
}
.png"
result
=
Surface
.
load
(
cache
)
rescue
Surface
.
load
(
"graphics/avatars/loading_
#{
size
}
.gif"
)
scene
=
$scene
if
block_given?
yield
result
Thread
.
new
do
require
'cgi'
open
(
"http://card.touhou.cc/users/
#{
CGI
.
escape
@id
.
to_s
}
.png"
,
'rb'
)
{
|
io
|
open
(
cache
,
'wb'
)
{
|
c
|
c
.
write
io
.
read
}}
rescue
cache
=
"graphics/avatars/noavatar_
#{
size
}
.gif"
yield
Surface
.
load
(
cache
)
if
scene
==
$scene
end
else
result
end
end
end
end
end
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