scene: new button layout
This commit is contained in:
parent
e023fa1848
commit
340f813bfa
@ -24,43 +24,63 @@ void prev_click()
|
|||||||
void next_click()
|
void next_click()
|
||||||
{
|
{
|
||||||
printf("next\n");
|
printf("next\n");
|
||||||
playlist::prev();
|
playlist::next();
|
||||||
}
|
}
|
||||||
|
|
||||||
widget::button prev_button(50, 50, "prev", prev_click);
|
#define __length(c) ((sizeof (c)) / (sizeof (c[0])))
|
||||||
widget::button play_button(50, 50, "play");
|
|
||||||
widget::button pause_button(50, 50, "pause");
|
|
||||||
widget::button stop_button(50, 50, "stop");
|
|
||||||
widget::button next_button(50, 50, "next", next_click);
|
|
||||||
|
|
||||||
widget::widget * left1_children[] = {
|
widget::button play_button(75, 60, "play");
|
||||||
&prev_button,
|
widget::button pause_button(75, 33, "pause");
|
||||||
|
|
||||||
|
widget::button prev_button(79, 30, "prev", prev_click);
|
||||||
|
widget::button next_button(79, 30, "next", next_click);
|
||||||
|
|
||||||
|
widget::button rrr_button(39, 15, "rrr");
|
||||||
|
widget::button rr_button(39, 15, "rr");
|
||||||
|
widget::button ff_button(39, 15, "ff");
|
||||||
|
widget::button fff_button(39, 15, "fff");
|
||||||
|
|
||||||
|
widget::widget * play_pause_children[] = {
|
||||||
&play_button,
|
&play_button,
|
||||||
&pause_button,
|
&pause_button,
|
||||||
&stop_button,
|
};
|
||||||
|
int play_pause_length = __length(play_pause_children);
|
||||||
|
|
||||||
|
widget::widget * prev_next_children[] = {
|
||||||
|
&prev_button,
|
||||||
&next_button,
|
&next_button,
|
||||||
};
|
};
|
||||||
int left1_length = (sizeof (left1_children)) / (sizeof (left1_children[0]));
|
int prev_next_length = __length(prev_next_children);
|
||||||
|
|
||||||
widget::button up_button(50, 50, "up");
|
widget::widget * ff_rr_children[] = {
|
||||||
widget::button down_button(50, 50, "down");
|
&rrr_button,
|
||||||
|
&rr_button,
|
||||||
widget::widget * left2_children[] = {
|
&ff_button,
|
||||||
&up_button,
|
&fff_button,
|
||||||
&down_button,
|
|
||||||
};
|
};
|
||||||
int left2_length = (sizeof (left2_children)) / (sizeof (left2_children[0]));
|
int ff_rr_length = __length(ff_rr_children);
|
||||||
|
|
||||||
widget::left_aligned left_container1(0, 0, 5, left1_children, left1_length);
|
widget::top_aligned play_pause(0, 0, 1, play_pause_children, play_pause_length);
|
||||||
widget::left_aligned left_container2(0, 0, 5, left2_children, left2_length);
|
|
||||||
|
widget::left_aligned prev_next(0, 15, 1, prev_next_children, prev_next_length);
|
||||||
|
|
||||||
|
widget::left_aligned ff_rr(0, 70, 1, ff_rr_children, ff_rr_length);
|
||||||
|
|
||||||
|
widget::widget * prev_next_ff_rr_children[] = {
|
||||||
|
&prev_next,
|
||||||
|
&ff_rr,
|
||||||
|
};
|
||||||
|
int prev_next_ff_rr_length = __length(prev_next_ff_rr_children);
|
||||||
|
|
||||||
|
widget::container prev_next_ff_rr(0, 0, 159, 85, prev_next_ff_rr_children, prev_next_ff_rr_length);
|
||||||
|
|
||||||
widget::widget * top_children[] = {
|
widget::widget * top_children[] = {
|
||||||
&left_container1,
|
&play_pause,
|
||||||
&left_container2,
|
&prev_next_ff_rr,
|
||||||
};
|
};
|
||||||
int top_length = (sizeof (top_children)) / (sizeof (top_children[0]));
|
int top_length = __length(top_children);
|
||||||
|
|
||||||
widget::top_aligned top = widget::top_aligned(100, 100, 5, top_children, top_length);
|
widget::left_aligned top(100, 100, 20, top_children, top_length);
|
||||||
|
|
||||||
namespace scene::tracker {
|
namespace scene::tracker {
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user