 |
forums.ps2dev.org Homebrew PS2, PSP & PS3 Development Discussions
|
| View previous topic :: View next topic |
| Author |
Message |
stefyx7
Joined: 31 Jul 2008 Posts: 12
|
Posted: Mon Aug 11, 2008 4:41 am Post subject: |
|
|
| The example is perfect but I don't insered the menų...I try but not be done! |
|
| Back to top |
|
 |
Ooblik
Joined: 10 Apr 2008 Posts: 38
|
Posted: Mon Aug 11, 2008 4:41 pm Post subject: |
|
|
| Using some of this maybe its possible to clone the XMB and create a more customizable one? Just a thought... Maybe I'll code a quick POC :P |
|
| Back to top |
|
 |
darkness
Joined: 15 Jun 2008 Posts: 121
|
Posted: Mon Aug 11, 2008 6:47 pm Post subject: |
|
|
Yes, why not... ( I think ),
but the lib has no comments... |
|
| Back to top |
|
 |
stefyx7
Joined: 31 Jul 2008 Posts: 12
|
Posted: Mon Aug 11, 2008 7:30 pm Post subject: |
|
|
| Please help me to inserted a menų......!(whit a progress bar) |
|
| Back to top |
|
 |
ne0h
Joined: 21 Feb 2008 Posts: 386
|
Posted: Mon Aug 11, 2008 7:39 pm Post subject: |
|
|
| Read resurrection.prx source, it uses the progress bar! |
|
| Back to top |
|
 |
stefyx7
Joined: 31 Jul 2008 Posts: 12
|
Posted: Mon Aug 11, 2008 7:46 pm Post subject: |
|
|
| ne0h wrote: | | Read resurrection.prx source, it uses the progress bar! |
already made but I do not succeed |
|
| Back to top |
|
 |
Torch

Joined: 28 May 2008 Posts: 842
|
Posted: Mon Aug 11, 2008 7:52 pm Post subject: |
|
|
| stefyx7 wrote: | | already made but I do not succeed |
I've already given you a basic WORKING project folder that compiles to rule out any problems with your setup -- which was apparently the problem because you couldn't compile the first one.
For any thing else everyone is going to tell you to look at resurrection.prx because everything is clearly shown there.
If you can't analyze it I dunno what to say. |
|
| Back to top |
|
 |
Torch

Joined: 28 May 2008 Posts: 842
|
Posted: Mon Aug 11, 2008 7:53 pm Post subject: |
|
|
| Ooblik wrote: | | Using some of this maybe its possible to clone the XMB and create a more customizable one? Just a thought... Maybe I'll code a quick POC :P |
Does anyone know how to interact with the music_plugin.prx etc, and how they show their data in the XMB? That would be really useful. |
|
| Back to top |
|
 |
stefyx7
Joined: 31 Jul 2008 Posts: 12
|
Posted: Mon Aug 11, 2008 8:54 pm Post subject: |
|
|
| Thank you torch i have the kernel wrong...XD.... |
|
| Back to top |
|
 |
ne0h
Joined: 21 Feb 2008 Posts: 386
|
Posted: Mon Aug 11, 2008 9:24 pm Post subject: |
|
|
What's the module_reboot_before?
I've found it in the TimeMachine_Control module!
It's it a entry point if launched after a reboot? |
|
| Back to top |
|
 |
moonlight
Joined: 26 Oct 2005 Posts: 567
|
Posted: Mon Aug 11, 2008 10:39 pm Post subject: |
|
|
| module_reboot_before is a function that is called before a kernel reset (loadexec, exitgame, etc), it is usually used by modules that don't have a module_stop because they have the non-stop attribute, but which need a cleaning func when the system is going for reboot. |
|
| Back to top |
|
 |
Torch

Joined: 28 May 2008 Posts: 842
|
Posted: Mon Aug 11, 2008 10:41 pm Post subject: |
|
|
| ne0h wrote: | What's the module_reboot_before?
I've found it in the TimeMachine_Control module!
It's it a entry point if launched after a reboot? |
I don't think he wants you there lol. If he did it would be open source. |
|
| Back to top |
|
 |
ne0h
Joined: 21 Feb 2008 Posts: 386
|
Posted: Tue Aug 12, 2008 5:32 am Post subject: |
|
|
| Thanks moonlight! |
|
| Back to top |
|
 |
