Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
SimRA
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Guilhem Gamard
SimRA
Commits
39b664ae
Commit
39b664ae
authored
5 years ago
by
Guilhem Gamard
Browse files
Options
Downloads
Patches
Plain Diff
First effort for GUI
parent
93af8ea9
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
gui.py
+27
-0
27 additions, 0 deletions
gui.py
with
27 additions
and
0 deletions
gui.py
0 → 100644
+
27
−
0
View file @
39b664ae
import
simra
# ################################################################
# This is not working code yet, it's just here for my own future reference.
def
button_press
(
event
):
print
(
"
clicked at ({},{})
"
.
format
(
event
.
x
,
event
.
y
))
def
button_release
(
event
):
print
(
"
Released at ({},{})
"
.
format
(
event
.
x
,
event
.
y
))
def
main
():
window
=
Tk
()
window
.
title
(
"
SIMulateur de Réseau d
'
Automates
"
)
canvas
=
Canvas
(
window
)
canvas
.
create_rectangle
(
128
,
64
,
32
,
32
,
outline
=
"
#ff0000
"
,
fill
=
"
#aaaaaa
"
)
canvas
.
bind
(
"
<Button-1>
"
,
button_press
)
canvas
.
bind
(
"
<ButtonRelease-1>
"
,
button_release
)
canvas
.
pack
(
fill
=
BOTH
,
expand
=
1
)
window
.
mainloop
()
if
__name__
==
'
__main__
'
:
main
()
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment