Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
R
rd-ygopro
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
苍蓝
rd-ygopro
Commits
26acbf21
Commit
26acbf21
authored
Feb 09, 2019
by
mercury233
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'resize' into test
parents
e0d6739a
9ad0000c
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
39 additions
and
31 deletions
+39
-31
gframe/drawing.cpp
gframe/drawing.cpp
+1
-1
gframe/game.cpp
gframe/game.cpp
+35
-27
gframe/game.h
gframe/game.h
+2
-2
strings.conf
strings.conf
+1
-1
No files found.
gframe/drawing.cpp
View file @
26acbf21
...
...
@@ -1052,7 +1052,7 @@ void Game::DrawThumb(code_pointer cp, position2di pos, std::unordered_map<int, i
if
(
drag
)
{
dragloc
=
recti
(
pos
.
X
,
pos
.
Y
,
pos
.
X
+
CARD_THUMB_WIDTH
*
mainGame
->
xScale
,
pos
.
Y
+
CARD_THUMB_HEIGHT
*
mainGame
->
yScale
);
limitloc
=
recti
(
pos
.
X
,
pos
.
Y
,
pos
.
X
+
20
*
mainGame
->
xScale
,
pos
.
Y
+
20
*
mainGame
->
yScale
);
otloc
=
recti
(
pos
.
X
+
7
,
pos
.
Y
+
50
,
pos
.
X
+
37
*
mainGame
->
xScale
,
pos
.
Y
+
65
*
mainGame
->
yScale
);
otloc
=
recti
(
pos
.
X
+
7
,
pos
.
Y
+
50
*
mainGame
->
yScale
,
pos
.
X
+
37
*
mainGame
->
xScale
,
pos
.
Y
+
65
*
mainGame
->
yScale
);
}
driver
->
draw2DImage
(
img
,
dragloc
,
rect
<
s32
>
(
0
,
0
,
size
.
Width
,
size
.
Height
));
if
(
lflist
->
count
(
lcode
))
{
...
...
gframe/game.cpp
View file @
26acbf21
...
...
@@ -611,14 +611,23 @@ bool Game::Initialize() {
btnStartFilter
->
setRelativePosition
(
rect
<
s32
>
(
260
,
80
+
125
/
6
,
390
,
100
+
125
/
6
));
btnClearFilter
=
env
->
addButton
(
rect
<
s32
>
(
205
,
80
+
125
/
6
,
255
,
100
+
125
/
6
),
wFilter
,
BUTTON_CLEAR_FILTER
,
dataManager
.
GetSysString
(
1304
));
}
wCategories
=
env
->
addWindow
(
rect
<
s32
>
(
6
30
,
60
,
1000
,
270
),
false
,
dataManager
.
strBuffer
);
wCategories
=
env
->
addWindow
(
rect
<
s32
>
(
6
00
,
60
,
1000
,
305
),
false
,
dataManager
.
strBuffer
);
wCategories
->
getCloseButton
()
->
setVisible
(
false
);
wCategories
->
setDrawTitlebar
(
false
);
wCategories
->
setDraggable
(
false
);
wCategories
->
setVisible
(
false
);
btnCategoryOK
=
env
->
addButton
(
rect
<
s32
>
(
135
,
175
,
235
,
200
),
wCategories
,
BUTTON_CATEGORY_OK
,
dataManager
.
GetSysString
(
1211
));
btnCategoryOK
=
env
->
addButton
(
rect
<
s32
>
(
150
,
210
,
250
,
235
),
wCategories
,
BUTTON_CATEGORY_OK
,
dataManager
.
GetSysString
(
1211
));
int
catewidth
=
0
;
for
(
int
i
=
0
;
i
<
32
;
++
i
)
{
irr
::
core
::
dimension2d
<
unsigned
int
>
dtxt
=
mainGame
->
guiFont
->
getDimension
(
dataManager
.
GetSysString
(
1100
+
i
));
if
(
dtxt
.
Width
+
40
>
catewidth
)
catewidth
=
dtxt
.
Width
+
40
;
}
for
(
int
i
=
0
;
i
<
32
;
++
i
)
chkCategory
[
i
]
=
env
->
addCheckBox
(
false
,
recti
(
10
+
(
i
%
4
)
*
90
,
10
+
(
i
/
4
)
*
20
,
100
+
(
i
%
4
)
*
90
,
30
+
(
i
/
4
)
*
20
),
wCategories
,
-
1
,
dataManager
.
GetSysString
(
1100
+
i
));
chkCategory
[
i
]
=
env
->
addCheckBox
(
false
,
recti
(
10
+
(
i
%
4
)
*
catewidth
,
5
+
(
i
/
4
)
*
25
,
10
+
(
i
%
4
+
1
)
*
catewidth
,
5
+
(
i
/
4
+
1
)
*
25
),
wCategories
,
-
1
,
dataManager
.
GetSysString
(
1100
+
i
));
int
wcatewidth
=
catewidth
*
4
+
16
;
wCategories
->
setRelativePosition
(
rect
<
s32
>
(
1000
-
wcatewidth
,
60
,
1000
,
305
));
btnCategoryOK
->
setRelativePosition
(
recti
(
wcatewidth
/
2
-
50
,
210
,
wcatewidth
/
2
+
50
,
235
));
btnMarksFilter
=
env
->
addButton
(
rect
<
s32
>
(
60
,
80
+
125
/
6
,
190
,
100
+
125
/
6
),
wFilter
,
BUTTON_MARKS_FILTER
,
dataManager
.
GetSysString
(
1374
));
wLinkMarks
=
env
->
addWindow
(
rect
<
s32
>
(
700
,
30
,
820
,
150
),
false
,
dataManager
.
strBuffer
);
wLinkMarks
->
getCloseButton
()
->
setVisible
(
false
);
...
...
@@ -1552,7 +1561,13 @@ void Game::OnResize() {
btnClearFilter
->
setRelativePosition
(
Resize
(
205
,
80
+
125
/
6
,
255
,
100
+
125
/
6
));
btnMarksFilter
->
setRelativePosition
(
Resize
(
60
,
80
+
125
/
6
,
190
,
100
+
125
/
6
));
wCategories
->
setRelativePosition
(
ResizeWin
(
450
,
60
,
1000
,
270
));
recti
btncatepos
=
btnEffectFilter
->
getAbsolutePosition
();
wCategories
->
setRelativePosition
(
recti
(
btncatepos
.
LowerRightCorner
.
X
-
wCategories
->
getRelativePosition
().
getWidth
(),
btncatepos
.
LowerRightCorner
.
Y
-
btncatepos
.
getHeight
()
/
2
,
btncatepos
.
LowerRightCorner
.
X
,
btncatepos
.
LowerRightCorner
.
Y
-
btncatepos
.
getHeight
()
/
2
+
245
));
wLinkMarks
->
setRelativePosition
(
ResizeWin
(
700
,
30
,
820
,
150
));
stBanlist
->
setRelativePosition
(
Resize
(
10
,
9
,
100
,
29
));
stDeck
->
setRelativePosition
(
Resize
(
10
,
39
,
100
,
59
));
...
...
@@ -1591,7 +1606,8 @@ void Game::OnResize() {
wANAttribute
->
setRelativePosition
(
ResizeWin
(
500
,
200
,
830
,
285
));
wANRace
->
setRelativePosition
(
ResizeWin
(
480
,
200
,
850
,
410
));
wReplaySave
->
setRelativePosition
(
ResizeWin
(
510
,
200
,
820
,
320
));
stHintMsg
->
setRelativePosition
(
ResizeWin
(
500
,
60
,
820
,
90
));
stHintMsg
->
setRelativePosition
(
ResizeWin
(
660
-
160
*
xScale
,
60
,
660
+
160
*
xScale
,
90
));
//sound / music volume bar
scrSoundVolume
->
setRelativePosition
(
recti
(
scrSoundVolume
->
getRelativePosition
().
UpperLeftCorner
.
X
,
scrSoundVolume
->
getRelativePosition
().
UpperLeftCorner
.
Y
,
20
+
(
300
*
xScale
)
-
70
,
scrSoundVolume
->
getRelativePosition
().
LowerRightCorner
.
Y
));
...
...
@@ -1637,8 +1653,8 @@ void Game::OnResize() {
btnReset
->
setRelativePosition
(
recti
(
1
,
1
,
width
,
height
));
}
wCardImg
->
setRelativePosition
(
ResizeCard
(
1
,
1
,
20
,
18
));
imgCard
->
setRelativePosition
(
ResizeCard
(
10
,
9
,
0
,
0
));
wCardImg
->
setRelativePosition
(
ResizeCard
ImgWin
(
1
,
1
,
20
,
18
));
imgCard
->
setRelativePosition
(
ResizeCard
ImgWin
(
10
,
9
,
0
,
0
));
wInfos
->
setRelativePosition
(
Resize
(
1
,
275
,
301
,
639
));
stName
->
setRelativePosition
(
recti
(
10
,
10
,
300
*
xScale
-
13
,
10
+
22
));
lstLog
->
setRelativePosition
(
Resize
(
10
,
10
,
290
,
290
));
...
...
@@ -1652,7 +1668,7 @@ void Game::OnResize() {
btnM2
->
setRelativePosition
(
Resize
(
160
,
0
,
210
,
20
));
btnEP
->
setRelativePosition
(
Resize
(
320
,
0
,
370
,
20
));
wChat
->
setRelativePosition
(
ResizeWin
(
wInfos
->
getRelativePosition
().
LowerRightCorner
.
X
+
6
,
615
,
1020
,
640
,
true
));
wChat
->
setRelativePosition
(
recti
(
wInfos
->
getRelativePosition
().
LowerRightCorner
.
X
+
6
,
window_size
.
Height
-
25
,
window_size
.
Width
,
window_size
.
Height
));
ebChatInput
->
setRelativePosition
(
recti
(
3
,
2
,
window_size
.
Width
-
wChat
->
getRelativePosition
().
UpperLeftCorner
.
X
-
6
,
22
));
btnLeaveGame
->
setRelativePosition
(
Resize
(
205
,
5
,
295
,
80
));
...
...
@@ -1695,19 +1711,13 @@ position2di Game::ResizeReverse(s32 x, s32 y) {
y
=
y
/
yScale
;
return
position2di
(
x
,
y
);
}
recti
Game
::
ResizeWin
(
s32
x
,
s32
y
,
s32
x2
,
s32
y2
,
bool
chat
)
{
s32
sx
=
x2
-
x
;
s32
sy
=
y2
-
y
;
if
(
chat
)
{
y
=
window_size
.
Height
-
sy
;
x2
=
window_size
.
Width
;
y2
=
y
+
sy
;
return
recti
(
x
,
y
,
x2
,
y2
);
}
x
=
(
x
+
sx
/
2
)
*
xScale
-
sx
/
2
;
y
=
(
y
+
sy
/
2
)
*
yScale
-
sy
/
2
;
x2
=
sx
+
x
;
y2
=
sy
+
y
;
recti
Game
::
ResizeWin
(
s32
x
,
s32
y
,
s32
x2
,
s32
y2
)
{
s32
w
=
x2
-
x
;
s32
h
=
y2
-
y
;
x
=
(
x
+
w
/
2
)
*
xScale
-
w
/
2
;
y
=
(
y
+
h
/
2
)
*
yScale
-
h
/
2
;
x2
=
w
+
x
;
y2
=
h
+
y
;
return
recti
(
x
,
y
,
x2
,
y2
);
}
recti
Game
::
ResizePhaseHint
(
s32
x
,
s32
y
,
s32
x2
,
s32
y2
,
s32
width
)
{
...
...
@@ -1717,17 +1727,15 @@ recti Game::ResizePhaseHint(s32 x, s32 y, s32 x2, s32 y2, s32 width) {
y2
=
y2
*
yScale
;
return
recti
(
x
,
y
,
x2
,
y2
);
}
recti
Game
::
ResizeCard
(
s32
x
,
s32
y
,
s32
x2
,
s32
y2
)
{
recti
Game
::
ResizeCard
ImgWin
(
s32
x
,
s32
y
,
s32
mx
,
s32
my
)
{
float
mul
=
xScale
;
if
(
xScale
>
yScale
)
mul
=
yScale
;
s32
sx
=
CARD_IMG_WIDTH
*
mul
+
x2
*
xScale
;
s32
sy
=
CARD_IMG_HEIGHT
*
mul
+
y2
*
yScale
;
s32
w
=
CARD_IMG_WIDTH
*
mul
+
mx
*
xScale
;
s32
h
=
CARD_IMG_HEIGHT
*
mul
+
my
*
yScale
;
x
=
x
*
xScale
;
y
=
y
*
yScale
;
x2
=
sx
+
x
;
y2
=
sy
+
y
;
return
recti
(
x
,
y
,
x2
,
y2
);
return
recti
(
x
,
y
,
x
+
w
,
y
+
h
);
}
recti
Game
::
ResizeCardHint
(
s32
x
,
s32
y
,
s32
x2
,
s32
y2
)
{
return
ResizeCardMid
(
x
,
y
,
x2
,
y2
,
(
x
+
x2
)
*
0.5
,
(
y
+
y2
)
*
0.5
);
...
...
gframe/game.h
View file @
26acbf21
...
...
@@ -161,8 +161,8 @@ public:
position2di
Resize
(
s32
x
,
s32
y
);
position2di
ResizeReverse
(
s32
x
,
s32
y
);
recti
ResizePhaseHint
(
s32
x
,
s32
y
,
s32
x2
,
s32
y2
,
s32
width
);
recti
ResizeWin
(
s32
x
,
s32
y
,
s32
x2
,
s32
y2
,
bool
chat
=
false
);
recti
ResizeCard
(
s32
x
,
s32
y
,
s32
x2
,
s32
y2
);
recti
ResizeWin
(
s32
x
,
s32
y
,
s32
x2
,
s32
y2
);
recti
ResizeCard
ImgWin
(
s32
x
,
s32
y
,
s32
mx
,
s32
my
);
recti
ResizeCardHint
(
s32
x
,
s32
y
,
s32
x2
,
s32
y2
);
position2di
ResizeCardHint
(
s32
x
,
s32
y
);
recti
ResizeCardMid
(
s32
x
,
s32
y
,
s32
x2
,
s32
y2
,
s32
midx
,
s32
midy
);
...
...
strings.conf
View file @
26acbf21
...
...
@@ -850,7 +850,7 @@
!
setname
0
xd4
伯吉斯异兽 バージェストマ
!
setname
0
xd5
但丁 ダンテ
!
setname
0
xd6
破坏剑 破壊剣
!
setname
0
xd7
巴斯达·布雷达
バスター・ブレイダー
!
setname
0
xd7
破坏之剑士
バスター・ブレイダー
!
setname
0
xd8
雾动机龙 ダイナミスト
!
setname
0
xd9
不知火
!
setname
0
x10d9
妖刀-不知火 妖刀-不知火
...
...
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