added dlocate() example
This commit is contained in:
parent
6fb9af41d0
commit
73840a0e79
|
@ -1,5 +1,5 @@
|
|||
TODO:
|
||||
- make example for "dlocate()".
|
||||
- resolve dlocate() bug (see https://git.planet-casio.com/VFD/Gintxx/issues/1)
|
||||
- add "dmenu()" function
|
||||
- make dlimage more fancier in some way, idk
|
||||
- start CG version
|
||||
|
|
|
@ -1,19 +1,19 @@
|
|||
// dbar() creates a bar in which you can choose how much of the bar is full (in percents)
|
||||
// You can use dbar() for displaying th HP or health of a player in a game.
|
||||
// Example:
|
||||
# dbar() creates a bar in which you can choose how much of the bar is full (in percents)
|
||||
# You can use dbar() for displaying th HP or health of a player in a game.
|
||||
# Example:
|
||||
|
||||
from gint import * //importing gint
|
||||
from gintpp import * //importing gint++
|
||||
import time as t //importing the time module
|
||||
from gint import * # importing gint
|
||||
from gintpp import * # importing gint++
|
||||
import time as t # importing the time module
|
||||
|
||||
x = 25
|
||||
y = 19 //defining the coordinates of the bar
|
||||
y = 19 # defining the coordinates of the bar
|
||||
|
||||
length = 10 //defining the length of the bar
|
||||
p = 50 //defining how many percent of the bar is full
|
||||
length = 10 # defining the length of the bar
|
||||
p = 50 # defining how many percent of the bar is full
|
||||
|
||||
dclear(C_WHITE) //clearing the screen
|
||||
dbar(x, y, length, p) //putting all the parameters in
|
||||
dupdate() //displaying everything
|
||||
dclear(C_WHITE) # clearing the screen
|
||||
dbar(x, y, length, p) # putting all the parameters in
|
||||
dupdate() # displaying everything
|
||||
|
||||
t.sleep(3) //waiting for 3 seconds
|
||||
t.sleep(3) # waiting for 3 seconds
|
|
@ -1,3 +1,6 @@
|
|||
# dlimage() draws an image with a list of strings.
|
||||
# Example:
|
||||
|
||||
from gintpp import * # importing the module
|
||||
|
||||
x = 13 # create the x coordinate variable
|
||||
|
|
13
examples/english/Python/dlocate.py
Normal file
13
examples/english/Python/dlocate.py
Normal file
|
@ -0,0 +1,13 @@
|
|||
# dlocate() is a function just like the C.Basic/Basic Casio one where you can display text.
|
||||
# The top left corner is (1:1) and the bottom right is (8,21).
|
||||
# Example:
|
||||
|
||||
from gint import *
|
||||
from gintpp import *
|
||||
import time as t # importing the modules
|
||||
|
||||
dclear(C_WHITE) # clearing the screen
|
||||
dlocate(1,1,"I'm using gint++!") # using the dlocate() function
|
||||
|
||||
dupdate() # showing everything
|
||||
t.sleep(3) # waiting for 3 seconds
|
13
examples/français/Python/dlocate.py
Normal file
13
examples/français/Python/dlocate.py
Normal file
|
@ -0,0 +1,13 @@
|
|||
# dlocate() est une fonction comme celle de C.Basic/Basic Casio qui permet d'afficher du text.
|
||||
# Le coin en haut a gauche a pour coordonnée (1:1) et le coin en bas a droite est (8,21).
|
||||
# Exemple:
|
||||
|
||||
from gint import *
|
||||
from gintpp import *
|
||||
import time as t # on importe les modules
|
||||
|
||||
dclear(C_WHITE) # on éfface l'écran
|
||||
dlocate(1,1,"I'm using gint++!") # on appele la fonction dlocate()
|
||||
|
||||
dupdate() # on affiche tout
|
||||
t.sleep(3) # et on attends 3 secondes avant de quitter
|
Loading…
Reference in a new issue