Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
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
videolan
vlc
Commits
9b4e33b4
Commit
9b4e33b4
authored
Apr 11, 2003
by
VideoLAN
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* Fixed bug: When button or checkbox are disabled, the previous control can't
take the hand
parent
c31926a0
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
37 additions
and
26 deletions
+37
-26
modules/gui/skins/controls/button.cpp
modules/gui/skins/controls/button.cpp
+26
-18
modules/gui/skins/controls/checkbox.cpp
modules/gui/skins/controls/checkbox.cpp
+8
-6
modules/gui/skins/controls/image.cpp
modules/gui/skins/controls/image.cpp
+3
-2
No files found.
modules/gui/skins/controls/button.cpp
View file @
9b4e33b4
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* button.cpp: Button control
* button.cpp: Button control
*****************************************************************************
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* Copyright (C) 2003 VideoLAN
* $Id: button.cpp,v 1.
4 2003/03/20 09:29:07 karibu
Exp $
* $Id: button.cpp,v 1.
5 2003/04/11 21:19:49 videolan
Exp $
*
*
* Authors: Olivier Teulire <ipkiss@via.ecp.fr>
* Authors: Olivier Teulire <ipkiss@via.ecp.fr>
* Emmanuel Puig <karibu@via.ecp.fr>
* Emmanuel Puig <karibu@via.ecp.fr>
...
@@ -134,16 +134,20 @@ void ControlButton::Draw( int x, int y, int w, int h, Graphics *dest )
...
@@ -134,16 +134,20 @@ void ControlButton::Draw( int x, int y, int w, int h, Graphics *dest )
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
bool
ControlButton
::
MouseUp
(
int
x
,
int
y
,
int
button
)
bool
ControlButton
::
MouseUp
(
int
x
,
int
y
,
int
button
)
{
{
if
(
!
Enabled
)
// If hit in the button
return
false
;
if
(
Img
[
1
]
->
Hit
(
x
-
Left
,
y
-
Top
)
)
if
(
Img
[
1
]
->
Hit
(
x
-
Left
,
y
-
Top
)
&&
button
==
1
&&
Selected
)
{
{
State
=
1
;
if
(
!
Enabled
)
Selected
=
false
;
return
true
;
ClickAction
->
SendEvent
();
ParentWindow
->
Refresh
(
Left
,
Top
,
Width
,
Height
);
if
(
button
==
1
&&
Selected
)
return
true
;
{
State
=
1
;
Selected
=
false
;
ClickAction
->
SendEvent
();
ParentWindow
->
Refresh
(
Left
,
Top
,
Width
,
Height
);
return
true
;
}
}
}
if
(
button
==
1
)
if
(
button
==
1
)
...
@@ -154,16 +158,20 @@ bool ControlButton::MouseUp( int x, int y, int button )
...
@@ -154,16 +158,20 @@ bool ControlButton::MouseUp( int x, int y, int button )
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
bool
ControlButton
::
MouseDown
(
int
x
,
int
y
,
int
button
)
bool
ControlButton
::
MouseDown
(
int
x
,
int
y
,
int
button
)
{
{
if
(
!
Enabled
)
if
(
Img
[
0
]
->
Hit
(
x
-
Left
,
y
-
Top
)
)
return
false
;
if
(
Img
[
0
]
->
Hit
(
x
-
Left
,
y
-
Top
)
&&
button
==
1
)
{
{
State
=
0
;
if
(
!
Enabled
)
Selected
=
true
;
return
true
;
ParentWindow
->
Refresh
(
Left
,
Top
,
Width
,
Height
);
return
true
;
if
(
button
==
1
)
{
State
=
0
;
Selected
=
true
;
ParentWindow
->
Refresh
(
Left
,
Top
,
Width
,
Height
);
return
true
;
}
}
}
return
false
;
return
false
;
}
}
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
...
...
modules/gui/skins/controls/checkbox.cpp
View file @
9b4e33b4
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* checkbox.cpp: Checkbox control
* checkbox.cpp: Checkbox control
*****************************************************************************
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* Copyright (C) 2003 VideoLAN
* $Id: checkbox.cpp,v 1.
2 2003/03/19 17:14:50 karibu
Exp $
* $Id: checkbox.cpp,v 1.
3 2003/04/11 21:19:49 videolan
Exp $
*
*
* Authors: Olivier Teulire <ipkiss@via.ecp.fr>
* Authors: Olivier Teulire <ipkiss@via.ecp.fr>
* Emmanuel Puig <karibu@via.ecp.fr>
* Emmanuel Puig <karibu@via.ecp.fr>
...
@@ -199,8 +199,9 @@ void ControlCheckBox::Draw( int x, int y, int w, int h, Graphics *dest )
...
@@ -199,8 +199,9 @@ void ControlCheckBox::Draw( int x, int y, int w, int h, Graphics *dest )
bool
ControlCheckBox
::
MouseUp
(
int
x
,
int
y
,
int
button
)
bool
ControlCheckBox
::
MouseUp
(
int
x
,
int
y
,
int
button
)
{
{
// Test enabled
// Test enabled
if
(
(
!
Enabled1
&&
Act
==
1
)
||
(
!
Enabled2
&&
Act
==
2
)
)
if
(
(
!
Enabled1
&&
Act
==
1
&&
Img
[
1
]
->
Hit
(
x
-
Left
,
y
-
Top
)
)
||
return
false
;
(
!
Enabled2
&&
Act
==
2
&&
Img
[
3
]
->
Hit
(
x
-
Left
,
y
-
Top
)
)
)
return
true
;
if
(
button
==
1
&&
Selected
)
if
(
button
==
1
&&
Selected
)
{
{
...
@@ -229,10 +230,11 @@ bool ControlCheckBox::MouseUp( int x, int y, int button )
...
@@ -229,10 +230,11 @@ bool ControlCheckBox::MouseUp( int x, int y, int button )
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
bool
ControlCheckBox
::
MouseDown
(
int
x
,
int
y
,
int
button
)
bool
ControlCheckBox
::
MouseDown
(
int
x
,
int
y
,
int
button
)
{
{
// Test enabled
if
(
(
!
Enabled1
&&
Act
==
1
)
||
(
!
Enabled2
&&
Act
==
2
)
)
return
false
;
// Test enabled
if
(
(
!
Enabled1
&&
Act
==
1
&&
Img
[
1
]
->
Hit
(
x
-
Left
,
y
-
Top
)
)
||
(
!
Enabled2
&&
Act
==
2
&&
Img
[
3
]
->
Hit
(
x
-
Left
,
y
-
Top
)
)
)
return
true
;
if
(
button
==
1
)
if
(
button
==
1
)
{
{
if
(
Act
==
1
&&
Img
[
0
]
->
Hit
(
x
-
Left
,
y
-
Top
)
)
if
(
Act
==
1
&&
Img
[
0
]
->
Hit
(
x
-
Left
,
y
-
Top
)
)
...
...
modules/gui/skins/controls/image.cpp
View file @
9b4e33b4
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* image.cpp: Image control
* image.cpp: Image control
*****************************************************************************
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* Copyright (C) 2003 VideoLAN
* $Id: image.cpp,v 1.
1 2003/03/18 02:21:47 ipkiss
Exp $
* $Id: image.cpp,v 1.
2 2003/04/11 21:19:49 videolan
Exp $
*
*
* Authors: Olivier Teulire <ipkiss@via.ecp.fr>
* Authors: Olivier Teulire <ipkiss@via.ecp.fr>
* Emmanuel Puig <karibu@via.ecp.fr>
* Emmanuel Puig <karibu@via.ecp.fr>
...
@@ -95,7 +95,8 @@ bool ControlImage::MouseDown( int x, int y, int button )
...
@@ -95,7 +95,8 @@ bool ControlImage::MouseDown( int x, int y, int button )
{
{
if
(
!
Enabled
||
!
Img
[
0
]
->
Hit
(
x
-
Left
,
y
-
Top
)
||
button
!=
1
||
if
(
!
Enabled
||
!
Img
[
0
]
->
Hit
(
x
-
Left
,
y
-
Top
)
||
button
!=
1
||
!
MouseDownAction
->
SendEvent
()
)
!
MouseDownAction
->
SendEvent
()
)
return
false
;
return
false
;
return
true
;
return
true
;
}
}
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
...
...
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