Idea for homepage
#1
here is an idea for skinning the home page.

it's not a new idea, it just enhances the existing way you skin. it would require some code changes.

if you would set id's in the following range.

0 - 99 : background image and any graphics (ie logos and such, don't receive focus)

100 - 119 : scroller controls
120 - 139 : corrosponding no focused graphics (overides)
140 - 159 : corrosponding focused graphics (overides)
160 - 179 : corrosponding additional graphics 1 (no focus)
180 - 199 : corrosponding additional graphics 2 (no focus)

200 - 299 : information tag controls

300 : scroller

400 - 419 : additional controls and non scroller skinned controls
460 - 479 : corrosponding additional graphics 1 (no focus)
480 - 499 : corrosponding additional graphics 2 (no focus)

500 - 519 : conditional controls (ie xlink)
560 - 579 : corrosponding additional graphics 1 (no focus)
580 - 599 : corrosponding additional graphics 2 (no focus)

this way you could have two additional images for each control in the above ranges, that would be visible when the control has focus and hidden when not focused. i posted a new thread scroller that explained why i wanted it. the scroller would actually have three. this would require some skins to modify their id's like hdeetv (non scroller version) would have to move the 102-109 to 462-469 and 2-9 to 402-409 and all skins would have to move xlink to 500. i hope you understand what i am trying to say.

i've included the necessary code from cguiwindowhome.cpp, the code also fixes a couple small bugs. there is one bug that this code has. when the dialog sub menu button is clicked, the corresponding graphics are hidden, but, if you close the dialog the graphic stays hidden until you change focus.

i could probably send you the home page of the skin my friend and i are working on, if it would give you a better idea.

it's very alpha though.

part of cguiwindowhome.cpp
Quote:#define control_btn_shutdown 10
#define control_btn_dashboard 11
#define control_btn_reboot 12
#define control_btn_credits 13
#define control_btn_online 14
#define control_btn_xlink_kai 500
#define control_btn_scroller 300

cguiwindowhome::cguiwindowhome(void) : cguiwindow(0)
{
m_ilastcontrol=-1;
m_ilastmenuoption=-1;

on_click_message(control_btn_shutdown, cguiwindowhome, onclickshutdown);
on_click_message(control_btn_dashboard, cguiwindowhome, onclickdashboard);
on_click_message(control_btn_reboot, cguiwindowhome, onclickreboot);
on_click_message(control_btn_credits, cguiwindowhome, onclickcredits);
on_click_message(control_btn_online, cguiwindowhome, onclickonlinegaming);
}

cguiwindowhome::~cguiwindowhome(void)
{
}


bool cguiwindowhome::onmessage(cguimessage& message)
{
switch ( message.getmessage() )
{
case gui_msg_window_init:
{
int ifocuscontrol = m_ilastcontrol;
cguiwindow::onmessage(message);

// make additional images invisible...
for (int icontrol = 100; icontrol < 119; icontrol++)
{
set_control_hidden(icontrol);
set_control_hidden(icontrol + 60);
set_control_hidden(icontrol + 80);
set_control_hidden(icontrol + 360);
set_control_hidden(icontrol + 380);
set_control_hidden(icontrol + 460);
set_control_hidden(icontrol + 480);
}

if (ifocuscontrol < 0)
{
ifocuscontrol = getfocusedcontrol();
m_ilastcontrol = ifocuscontrol;
}

updatebuttonscroller();

on_poll_button_condition(control_btn_xlink_kai, cguiwindowhome, onpollxlinkclient, 50);

set_control_focus(ifocuscontrol, 0);
return true;
}

case gui_msg_setfocus:
{
int icontrol = message.getcontrolid();
int iicontype = icontrol;

if (m_ilastmenuoption != -1)
{
set_control_hidden(m_ilastmenuoption);
set_control_hidden(m_ilastmenuoption + 60);
set_control_hidden(m_ilastmenuoption + 80);
}

set_control_hidden(m_ilastcontrol + 60);
set_control_hidden(m_ilastcontrol + 80);

if (icontrol == control_btn_scroller)
{
// the button scroller has changed focus...
iicontype = message.getparam1();

// if message.getparam1() != scroller menu item number
if (iicontype < 100 || iicontype > 119)
iicontype = m_ilastmenuoption;
else
m_ilastmenuoption = iicontype;
}

if ((iicontype >=100 && iicontype <=119) || (iicontype >= 400 && iicontype <= 419) || (iicontype >= 500 && iicontype <= 519))
{
set_control_visible(iicontype);
set_control_visible(iicontype + 60);
set_control_visible(iicontype + 80);
}

m_ilastcontrol = icontrol;

break;
}

case gui_msg_clicked:
{
int icontrol = message.getsenderid();
if (icontrol == control_btn_scroller)
{
int iaction = message.getparam1();
if (iaction == action_context_menu || iaction == action_mouse_right_click)
{
onpopupcontextmenu();
}
}
else
{
set_control_hidden(m_ilastcontrol + 60);
set_control_hidden(m_ilastcontrol + 80);
}

m_ilastcontrol = message.getsenderid();
break;
}
}
return cguiwindow::onmessage(message);
}

thank you for considering this.
For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
Reply
#2
a couple of points:

1. the additional graphics which are there for the scroller (or the main buttons before the scroller was implemented) are there only for the extra stuff that's displayed in the background. i don't see the need (or the point) of having additional graphics for every other button out there.

2. when the scroller was added, we added the possibility of additional graphics per item - there was a focused, non-focused, and background image available. this seemed to satisfy most needs - you can really do a lot with this. if there really is a demand for an additional focused texture, then this can be added, but i personally don't see the benefit.

3. all other controls already have a focus texture and nofocus texture definable from within the control. adding restrictions on ids etc. that are not necessary won't be done unless they absolutely have to be. once again, i see little reason for it - perhaps i'm missing something?

4. background images/controls that get no focus only need a distinct id if they are special in someway. the new infolabel/infoimage will make special labels a thing of the past probably, and the <execute> tags make many special buttons a thing of the past as well. thus, id is playing less of a role overall.

cheers,
jonathan
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#3
ok, i'm responding not to change your mind, but just to explain a little better. Smile

i am perfectly happy using hdeetv (scroller version), it's clean functional and a pleasure to use. i only got interested in skinning because a friend was working on one and it seemed like fun. the skin would be more fun than functional, that's the reason for the suggestions. but some of these changes i believe could have made a skin more functional.

1. the reason for additional graphics for other controls was when say the dialog submenu button was focused, you could add an animated graphic for the dialog and then when selected replace with a stationary graphic. you could combine it with the button's focused graphic, but with our layout it would have been better to have separate graphics.

2. i may not understand how this works well enough, but i couldn't get it to display right. it seemed dependent on the scroller dimensions. i was trying to use the scroller's texture for the highlight and display the main graphic, like other skins, but i also wanted an animated gif and combining that with the main graphic produced poor results and i couldn't get the focused and non focused textures to work right.

3. the suggestion for id's was made because in project mayhem, the dialog menu button uses id 2 for movement. if you start at the scroller and go down to say my files, then go over to dialog submenu button, then up, it changes the graphic to my programs. it was more of a guideline as opposed to restrictions. most skins would have worked fine as is. having controls in the 400's would have allowed additional graphics, but you wouldn't have been restricted to these numbers.  the reason for grouping conditional controls was in case you added more conditional typesHuh

4. again putting info labels (great idea by the way) in the 200's was only a guidline they could have stayed anywhere.

none of my suggestions are necessary for a great skin (i hope you didn't take it that way) and i didn't mean to imply this wa s a new way of skinning, it's just i could see a real benefit for additional graphics for each control. i also (fixed/changed) the code to hide graphics when that control isn't focused and because of this when a non scroller control get's focus the screen can look pretty empty.

edit: i haven't tested this, but if it was possible to hide and show an information label, these changes would have allowed to move over to a control and have the information dialog pop up and hide when not focused with out having to push select. not sure if that's possible though.
For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
Reply
#4
can hide lables on buttons

just look at my home.xml its not an off on just poistion outside button range

http://www.xbox-skins.net/index.p....ad=2934



opps sorry wrong stuff
Reply
#5
i tried to work around some of this by using id's between 2 - 19 like hdeetv (no scroller).

i used id 10, so i would have a graphic (110) for the dialog sub menu button, oops don't use id's 10 - 14. Smile

your code still checks for those id's though.
For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
Reply
#6
i set the dialogsubmenu button to <id>16</id>, this way i can have the menu display without pushing select (<id>116</id>) the problem is when you go back to the scroller it doesn't display the scrollers image until you scroll.

the code above fixed that, but since you aren't going to use that, i was wondering if you would fix this.

message.getparam1() isn't returning the scroller buttons id when it first regains focus.

thanks,
For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
Reply
#7
hi there - i can't seem to get it to not show a background icon. perhaps you could detail the exact procedure so i can see what it is requires the fix?

cheers,
jonathan
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#8
hi,

use project mayhem and change the id for the dialogsubmenu to 16. also change the scroller's onright to 16. Smile then move to the dialogsubmenu button and the image will be hidden. then move back to the scroller and it won't be visible until you move up or down.

thanks
For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
Reply
#9
done.
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#10
thanks
For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
Reply

Logout Mark Read Team Forum Stats Members Help
Idea for homepage0