Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Bastien Terrier
xeyes_sentences
Commits
038a54ca
Commit
038a54ca
authored
May 24, 2018
by
Bastien Terrier
Browse files
fix horizontal screen overflow v1
parent
7c16b03e
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/functions.py
View file @
038a54ca
...
...
@@ -13,6 +13,7 @@ def displayCharacter(f_dataStream, char):
f_dataStream
.
write
(
"#Character {}
\n
"
.
format
(
char
))
global
global_x_pos
global
global_y_pos
local_y_pos
=
global_y_pos
...
...
@@ -32,6 +33,11 @@ def displayCharacter(f_dataStream, char):
global_x_pos
=
global_x_pos
-
(
i_cptColum
+
1
)
*
i_xeyes_size
#+1 for space beetween characters
#if end of line
if
global_x_pos
<
i_margin
:
global_y_pos
+=
6
*
i_xeyes_size
#start new line
global_x_pos
=
i_screen_width
-
i_margin
#from the beginning
##############################
def
displaySentence
(
sentence
):
...
...
src/resources.py
View file @
038a54ca
...
...
@@ -13,7 +13,9 @@ else:
s_xeyes_command
=
"xeyes -geometry {0}x{0}-"
.
format
(
i_xeyes_size
)
global_x_pos
=
i_screen_width
-
50
i_margin
=
100
global_x_pos
=
i_screen_width
-
i_margin
global_y_pos
=
300
local_x_pos
=
0
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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