stefyx7
Joined: 31 Jul 2008 Posts: 12
|
Posted: Wed Aug 13, 2008 2:15 am Post subject: |
|
|
| Please help me for inserted de progress bar...I read the source of dc6 but nothing!it is urgent! |
|
| Back to top |
|
 |
k!rk
Joined: 18 Jul 2008 Posts: 11
|
Posted: Wed Aug 13, 2008 4:24 am Post subject: |
|
|
Great work on the VLF lib so far, looking forward to a proper release someday.
Sadly that graphics.c didnt work with it at the moment.
| stefyx7 wrote: | | Please help me for inserted de progress bar...I read the source of dc6 but nothing!it is urgent! |
I think its only urgent that you understand what you do, not to release any clone menu as fast as possible.
Last edited by k!rk on Wed Aug 13, 2008 11:22 pm; edited 1 time in total |
|
| Back to top |
|
 |
phobox
Joined: 24 Mar 2008 Posts: 140
|
Posted: Wed Aug 13, 2008 7:55 am Post subject: |
|
|
ok, I've read the prototipes of the library and I made them working...
BUT, I still have some doubts and questions.
Here they are:
-vlfGuiSystemSetup(int battery, int clock, int notuserwp) what is it for? how does it work?
-vlfGuiSetResourceDir(char *dir) what is it for?
-vlfGuiCacheResource what is it for?
-vlfGuiGetResourceSubParam what is it for?
-vlfGuiLoadLabel what is it for?
- int he function vlfGuiSetTitleBar i don't know how to use the hideobj param.
(there is also a strange effect (bug?) with titlebars: when i use a background color different from the defaults, the color of the bar is blue.
-what do the the vlfGuiSetText functions return?
-int the func vlfGuiRemoveTextFocus how is used the param keepres?
-what are the params nshow and nhide from vlfGuiSetTextBlinking and vlfGuiSetPictureBlinking
-how to use the func vlfGuiSetTextFade?
-how to use the func vlfGuiSetTextAligment?
-what's vlfGuiChangeCharacterByButton(...) for?
what returns vlfGuiGetPictureSize?
-in the funct vlfGuiSetPictureArea why do you use u32s instead of ints like in the others?
-how to use vlfGuiSetPictureAlphaBlend(...)
-what's vlfGuiClonePicture(...) for?
-how to use (and what are the results of) vlfGuiAnimatePicture and vlfGuiSetPictureFade and vlfGuiAnimateShadowedPicture and vlfGuiSetShadowedPictureFade?
-how to use and what is it for the funct vlfGuiAddShadowedPicture(...)?
-int the functions vlfGuiAddBatteryIconEx and vlfGuiSetBatteryIconStatus the param status is once u32 and once int. has it a particular reason?
-in the func vlfGuiAddBatteryIconSystem what is the timer_ms for? you pass 10 secs, why?
-how to use and the meaning of the functions vlfGuiSaveRectangleVisibilityContext, vlfGuiRestoreVisibilityContext, vlfGuiFreeVisibilityContext.
-the same question for vlfGuiSetRectangleBlinking and vlfGuiSetSynchronizedBlinking.
-what does the func vlfGuiNetConfDialog return?
-can you give a description of the params of the func vlfGuiBottomDialog? when the handler func is called what param is passed?
THANK YOU VERY MUCH, Moonlight
bye _________________ Ciao! from Italy |
|
| Back to top |
|
 |
stefyx7
Joined: 31 Jul 2008 Posts: 12
|
Posted: Wed Aug 13, 2008 8:43 am Post subject: |
|
|
| Help me for the inserted a progress bar! |
|
| Back to top |
|
 |
kralyk
Joined: 06 Apr 2008 Posts: 114 Location: Czech Republic, central EU
|
Posted: Thu Aug 14, 2008 6:18 am Post subject: |
|
|
Wtf? Do you actually expect someone to do all the work and send you the result, so you could claim its yours or what? What the hell do you want? Stop it. _________________ ...sorry for my english... |
|
| Back to top |
|
 |
moonlight
Joined: 26 Oct 2005 Posts: 567
|
Posted: Fri Aug 15, 2008 6:17 pm Post subject: |
|
|
| phobox wrote: | ok, I've read the prototipes of the library and I made them working...
BUT, I still have some doubts and questions.
Here they are:
-vlfGuiSystemSetup(int battery, int clock, int notuserwp) what is it for? how does it work?
-vlfGuiSetResourceDir(char *dir) what is it for?
-vlfGuiCacheResource what is it for?
-vlfGuiGetResourceSubParam what is it for?
-vlfGuiLoadLabel what is it for?
- int he function vlfGuiSetTitleBar i don't know how to use the hideobj param.
(there is also a strange effect (bug?) with titlebars: when i use a background color different from the defaults, the color of the bar is blue.
-what do the the vlfGuiSetText functions return?
-int the func vlfGuiRemoveTextFocus how is used the param keepres?
-what are the params nshow and nhide from vlfGuiSetTextBlinking and vlfGuiSetPictureBlinking
-how to use the func vlfGuiSetTextFade?
-how to use the func vlfGuiSetTextAligment?
-what's vlfGuiChangeCharacterByButton(...) for?
what returns vlfGuiGetPictureSize?
-in the funct vlfGuiSetPictureArea why do you use u32s instead of ints like in the others?
-how to use vlfGuiSetPictureAlphaBlend(...)
-what's vlfGuiClonePicture(...) for?
-how to use (and what are the results of) vlfGuiAnimatePicture and vlfGuiSetPictureFade and vlfGuiAnimateShadowedPicture and vlfGuiSetShadowedPictureFade?
-how to use and what is it for the funct vlfGuiAddShadowedPicture(...)?
-int the functions vlfGuiAddBatteryIconEx and vlfGuiSetBatteryIconStatus the param status is once u32 and once int. has it a particular reason?
-in the func vlfGuiAddBatteryIconSystem what is the timer_ms for? you pass 10 secs, why?
-how to use and the meaning of the functions vlfGuiSaveRectangleVisibilityContext, vlfGuiRestoreVisibilityContext, vlfGuiFreeVisibilityContext.
-the same question for vlfGuiSetRectangleBlinking and vlfGuiSetSynchronizedBlinking.
-what does the func vlfGuiNetConfDialog return?
-can you give a description of the params of the func vlfGuiBottomDialog? when the handler func is called what param is passed?
THANK YOU VERY MUCH, Moonlight
bye |
- vlfGuiSystemSetup is a shortcut for typical initialization setup. It sets the background of the user, the waves (if not custom wallpaper), and adds a clock and a battery if the params are to 1. The "notuserwp" sepcify that if the user has a custom wallpaper, then it won't be used, but instead one of the predefined ones according to registry configuration.
BEcause there are problems with some user wallpapers of some sizes, it is better to set this param to 1 atm.
- vlfGuiSetResourceDir, sets the resources file directory, by default flash0:/vsh/resource.
- vlfGuiGetResourceSubParam... difficult to explain :) it is related to some subparams of resources where there are info on some xmb contents (like waves scale).
- vlfGuiLoadLabel loads a string from a resource in the current laguage (not that currently chinese, korean, and russian are not supported because of font, vlf sets its internal language variable to english when those language are detected). For example, loading the text of the network update title:
| Code: |
u16 str[64];
vlfGuiLoadLabel(str, "update_plugin", "msgtop_sysconf_update");
|
- The hideobj to 1 causes the objects within the area of the titlebar rectangle (e.g. battery and clock) to be hidden.
Which color are you using? try to set the alpha channel to 0xFF, 0xFFXXXXXX
- vlfGuiSetText returns 0 or an error if the text doesn't exist.
- vlfGuiRemoveTextFocus, keepres is used to indicate if the focus image resource is kept in memory to avoid further loading,
- nhide and nshow indicates the number of frames that the item is hidden and shown in the blink :) for example in the battery those params are set both to 30.
- The param mode can be VLF_FADE_MODE_IN, VLF_FADE_MODE_OUT, and VLF_FADE_MODE_REPEAT or an or combination of them, to cause a fade in, a fade out, and a repeated fade. When VLF_FADE_MODE_IN and VLF_FADE_MODE_OUT are specified at same time, the param direction_out indicates the initial direction. The effect param is one of VLF_FADE_EFFECT* constants, each one with a different speed.
Example, an infinite fading in+out triangle:
| Code: |
void *triangle;
vlfGuiAddTriangle(&triangle, 430, 50);
vlfGuiSetShadowedPictureFade(triangle, VLF_FADE_MODE_OUT | VLF_FADE_MODE_IN | VLF_FADE_MODE_REPEAT, VLF_FADE_EFFECT_STANDARD, 0);
|
- It just sets text alignment to center left or right. Currently there is a problem if a text aligned to right has a text focus.
- vlfGuiChangeCharacterByButton is to replace a character by a button picture. For example, vlfGuiChangeCharacterByButton('*', VLF_ENTER); and then using vlfGuiAddText(10, 10, "Press *"); causes "Press (cross or circle pic)" to appear. Currently, doesn't workproperly with text sizes different to the default one, and only enter, cancel, cross, circle and triangle can be specified.
- vlfGuiSetPictureAlphaBlend, this is the alpha blend operation, you won't probably need this one. Parameters other than pic are same as the ones of sceGuAlphaBlend. It is used mostly by internal functions of vlf, as shadow pictures and normal pictures need a different alpha blend.
- vlfGuiClonePicture, creates a new picture which is a real copy of other (real=1) or a reference copy of other.
- fade is explained before. Animate picture functions take a picture and divde into pieces, each one will be a frame. w and h indicates the width and height of each piece, frames indicates the number of frames each image frame will be drawn.
Vertical indicates wether the image split is done vertically or horizontally.
- vlfGuiAddShadowedPicture just adds a shadowed picture :) A shadowed picture is a set of two pictures, one of them is the normal picture and the other is the shadow. The params sh_offsx and sh_offsy indicate the distance between the main picture and the shadow. shdow_before param tells vlf wether to paint before the shadow or no.
- Nop, no reasin in particular, just a mistake.
- The timer ms is the frequency of the timer that updates the battery.
- The VisibilityContext functions don't work still properly. They are meant to save and restore the context of the visiility state of objects in a rectangle,
- The rectangle blinking is to blink all objects in a rectangle. Not properly implemented yet. synchronized blinking is to synchronize the blinking of two objects.
- vlfGuiNetConfDialog is currently implemented using utility (that will change), i don't recomend its usage, it looks weird since is not painted same as in XMB. It returns the result of the utility dialog which i don't remember :)
- If automatic is set, button1 and button2 indicate the items (One of VLF_DI*) for the cancel and enter button. Otherwise, if automatic is 0, button1 is always the left, button2 always the right, and enter_is_left param indicate which of them is assigned to the enter button. distance indicates the position of the right button since the beginnig of the first one, or VLF_DEFAULT for a default. The handler is passed 1 if the enter button was pressed, or 0 if the cancel button was pressed. |
|
| Back to top |
|
 |
