Les membres ayant 30 points peuvent parler sur les canaux annonces, projets et hs du chat.
La shoutbox n'est pas chargée par défaut pour des raisons de performances. Cliquez pour charger.

Forum Casio - Autres questions


Index du Forum » Autres questions » Functions inside of Run-Matrix on the fx-CG50
Capd Hors ligne Membre Points: 6 Défis: 0 Message

Functions inside of Run-Matrix on the fx-CG50

Posté le 29/03/2025 12:57

I am attempting create a function inside of Run-Matrix on the fx-CG50 similar to how Conversion add-in works on the calculator by clicking (OPTN ⇒ F6 ⇒ F6 ⇒ F3) when inside of Run-Matrix so I can get a popup on screen again similar to Conversion (I have attached a picture to show what I mean) add-in but I don't know how to put it into Run-Matrix I was guessing that this code may be right but I am not too sure

#include <fxcg/display.h>
#include <fxcg/keyboard.h>
#include <fxcg/system.h>
#include <fxcg/app.h>

void show_popup() {
Bdisp_EnableColor(1);
Bdisp_AllClr_DDVRAM();

int x1 = 50, y1 = 30, x2 = 270, y2 = 100;
Bdisp_DrawLineVRAM(x1, y1, x2, y1);
Bdisp_DrawLineVRAM(x1, y2, x2, y2);
Bdisp_DrawLineVRAM(x1, y1, x1, y2);
Bdisp_DrawLineVRAM(x2, y1, x2, y2);

PrintXY(60, 60, "2", TEXT_MODE_NORMAL, TEXT_COLOR_BLACK);
PrintXY(140, 60, "3", TEXT_MODE_NORMAL, TEXT_COLOR_BLACK);
PrintXY(220, 60, "4", TEXT_MODE_NORMAL, TEXT_COLOR_BLACK);

Bdisp_PutDisp_DD();

int key;
while(!GetKey(&key));
Bdisp_AllClr_DDVRAM();
Bdisp_PutDisp_DD();
}

int main() {

if (GetAppID() != APPID_RUN_MATRIX) { //potentially so its in Run-Matrix??
return 1;
}

int key;
int step = 0;

while(1) {
GetKey(&key);

switch(step) {
case 0: if (key == KEY_CTRL_OPTN) step++; break;
case 1: if (key == KEY_CTRL_F6) step++; else step=0; break;
case 2: if (key == KEY_CTRL_F6) step++; else step=0; break;
case 3: if (key == KEY_CTRL_F3) { show_popup(); step=0; }
else step=0;
break;
}
}
return 0;
}


I am planning to make it a .g3a file using fxSDK and also develop using fxSDK which I got using WSL terminal.
Any help appreciated Thank you!

Fichier joint


Lephenixnoir Hors ligne Administrateur Points: 24993 Défis: 174 Message

Citer : Posté le 29/03/2025 13:12 | #


There's no way that's happening unfortunately—your code will only run when you select the add-in the main menu. Conversion works differently, it used to be an add-in and later is was integrated in RUN/MAT. So actually the code is already in RUN/MAT and the Conv.g3a add-in does nothing; RUN/MAT just notices when it's installed and enables the pre-built feature.
Mon graphe (28 Janvier): (MPM ; serial gint ; (Rogue Life || HH2) ; PythonExtra ; ? ; Boson X ; passe gint 3 ; ...) || (shoutbox v5 ; v5)
Capd Hors ligne Membre Points: 6 Défis: 0 Message

Citer : Posté le 29/03/2025 13:18 | #


So there is no way of putting a custom function into Run-Matrix entirely? Or even modifying Run-Matrix for it
Lephenixnoir Hors ligne Administrateur Points: 24993 Défis: 174 Message

Citer : Posté le 29/03/2025 13:37 | #


No, add-ins are only their own apps. You can't modify a built-in app. :x
Mon graphe (28 Janvier): (MPM ; serial gint ; (Rogue Life || HH2) ; PythonExtra ; ? ; Boson X ; passe gint 3 ; ...) || (shoutbox v5 ; v5)

LienAjouter une imageAjouter une vidéoAjouter un lien vers un profilAjouter du codeCiterAjouter un spoiler(texte affichable/masquable par un clic)Ajouter une barre de progressionItaliqueGrasSoulignéAfficher du texte barréCentréJustifiéPlus petitPlus grandPlus de smileys !
Cliquez pour épingler Cliquez pour détacher Cliquez pour fermer
Alignement de l'image: Redimensionnement de l'image (en pixel):
Afficher la liste des membres
:bow: :cool: :good: :love: ^^
:omg: :fusil: :aie: :argh: :mdr:
:boulet2: :thx: :champ: :whistle: :bounce:
valider
 :)  ;)  :D  :p
 :lol:  8)  :(  :@
 0_0  :oops:  :grr:  :E
 :O  :sry:  :mmm:  :waza:
 :'(  :here:  ^^  >:)

Σ π θ ± α β γ δ Δ σ λ
Veuillez donner la réponse en chiffre
Vous devez activer le Javascript dans votre navigateur pour pouvoir valider ce formulaire.

Si vous n'avez pas volontairement désactivé cette fonctionnalité de votre navigateur, il s'agit probablement d'un bug : contactez l'équipe de Planète Casio.

Planète Casio v4.3 © créé par Neuronix et Muelsaco 2004 - 2025 | Il y a 100 connectés | Nous contacter | Qui sommes-nous ? | Licences et remerciements

Planète Casio est un site communautaire non affilié à Casio. Toute reproduction de Planète Casio, même partielle, est interdite.
Les programmes et autres publications présentes sur Planète Casio restent la propriété de leurs auteurs et peuvent être soumis à des licences ou copyrights.
CASIO est une marque déposée par CASIO Computer Co., Ltd