Scolring - Forum

Entraides et échanges autour de la technologie Scol - Informations and exchanges on the Scol technology

Vous pouvez changer la langue de l'interface une fois inscrit - You can change the language once registered

You are not logged in.

#1 24-Jun-2014 13:27:59

el_motoblock
Member
From: Russia
Registered: 16-Feb-2013
Posts: 270

value for GUI at keys

https://yadi.sk/d/FZqRfzLNUgtzn (archive with the project and needed files)
I want to understand the logic circuit

key pressed ---> set +1 to value --> value added to number in the text the text ----> text sets label at unactive button adapted to gui money
$ 0(at default)
Wa50fl8dmGLXwfWFKCNy55i1PRHds8xtDPTo1W7MV_ZpfbpTuxs6cL_ZeozfddKc3wzXe3xHAvuLe9fGj9aoMw==?uid=116360906&filename=32553466666.jpg&disposition=inline&hash=&limit=0&content_type=image%2Fjpeg&rtoken=7275bb9a440918201ce1e3213fff0df6&rtimestamp=53a96e9d&force_default=yes

Offline

#2 24-Jun-2014 16:08:20

arkeon
Admin. / Scol language & OpenSpace3D developer
From: Nantes
Registered: 30-Mar-2009
Posts: 5,091
Website

Re: value for GUI at keys

I can't unzip the file, must be corrupt.

what is the question ?

Offline

#3 24-Jun-2014 16:10:55

el_motoblock
Member
From: Russia
Registered: 16-Feb-2013
Posts: 270

Re: value for GUI at keys

compressed with 7zip (compression)

Offline

#4 24-Jun-2014 16:29:00

arkeon
Admin. / Scol language & OpenSpace3D developer
From: Nantes
Registered: 30-Mar-2009
Posts: 5,091
Website

Re: value for GUI at keys

Ok

use a var plugIT

key+1 -> var price.Increment "1" in the link parameter
key-1 -> var price.Decrement "1" in the link parameter
key0 -> var price.Set value "0" in the link parameter

var price.Modified -> money.Set label "$$1" it will write $24 $1 is the parameter value

Don't forget to check "no repeat on key down" on keyboad plugIT

Offline

#5 25-Jun-2014 02:51:13

el_motoblock
Member
From: Russia
Registered: 16-Feb-2013
Posts: 270

Re: value for GUI at keys

https://yadi.sk/d/k3W9e3vzUmSi7
possible to separate from the $ sign digits?
not very successful
sorry for stupidity

Last edited by el_motoblock (25-Jun-2014 02:56:51)

Offline

#6 25-Jun-2014 08:11:10

arkeon
Admin. / Scol language & OpenSpace3D developer
From: Nantes
Registered: 30-Mar-2009
Posts: 5,091
Website

Re: value for GUI at keys

Hi !

you should understand better once the OS3D book will be out ^^

first set the default value of the var plugIT to "Int" "0"

then double click on links and set "1" value to increment / decrement links and "0" for set 0 link

this is only what you missing

Offline

#7 26-Jun-2014 03:11:04

el_motoblock
Member
From: Russia
Registered: 16-Feb-2013
Posts: 270

Re: value for GUI at keys

how can I make the threshold for minus values? (if value "inferior or equals -1" then set $0)
https://yadi.sk/d/awBBLgVtUum7u

Last edited by el_motoblock (26-Jun-2014 03:14:55)

Offline

#8 26-Jun-2014 15:03:30

arkeon
Admin. / Scol language & OpenSpace3D developer
From: Nantes
Registered: 30-Mar-2009
Posts: 5,091
Website

Re: value for GUI at keys

With the misc If plugIT.
set the default value to Int 0
change the link from
var price.Modified -> money.Set label "$$1" it will write $24 $1 is the parameter value

to
var price.Modified -> If.Inferior
If.True -> money.Set label "$$1"
If.False -> money.Set label "$0"

Offline

#9 27-Jun-2014 04:22:18

el_motoblock
Member
From: Russia
Registered: 16-Feb-2013
Posts: 270

Re: value for GUI at keys

U5ntW-dVLZHMyTyUBspKAjcS6olrdXFN0KNI9Hby-xGadSfHs7LWXFYNc2o31aaTW6UaOEpLAySUTNJXnrJhcA==?uid=116360906&filename=авыва.jpg&disposition=inline&hash=&limit=0&content_type=image%2Fjpeg&rtoken=472073c2aeadfb1dc5071d5c534b4e86&rtimestamp=53ace427&force_default=yes
could not figure out how to GET/SET value to misc If PlugIT
https://yadi.sk/d/P4wTw_xZV3PsG

Last edited by el_motoblock (27-Jun-2014 04:25:56)

Offline

#10 27-Jun-2014 08:03:45

arkeon
Admin. / Scol language & OpenSpace3D developer
From: Nantes
Registered: 30-Mar-2009
Posts: 5,091
Website

Re: value for GUI at keys

Ok let's do it another way.

in the "If money" plugIT
set the default value to "0" (you set "<=0")

add the links
var price.Modified -> If money.Inferior
If money.True -> price.Set value "0"

so when the var price is < 0 the var is set to 0

Offline

#11 28-Jun-2014 17:14:06

el_motoblock
Member
From: Russia
Registered: 16-Feb-2013
Posts: 270

Re: value for GUI at keys

tranks. all works normal.

where is there a place in the forum where you can upload code pieces and resources(for example)?

Last edited by el_motoblock (28-Jun-2014 17:14:49)

Offline

#12 28-Jun-2014 19:35:04

arkeon
Admin. / Scol language & OpenSpace3D developer
From: Nantes
Registered: 30-Mar-2009
Posts: 5,091
Website

Re: value for GUI at keys

hmm there is not but good idea, you can create a new post for it we will make it as sticky
No idea for upload hmm

Offline

Board footer

Powered by FluxBB