phobox
Joined: 24 Mar 2008 Posts: 140
|
Posted: Sat Aug 16, 2008 6:28 pm Post subject: |
|
|
ooh thanks moonlight!
About the problem with the title bar, the alpha channel is FF and the color is black, 0xFF000000.... not tried with vlfGuiSetTitleBarEx to set directly the color, but i'll try it as soon as i can (tomorrow or the day after.).
a little (LITTLE =) ) more questions...
you give the functions to add the clock and the wait icon, but how can we remove those icons??
would be great a function to set the dimension of the progress bar, at the moment how many pixels is it?
would be great to see a scroll bar for big central menus and would be great as well to se the text of the textbar scrolling if it is too long...
what's the wait param in vlfGuiAddEventHandler?
thanks _________________ Ciao! from Italy |
|
| Back to top |
|
 |
Loading...
Joined: 19 Aug 2008 Posts: 1
|
Posted: Tue Aug 19, 2008 2:30 am Post subject: |
|
|
hi,
I have a little problem with vflGuiMessageDialog(); : I want to show some text on the screen and after I press the cancel-button, I want to exit the app.
My code:
| Code: | int test()
{
if(vlfGuiMessageDialog("After you close this Message Dialog the programm will exit",VLF_MD_TYPE_NORMAL | VLF_MD_BUTTONS_NONE) == VLF_MD_BACK) canceled = 1;
return VLF_EV_RET_REMOVE_HANDLERS;
}
in a thread:
.
.
.
vlfGuiAddEventHandler(0,-1,test,NULL);
while(!canceled);
sceKernelExitGame();
|
but it donīt work, the message isnīt showen on the screen and the programm freezes (maybe because of "while(!canceled);" ?!?). I think this is because this type of Message Dialog canīt return something. How can I fix this problem??
PS: Sorry for my bad english, but Iīm german. |
|
| Back to top |
|
 |
