Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Clark Lin
hw3d
Commits
7dccdd3a
Commit
7dccdd3a
authored
Feb 03, 2019
by
chili
Browse files
test mouse optional event sys
parent
831090e4
Changes
1
Hide whitespace changes
Inline
Side-by-side
hw3d/App.cpp
View file @
7dccdd3a
#include "App.h"
#include "App.h"
#include <sstream>
App
::
App
()
App
::
App
()
:
:
...
@@ -21,6 +22,20 @@ int App::Go()
...
@@ -21,6 +22,20 @@ int App::Go()
void
App
::
DoFrame
()
void
App
::
DoFrame
()
{
{
while
(
const
auto
e
=
wnd
.
mouse
.
Read
()
)
{
switch
(
e
->
GetType
()
)
{
case
Mouse
::
Event
::
Type
::
Move
:
{
std
::
ostringstream
oss
;
oss
<<
"Mouse moved to: ("
<<
e
->
GetPosX
()
<<
","
<<
e
->
GetPosY
()
<<
")
\n
"
;
wnd
.
SetTitle
(
oss
.
str
()
);
break
;
}
}
}
const
float
c
=
sin
(
timer
.
Peek
()
)
/
2.0
f
+
0.5
f
;
const
float
c
=
sin
(
timer
.
Peek
()
)
/
2.0
f
+
0.5
f
;
wnd
.
Gfx
().
ClearBuffer
(
c
,
c
,
1.0
f
);
wnd
.
Gfx
().
ClearBuffer
(
c
,
c
,
1.0
f
);
wnd
.
Gfx
().
DrawTestTriangle
();
wnd
.
Gfx
().
DrawTestTriangle
();
...
...
Ghost User
@ghost
mentioned in commit
06326223
·
Mar 22, 2023
mentioned in commit
06326223
mentioned in commit 06326223457000026a08ede576aacbf810c22482
Toggle commit list
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