dc v6 graphics

Discuss the development of new homebrew software, tools and libraries.

Moderators: cheriff, TyRaNiD

Post Reply
stefyx7
Posts: 12
Joined: Thu Jul 31, 2008 10:25 pm
Contact:

Post by stefyx7 »

The example is perfect but I don't insered the menù...I try but not be done!
Ooblik
Posts: 38
Joined: Thu Apr 10, 2008 1:47 pm

Post by Ooblik »

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
darkness
Posts: 121
Joined: Sun Jun 15, 2008 8:42 pm

Post by darkness »

Yes, why not... ( I think ),
but the lib has no comments...
stefyx7
Posts: 12
Joined: Thu Jul 31, 2008 10:25 pm
Contact:

Post by stefyx7 »

Please help me to inserted a menù......!(whit a progress bar)
ne0h
Posts: 386
Joined: Thu Feb 21, 2008 2:15 am

Post by ne0h »

Read resurrection.prx source, it uses the progress bar!
stefyx7
Posts: 12
Joined: Thu Jul 31, 2008 10:25 pm
Contact:

Post by stefyx7 »

ne0h wrote:Read resurrection.prx source, it uses the progress bar!
already made but I do not succeed
User avatar
Torch
Posts: 825
Joined: Wed May 28, 2008 2:50 am

Post by Torch »

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.
User avatar
Torch
Posts: 825
Joined: Wed May 28, 2008 2:50 am

Post by Torch »

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.
stefyx7
Posts: 12
Joined: Thu Jul 31, 2008 10:25 pm
Contact:

Post by stefyx7 »

Thank you torch i have the kernel wrong...XD....
ne0h
Posts: 386
Joined: Thu Feb 21, 2008 2:15 am

Post by ne0h »

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?
moonlight
Posts: 567
Joined: Wed Oct 26, 2005 7:46 pm

Post by moonlight »

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.
User avatar
Torch
Posts: 825
Joined: Wed May 28, 2008 2:50 am

Post by Torch »

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.
ne0h
Posts: 386
Joined: Thu Feb 21, 2008 2:15 am

Post by ne0h »

Thanks moonlight!
stefyx7
Posts: 12
Joined: Thu Jul 31, 2008 10:25 pm
Contact:

Post by stefyx7 »

Please help me for inserted de progress bar...I read the source of dc6 but nothing!it is urgent!
k!rk
Posts: 11
Joined: Fri Jul 18, 2008 8:26 am

Post by k!rk »

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.
phobox
Posts: 127
Joined: Mon Mar 24, 2008 6:22 pm

Post by phobox »

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
stefyx7
Posts: 12
Joined: Thu Jul 31, 2008 10:25 pm
Contact:

Post by stefyx7 »

Help me for the inserted a progress bar!
kralyk
Posts: 114
Joined: Sun Apr 06, 2008 8:18 pm
Location: Czech Republic, central EU

Post by kralyk »

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...
moonlight
Posts: 567
Joined: Wed Oct 26, 2005 7:46 pm

Post by moonlight »

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: Select all

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: Select all

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.
phobox
Posts: 127
Joined: Mon Mar 24, 2008 6:22 pm

Post by phobox »

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
Loading...
Posts: 1
Joined: Tue Aug 19, 2008 2:13 am

Post by Loading... »

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: Select all

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.
phobox
Posts: 127
Joined: Mon Mar 24, 2008 6:22 pm

Post by phobox »

@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
moonlight
Posts: 567
Joined: Wed Oct 26, 2005 7:46 pm

Post by moonlight »

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.
phobox
Posts: 127
Joined: Mon Mar 24, 2008 6:22 pm

Post by phobox »

ofcourse poeple is interested... thanks
Ciao! from Italy
Stewie87
Posts: 34
Joined: Thu Apr 03, 2008 8:16 am

Post by Stewie87 »

phobox wrote:ofcourse poeple is interested... thanks
Yes, I am too :D
moonlight
Posts: 567
Joined: Wed Oct 26, 2005 7:46 pm

Post by moonlight »

Super Sheep
Posts: 31
Joined: Sun Mar 23, 2008 2:16 am
Contact:

Post by Super Sheep »

Thanks a lot. I'm was writing my own paging function for a while. xD

This should quicken my work. Thanks again =D
phobox
Posts: 127
Joined: Mon Mar 24, 2008 6:22 pm

Post by phobox »

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
moonlight
Posts: 567
Joined: Wed Oct 26, 2005 7:46 pm

Post by moonlight »

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* :)
User avatar
Wally
Posts: 663
Joined: Mon Sep 26, 2005 11:25 am

Post by Wally »

so I guess we'll see customizable xmb sections soon
Post Reply