phobox
Joined: 24 Mar 2008 Posts: 140
|
Posted: Wed Aug 20, 2008 4:52 am Post subject: |
|
|
@Loading... why do you use a separate thread?
@moonlight. Found a bug:
vlfGuiLoadLabel(...) doesn't work properly, it reads only the first letter of the string.
I think the problem is the way strings are writed into rco's, meaning that every single letter is separated by a null byte. when displaying the string, the string will be read until the first null byte, in this case the second element of e array.
Whas that the bug?
anyway thanks for fixing.
another strange thing..
is for a particular reason that vlfGuiSETTextRESOURCE() is not present?
bye _________________ Ciao! from Italy |
|
| Back to top |
|
 |
moonlight
Joined: 26 Oct 2005 Posts: 567
|
Posted: Wed Aug 20, 2008 5:31 am Post subject: |
|
|
| phobox wrote: | @Loading... why do you use a separate thread?
@moonlight. Found a bug:
vlfGuiLoadLabel(...) doesn't work properly, it reads only the first letter of the string.
I think the problem is the way strings are writed into rco's, meaning that every single letter is separated by a null byte. when displaying the string, the string will be read until the first null byte, in this case the second element of e array.
Whas that the bug?
anyway thanks for fixing.
another strange thing..
is for a particular reason that vlfGuiSETTextRESOURCE() is not present?
bye |
Well, the point is that LoadLabel loads a string in unicode format :) you have to use the "W" functions. I just didn't think of vlfGuiSetTextResource :)
Btw, DC7 released, a few things added (a spin control, and a page control), I will post the source of the main app (resurrection.prx) if people is interested. |
|
| Back to top |
|
 |
