dc v6 graphics
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.stefyx7 wrote:already made but I do not succeed
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.
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.
Sadly that graphics.c didnt work with it at the moment.
I think its only urgent that you understand what you do, not to release any clone menu as fast as possible.stefyx7 wrote:Please help me for inserted de progress bar...I read the source of dc6 but nothing!it is urgent!
Last edited by k!rk on Wed Aug 13, 2008 11:22 pm, edited 1 time in total.
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
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
- 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.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
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");
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);
- 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.
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
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
-
- Posts: 1
- Joined: Tue Aug 19, 2008 2:13 am
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:
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.
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();
PS: Sorry for my bad english, but I´m german.
@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
@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
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 :)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
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.
Uploaded here http://www.sendspace.com/file/uc4ltz
-
- Posts: 31
- Joined: Sun Mar 23, 2008 2:16 am
- Contact:
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"?
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
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* :)
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* :)