2005-02-15, 05:21
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
thank you for considering this.
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.