phobox
Joined: 24 Mar 2008 Posts: 140
|
Posted: Wed Aug 20, 2008 6:09 am Post subject: |
|
|
ofcourse poeple is interested... thanks _________________ Ciao! from Italy |
|
| Back to top |
|
 |
Stewie87
Joined: 03 Apr 2008 Posts: 39
|
Posted: Wed Aug 20, 2008 6:42 am Post subject: |
|
|
| phobox wrote: | | ofcourse poeple is interested... thanks |
Yes, I am too :D |
|
| Back to top |
|
 |
moonlight
Joined: 26 Oct 2005 Posts: 567
|
|
| Back to top |
|
 |
Super Sheep
Joined: 23 Mar 2008 Posts: 31
|
Posted: Wed Aug 20, 2008 8:41 am Post subject: |
|
|
Thanks a lot. I'm was writing my own paging function for a while. xD
This should quicken my work. Thanks again =D |
|
| Back to top |
|
 |
phobox
Joined: 24 Mar 2008 Posts: 140
|
Posted: Thu Aug 21, 2008 4:52 am Post subject: |
|
|
thanks a lot for the spin control and the page control, both very useful, expecially the last one.
thanks for letting us know how to remove the wait icon =)
i found a problem (not tested with vlf.prx of ddcv7): the alignment functions are ot working properly if in the string there is a button icon (using replaceCharByButton or something like that...).
will we be able to se sony osk running with vlf?
another thing i didn't know is that we can pass to the param "button" of addHandler(something like that) a button from pspctrl, NICE! a better way of managing buttuns.
what is the size of the text of bottomdialogs? 0.70f?
is it possible to add to bottom dialog a third button (Triangle) and another predefined button, "Options"? _________________ Ciao! from Italy |
|
| Back to top |
|
 |
moonlight
Joined: 26 Oct 2005 Posts: 567
|
Posted: Thu Aug 21, 2008 5:39 am Post subject: |
|
|
Yeah i know about the icon issue, it is something that I have to look. The size is indeed 0.70. About adding triangle and other text, yeah I could do that, but current not supported.
waiticon, and all other icons, except battery which has some additional data, are shadowed pictures, and therefore can be removed using vlfGuiRemoveShadowedPicture. Probably it would have been clearer using a typedef and not just void* :) |
|
| Back to top |
|
 |
Wally

Joined: 26 Sep 2005 Posts: 672
|
Posted: Thu Aug 21, 2008 10:59 am Post subject: |
|
|
| so I guess we'll see customizable xmb sections soon |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|