Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro-2pick
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
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
MyCard
ygopro-2pick
Commits
7eb2e82e
Commit
7eb2e82e
authored
Jun 08, 2019
by
mercury233
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rename
parent
9d527361
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
gframe/CGUIImageButton.cpp
gframe/CGUIImageButton.cpp
+3
-3
gframe/CGUIImageButton.h
gframe/CGUIImageButton.h
+1
-1
No files found.
gframe/CGUIImageButton.cpp
View file @
7eb2e82e
...
...
@@ -97,7 +97,7 @@ void Draw2DImageQuad(video::IVideoDriver* driver, video::ITexture* image, core::
CGUIImageButton
::
CGUIImageButton
(
IGUIEnvironment
*
environment
,
IGUIElement
*
parent
,
s32
id
,
core
::
rect
<
s32
>
rectangle
)
:
CGUIButton
(
environment
,
parent
,
id
,
rectangle
)
{
isDrawImage
=
true
;
isFixSize
=
false
;
isFix
ed
Size
=
false
;
imageRotation
=
0.0
f
;
imageScale
=
core
::
vector2df
(
1.0
f
,
1.0
f
);
imageSize
=
core
::
dimension2di
(
rectangle
.
getWidth
(),
rectangle
.
getHeight
());
...
...
@@ -141,7 +141,7 @@ void CGUIImageButton::setImage(video::ITexture* image)
Image
=
image
;
if
(
image
)
{
ImageRect
=
core
::
rect
<
s32
>
(
core
::
position2d
<
s32
>
(
0
,
0
),
image
->
getOriginalSize
());
if
(
isFixSize
)
if
(
isFix
ed
Size
)
imageScale
=
core
::
vector2df
((
irr
::
f32
)
imageSize
.
Width
/
image
->
getSize
().
Width
,
(
irr
::
f32
)
imageSize
.
Height
/
image
->
getSize
().
Height
);
}
...
...
@@ -158,7 +158,7 @@ void CGUIImageButton::setImageScale(core::vector2df s) {
imageScale
=
s
;
}
void
CGUIImageButton
::
setImageSize
(
core
::
dimension2di
s
)
{
isFixSize
=
true
;
isFix
ed
Size
=
true
;
imageSize
=
s
;
}
...
...
gframe/CGUIImageButton.h
View file @
7eb2e82e
...
...
@@ -27,7 +27,7 @@ public:
private:
bool
isDrawImage
;
bool
isFixSize
;
bool
isFix
ed
Size
;
f32
imageRotation
;
core
::
vector2df
imageScale
;
core
::
dimension2di
imageSize
;
...
...
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