- Nou diseny del treeview

This commit is contained in:
2024-07-24 13:34:41 +02:00
parent 3f6082328e
commit 087ed163cb

View File

@@ -424,6 +424,7 @@ namespace modules
}
int line = -treeview_scroll;
/*
if (section==SECTION_GENERAL)
{
draw::color(LIGHT+BLUE);
@@ -432,47 +433,62 @@ namespace modules
if ((mx>=2) && (mx<98) && (my>=2+line*9) && (my<2+9+line*9) && btnDown) {
section = SECTION_GENERAL;
}
draw::print("-THE POOL", 6, 4+line*9, LIGHT+WHITE, BLACK);
line++;
for (int i=0;i<64;++i)
//draw::print("-THE POOL", 6, 4+line*9, LIGHT+WHITE, BLACK);
//line++;
*/
if (section==SECTION_ROOM)
{
if (room::editor::roomExists(i))
for (int i=0;i<MAX_ROOMS;++i)
{
if (section==SECTION_ROOM && i == room::editor::getCurrentRoom())
if (room::editor::roomExists(i))
{
draw::color(LIGHT+BLUE);
draw::fillrect(4, 2+line*9, 92, 9);
}
if ((mx>=2) && (mx<98) && (my>=2+line*9) && (my<2+9+line*9) && btnDown) {
room::load(i);
section = SECTION_ROOM;
}
char num[] = "+ROOM 00";
num[6] = int(i/10)+48;
num[7] = (i%10)+48;
draw::print(num, 10, 4+line*9, LIGHT+WHITE, BLACK); line++;
if (i==room::editor::getCurrentRoom())
{
act = actor::getFirst();
while (act) {
if ((act->flags&FLAG_NOEDITOR)!=FLAG_NOEDITOR && (act->flags&FLAG_HERO)!=FLAG_HERO) {
if (section==SECTION_ACTOR && act==actor::getSelected()) {
draw::color(LIGHT+BLUE);
draw::fillrect(4, 2+line*9, 92, 9);
}
if ((mx>=2) && (mx<98) && (my>=2+line*9) && (my<2+9+line*9) && btnDown) {
actor::select(act);
section = SECTION_ACTOR;
}
draw::print(act->name, 14, 4+line*9, LIGHT+WHITE, BLACK);
line++;
}
act = act->next;
if (i == room::editor::getCurrentRoom())
{
draw::color(LIGHT+BLUE);
draw::fillrect(4, 2+line*9, 92, 9);
}
if ((mx>=2) && (mx<98) && (my>=2+line*9) && (my<2+9+line*9) && btnDown) {
if (i == room::editor::getCurrentRoom()) {
section = SECTION_ACTOR;
} else {
room::load(i);
}
}
char num[] = "+ROOM 00";
num[6] = int(i/10)+48;
num[7] = (i%10)+48;
draw::print(num, 6, 4+line*9, LIGHT+WHITE, BLACK); line++;
}
}
} else if (section==SECTION_ACTOR)
{
if ((mx>=2) && (mx<98) && (my>=2+line*9) && (my<2+9+line*9) && btnDown) {
section = SECTION_ROOM;
}
const int i = room::editor::getCurrentRoom();
char num[] = "-ROOM 00";
num[6] = int(i/10)+48;
num[7] = (i%10)+48;
draw::print(num, 6, 4+line*9, LIGHT+WHITE, BLACK); line++;
act = actor::getFirst();
while (act)
{
if ((act->flags&FLAG_NOEDITOR)!=FLAG_NOEDITOR && (act->flags&FLAG_HERO)!=FLAG_HERO) {
if (act==actor::getSelected()) {
draw::color(LIGHT+BLUE);
draw::fillrect(4, 2+line*9, 92, 9);
}
if ((mx>=2) && (mx<98) && (my>=2+line*9) && (my<2+9+line*9) && btnDown) {
actor::select(act);
section = SECTION_ACTOR;
}
draw::print(act->name, 14, 4+line*9, LIGHT+WHITE, BLACK);
line++;
}
act = act->next;
}
}
if ((line+treeview_scroll)>24)