06.02.2011, 22:06
Hallo liebe Community,
ich hoffe hier könnt mir helfen. Also meine frage ist wie kann ich wenn ich jetzt bei einem ganz normalem VLF Menü irgendeine Kategorie aus wähle und es kommt der Text wie kann ich das dann machen das ich mit O zurück ins Menü komme.
Hier mal mein Code:
ich hoffe hier könnt mir helfen. Also meine frage ist wie kann ich wenn ich jetzt bei einem ganz normalem VLF Menü irgendeine Kategorie aus wähle und es kommt der Text wie kann ich das dann machen das ich mit O zurück ins Menü komme.
Hier mal mein Code:
PHP-Code:
#include <pspsdk.h>
#include <pspkernel.h>
#include <pspdebug.h>
#include <pspctrl.h>
#include <pspsuspend.h>
#include <psppower.h>
#include <pspreg.h>
#include <psprtc.h>
#include <psputils.h>
#include <pspgu.h>
#include <pspgum.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <stdarg.h>
#include <malloc.h>
#include <vlf.h>
PSP_MODULE_INFO("Sample_PSPFCodes", 0, 1, 0);
PSP_MAIN_THREAD_ATTR(0);
char *license_text =
"BLAHBLAHBLAH LICENSE.\n"
" Version 1, 11 january 2009\n\n"
"This is an imaginary sample license.\n"
"It is here just to show a scrollbar.\n\n"
"BLAHHHHHHHHHHHHHHHHHHHH\n"
"BLAHHHHHHHHHHHHHHHHHHHH\n"
"BLAHHHHHHHHHHHHHHHHHHHH\n"
"BLAHHHHHHHHHHHHHHHHHHHH\n"
"BLAHHHHHHHHHHHHHHHHHHHH\n"
"BLAHHHHHHHHHHHHHHHHHHHH\n"
"BLAHHHHHHHHHHHHHHHHHHHH\n"
"BLAHHHHHHHHHHHHHHHHHHHH\n"
"BLAHHHHHHHHHHHHHHHHHHHH\n"
"BLAHHHHHHHHHHHHHHHHHHHH\n"
"BLAHHHHHHHHHHHHHHHHHHHH";
char *Impressum_text =
"Alles by stehn.\n"
"BLAHHHHHHHHHHHHHHHHHHHH\n"
"BLAHHHHHHHHHHHHHHHHHHHH\n"
"BLAHHHHHHHHHHHHHHHHHHHH\n"
"BLAHHHHHHHHHHHHHHHHHHHH\n"
"BLAHHHHHHHHHHHHHHHHHHHH\n"
"BLAHHHHHHHHHHHHHHHHHHHH\n"
"BLAHHHHHHHHHHHHHHHHHHHH\n"
"BLAHHHHHHHHHHHHHHHHHHHH\n"
"BLAHHHHHHHHHHHHHHHHHHHH\n"
"BLAHHHHHHHHHHHHHHHHHHHH\n"
"BLAHHHHHHHHHHHHHHHHHHHH";
VlfPicture logo;
VlfText license, do_you_agree;
VlfText Impressum, do_you_agree2;
int OnLicenseAgreement(int enter)
{
if (enter)
{
sceKernelExitGame();
}
sceKernelExitGame();
return VLF_EV_RET_NOTHING;
}
void StartSample()
{
license = vlfGuiAddText(100, 40, license_text);
vlfGuiSetTextScrollBar(license, 90);
do_you_agree = vlfGuiAddText(120, 210, "Do you agree to the terms?");
vlfGuiBottomDialog(VLF_DI_BACK, VLF_DI_ENTER, 1, 0, VLF_DEFAULT, OnLicenseAgreement);
vlfGuiSetRectangleFade(0, VLF_TITLEBAR_HEIGHT, 480, 272-VLF_TITLEBAR_HEIGHT, VLF_FADE_MODE_IN, VLF_FADE_SPEED_SUPER_FAST, 0, NULL, NULL, 0);
}
void StartSample2()
{
Impressum = vlfGuiAddText(100, 40, Impressum_text);
vlfGuiSetTextScrollBar(Impressum, 90);
do_you_agree2 = vlfGuiAddText(120, 210, "Do you agree to the terms?");
vlfGuiBottomDialog(VLF_DI_BACK, VLF_DI_ENTER, 1, 0, VLF_DEFAULT, OnLicenseAgreement);
vlfGuiSetRectangleFade(0, VLF_TITLEBAR_HEIGHT, 480, 272-VLF_TITLEBAR_HEIGHT, VLF_FADE_MODE_IN, VLF_FADE_SPEED_SUPER_FAST, 0, NULL, NULL, 0);
}
int menu_sel(int sel)
{
switch (sel)
{
case 0:
StartSample();
vlfGuiRemovePicture(logo);
return VLF_EV_RET_REMOVE_HANDLERS | VLF_EV_RET_REMOVE_OBJECTS;
case 1:
StartSample2();
vlfGuiRemovePicture(logo);
return VLF_EV_RET_REMOVE_HANDLERS | VLF_EV_RET_REMOVE_OBJECTS;
case 2:
sceKernelExitGame();
break;
}
return VLF_EV_RET_NOTHING;
}
int app_main(int argc, char *argv[])
{
char *items[] = { "Start sample", "Impressum", "Exit" };
vlfGuiSystemSetup(1, 1, 1);
vlfGuiCentralMenu(3, items, 0, menu_sel, 0, 0);
logo = vlfGuiAddPictureFile("logo.png", 95, 80); // png's are now supported
while (1)
{
vlfGuiDrawFrame();
}
return 0;
}
Also hier müsste ja der Code hin damit ich wieder ins Menü zurück komme:
PHP-Code:
int OnLicenseAgreement(int enter)
{
if (enter)
{
sceKernelExitGame();
}
Also hier hin müsste der Code
}
Ich hoffe ihr könnt mir weiter helfen
Danke schon mal im voraus