E' disponibili gratuitamente il widget/plugin per il testo ruotato:
Scaricate il widget da qui:
https://livecode.com/extensions/rotated-text/1-0-0/
e poi lo installate premendo il tato + sul finestra dei Tools.
giovedì 29 novembre 2018
mercoledì 28 novembre 2018
Grafica per Android e iOS
Sono disponibili dei pacchetti con pulsanti e altri elementi in stile Android e iOS. Anche se potreste farveli da soli, questo pacchetto vi risparmia un sacco di tempo:
Disponibile al costo € 39, solo per le versioni a pagamento di Livecode
Disponibile al costo € 39, solo per le versioni a pagamento di Livecode
martedì 27 novembre 2018
Livecode 9.0.2 rc1
E' uscita la 9.0.2 RC1, disponibile su: https://downloads.livecode.com/livecode/
lunedì 26 novembre 2018
AnimationEngine open source
Animation engine per livecode è diventato open source:
https://github.com/derbrill/animationEngine
https://github.com/derbrill/animationEngine
sabato 13 ottobre 2018
Immagini scalate prospettivamente
Oggi vediamo un programma per modificare prospetticamente le immagini:
Lo potete scaricare da qui: http://livecodeshare.runrev.com/stack/893
Vi basterà copiare il gruppo hhPoly nella vostra card ed usare il codice:
Semplice no?
Lo potete scaricare da qui: http://livecodeshare.runrev.com/stack/893
Vi basterà copiare il gruppo hhPoly nella vostra card ed usare il codice:
send ("setTarget " & the short name of image miaImmagine) to group "hhPoly"Semplice no?
martedì 11 settembre 2018
Libreria per Poker
Ecco la mia libreria per il gioco del Poker:
on MouseUp #hand notation like: #1c,2d,3h,4s,13s put field "hand" into tHand put analPoint(thand) into field 2end MouseUp
function analPoint tHand sort items of thand numeric by the char 1 to -2 of each repeat with i=1 to 5 put item i of tHand into th[i] end repeat #we must go in order #https://www.pagat.com/poker/rules/ranking.html ###################### #Straight Flush put true into testsuit repeat with i=2 to 5 if the last char of th[i - 1] is not the last char of th[i] then put false into testsuit end repeat if testsuit then #they have the same suit if checkscale(th) then return "Straight Flush: " & maxcard(th,"Straight Flush") end if end if ############################## #Four of a kind put countDup(th) into duplist repeat for each key tKey in duplist if dupList[tKey] = 4 then return "Four of a kind: " & tKey end repeat ############################### #Full House repeat for each key tKey in duplist if dupList[tKey] = 3 then put tkey into FH3 repeat for each key tKey2 in duplist if dupList[tKey2] = 2 then put tkey2 into FH2 return "Full House: " & FH3 & "." & FH2 end if end repeat end if end repeat ############################################## #Flush if testsuit then sort items of thand descending numeric by the char 1 to -2 of each repeat with i=1 to 5 delete the last char of item i of thand end repeat return "Flush: " & thand end if ##################################################### #Straight if checkscale(th) then return "Straight: " & maxcard(th,"Straight") end if ############################# #Three of a Kind repeat for each key tKey in duplist if dupList[tKey] = 3 then put tkey into FH3 return "Three of a Kind: " & FH3 end if end repeat ############################# #Two Pairs repeat for each key tKey in duplist if dupList[tKey] = 2 then put tkey into P1 put 0 into dupList[tKey] repeat for each key tKey2 in duplist if dupList[tKey2] = 2 then put tkey2 into P2 put P1 & comma & P2 into PT sort items of PT descending numeric return "Two Pairs: " & PT end if end repeat end if end repeat ########################### #Pair repeat for each key tKey in duplist if dupList[tKey] = 2 then return "Two Pairs: " & tKey end if end repeat ############################# #Nothing return "Nothing: " & maxcard(th,"Nothing")end analPoint
function countDup th repeat for each element tele in th add 1 to temp[char 1 to -2 of tele] end repeat return tempend countDup function checkScale th #check if it is a scale if checkace(th) and checkKing(th) then put th into th2 #backup put swapace(th) into th #now aces are 14 in value end if #we need to sort again put sortedArray(th) into th put true into test1 repeat with i=2 to 5 if ((char 1 to -2 of th[i-1]) + 1) is not (char 1 to -2 of th[i]) then put false into test1 end repeat return test1end checkscale
function checkAce th put false into test1 repeat for each element tele in th delete the last char of tele if tele = 1 then put true into test1 end repeat return test1end checkace
function checkKing th put false into test1 repeat for each element tele in th delete the last char of tele if tele = 13 then put true into test1 end repeat return test1end checkKing
function SwapAce th repeat with i=1 to 5 if char 1 to -2 of th[i] = 1 then put 14 into char 1 to -2 of th[i] end repeat return thend SwapAce
function sortedArray @pArray # fetch the keys and sort them using the array entry values get the keys of pArray sort lines of it numeric by char 1 to -2 of pArray[each] split it by return # create a new sorted array using the mapped keys put 1 into tNextIndex repeat for each element tIndex in it put pArray[tIndex] into tSortedArray[tNextIndex] add 1 to tNextIndex end repeat return tSortedArrayend sortedArray
function maxcard th, hType switch htype case "Straight" case "Straight Flush" if checkace(th) and checkKing(th) then return "ACE (14)" else return maxcard2(th) end if break case "Nothing" return maxcard2(th) break end switchend maxcard
function maxcard2 th put 0 into temp repeat for each element tele in th if char 1 to -2 of tele > temp then put char 1 to -2 of tele into temp end repeat return tempend maxcard2lunedì 10 settembre 2018
Nuova versione
Il 4 Settembre è stata rilasciata la versione 9.0.1 RC 3. La potete scaricare da qui: https://downloads.livecode.com/livecode/
Tra le novità abbiamo:
Tra le novità abbiamo:
- androidRequestPermission: permette di chiedere all'utente su Android dei permessi temporaneamente.
- nuove funzione per il volume stereo su Mac
- mobileSetFullScreenRectForOrientations
- correzioni di vari bug
Iscriviti a:
Post (Atom)


