• Welcome to TodayPlus Boards v2.
 

Skin Help Please

Started by ya1950, October 23, 2003, 07:14:46 AM

Previous topic - Next topic

ya1950

Wow! This is a lot better than the 1000 page brighthand thread!

I'm trying to modify Lightman's skin to include the glauncher posted by fishboy and I need to change the regions a bit. Here is the down page button for the RSS feeds which LM assigned to region 10:

//==============================================
// SINGLE FEED PAGE 1 OF 3   (REGION 10, PAGE 0)
//==============================================
region,10,0,-1
imagebutton,2,0,down_arrow.bmp,t,10,4,1,9,7,0
button,2,0,10,10,10,4,%var4%,-1 // REFRESH PAGE
changefont,tahoma,11,b
text,17,1,1/3,l      //=== DISPLAY PAGE NUMBER ===
changefont,tahoma,11,
storevar,var5=1
storevar,var6=2
storevar,var7=3
endregion,10,0

I'd like to change it to region 4. I understand the region and endregion commands but I'm unsure as to the syntax to change the button and imagebutton commands to reflect the new region. Also where do I place the defregion command? Before the region? Could someone help me understand this?

Thanks in advance to anyone who answers.

ya1950

LightMan

Quote from: ya1950imagebutton,2,0,down_arrow.bmp,t,10,4,1,9,7,0

If you check the "button" section in the skin reference file, you'll see an explanation of each parameter that also applies to imagebutton.

Anyway, on that line :
- the "4" will jump to page 1 of the target region (10) and after that it will refresh/update sections 9, 7 and 0

Quotebutton,2,0,10,10,10,4,%var4%,-1

Here, it will jump (4) to region 10, to a page that will be loaded in %var4% and after that it will make a full refresh of the plugin (-1) which is always necessary if you want the plugin to change height, for instance.

QuoteI'd like to change it to region 4. I understand the region and endregion commands but I'm unsure as to the syntax to change the button and imagebutton commands to reflect the new region.

If you want to do that, don't forget to change all pages of region 10 (as I recall there are 3 pages) and all imagebuttons or normal buttons that point to this region.

QuoteAlso where do I place the defregion command? Before the region? Could someone help me understand this?

It should be placed before the region, but you can also place it right after the region command. I still haven't fully figured out if there are any major differences between both situations, but common sense tells me that if you place it after the region command, it will make sure that the program knows that region definition each time that you enter that specific page of that region.
This *may* eventually help if you have a complex skin and you're always jumping from region/page to another region/page.
As I said, I'm not sure about this last paragraph, it's just my understanding of it at this point.
[size=9]-= Ipaq 2215, 1 Gb CF, 512 Mb SD, Crystal Clear case =-[/size]

ya1950

Lightman

Thanks for your prompt reply. That certainly did it! Just for anyone else who might be interested, here is the same code now pointing to region 4 instead of region 10:

defregion,4,0,0,0,0,3
region,4,0,-1
imagebutton,2,0,down_arrow.bmp,t,4,4,1,9,7,0
button,2,0,10,10,4,4,%var4%,-1 // REFRESH PAGE
changefont,tahoma,11,b
text,17,1,1/3,l      //=== DISPLAY PAGE NUMBER ===
changefont,tahoma,11,
storevar,var5=1
storevar,var6=2
storevar,var7=3
endregion,4,0

Thanks again and thanks a lot for creating your skins in the first place.  :D

ya1950

LightMan

Quote from: ya1950Lightman
Thanks for your prompt reply. That certainly did it!

Thanks again and thanks a lot for creating your skins in the first place.  :D

Glad to help :)

As a side note, I still recall when I didn't understand any of the skin format/parameters, and now after so little time it's fun being able to help others in fixing their skins :)
[size=9]-= Ipaq 2215, 1 Gb CF, 512 Mb SD, Crystal Clear case =-[/size]

srs

the defregion command can be placed anywhere.  it may be easiest to place it after the region, as then you can do defregion,x,0,0,width,height (because it will use the current offsets).  this would be easier that calculating the exact location if you were to use the defregion in the beginning of the skin.

the defregion command is only processed when doing a full rerender and not when updating specific regions.

the main purpose it serves is to tell the plugin which area the region occupies, so that the area can be cleared when updating that region (when not doing a full rerender)

hope that makes sense

LightMan

Quote from: srshope that makes sense

Sure does, thanks for clearing that up :)
[size=9]-= Ipaq 2215, 1 Gb CF, 512 Mb SD, Crystal Clear case =-[/size]