- Ja mostra el panel de propietats que toca segons el que està seleccionat.
This commit is contained in:
@@ -320,27 +320,6 @@ bool game::loop()
|
||||
draw::color(WHITE);
|
||||
draw::fillrect(0, 0, 100, 240);
|
||||
|
||||
/*
|
||||
bool change = false;
|
||||
|
||||
change |= btn("ROOM WIDTH:", 10, 40, room::editor::refWidth(), 0, 3);
|
||||
change |= btn("ROOM HEIGHT:", 10, 55, room::editor::refHeight(), 0, 3);
|
||||
|
||||
draw::print("DOORS:", 10, 80, 15, 0);
|
||||
change |= btn_small(32, 80, room::editor::refDoor(XN), -1, 5);
|
||||
change |= btn_small(49, 80, room::editor::refDoor(YP), -1, 5);
|
||||
change |= btn_small(66, 80, room::editor::refDoor(XP), -1, 5);
|
||||
change |= btn_small(83, 80, room::editor::refDoor(YN), -1, 5);
|
||||
|
||||
btn("COLOR:", 10, 140, room::editor::refColor(), 5, 11);
|
||||
btn("FLOOR:", 10, 155, room::editor::refFloorTex(), 0, 5);
|
||||
btn("WALLS:", 10, 170, room::editor::refWallTex(), 0, 5);
|
||||
btn("DOORS:", 10, 185, room::editor::refDoorTex(), 0, 4);
|
||||
btn("WDOORS:", 10, 200, room::editor::refWallDoorTex(), 0, 5);
|
||||
|
||||
if (change) room::update();
|
||||
*/
|
||||
|
||||
draw::color(LIGHT+WHITE);
|
||||
draw::fillrect(2, 2, 96, 236);
|
||||
draw::color(PAPER);
|
||||
@@ -410,40 +389,38 @@ bool game::loop()
|
||||
draw::color(WHITE);
|
||||
draw::fillrect(0, 0, 100, 240);
|
||||
|
||||
draw::setViewport(420, 2, 100, 238);
|
||||
bool room_changed = false;
|
||||
|
||||
draw::color(LIGHT+WHITE);
|
||||
draw::fillrect(2, 0, 96, 100);
|
||||
draw::color(PAPER);
|
||||
draw::rect(2, 0, 96, 100);
|
||||
switch (section)
|
||||
{
|
||||
case SECTION_GENERAL:
|
||||
break;
|
||||
|
||||
/*
|
||||
const int mx = draw::getLocalX(input::mouseX());
|
||||
const int my = draw::getLocalY(input::mouseY());
|
||||
const bool btnDown = input::mouseBtn(1) || input::mouseBtn(3);
|
||||
case SECTION_ROOM:
|
||||
|
||||
int line = 0;
|
||||
act = actor::getFirst();
|
||||
while (act) {
|
||||
if ((act->flags&FLAG_NOEDITOR)!=FLAG_NOEDITOR) {
|
||||
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=1;
|
||||
}
|
||||
draw::print(act->name, 6, 4+line*9, LIGHT+WHITE, BLACK);
|
||||
line++;
|
||||
}
|
||||
act = act->next;
|
||||
}
|
||||
*/
|
||||
room_changed |= btn("ROOM WIDTH:", 10, 40, room::editor::refWidth(), 0, 3);
|
||||
room_changed |= btn("ROOM HEIGHT:", 10, 55, room::editor::refHeight(), 0, 3);
|
||||
|
||||
draw::print("DOORS:", 10, 80, 15, 0);
|
||||
room_changed |= btn_small(32, 80, room::editor::refDoor(XN), -1, 5);
|
||||
room_changed |= btn_small(49, 80, room::editor::refDoor(YP), -1, 5);
|
||||
room_changed |= btn_small(66, 80, room::editor::refDoor(XP), -1, 5);
|
||||
room_changed |= btn_small(83, 80, room::editor::refDoor(YN), -1, 5);
|
||||
|
||||
room_changed |= btn("COLOR:", 10, 140, room::editor::refColor(), 5, 11);
|
||||
room_changed |= btn("FLOOR:", 10, 155, room::editor::refFloorTex(), 0, 5);
|
||||
room_changed |= btn("WALLS:", 10, 170, room::editor::refWallTex(), 0, 5);
|
||||
room_changed |= btn("DOORS:", 10, 185, room::editor::refDoorTex(), 0, 4);
|
||||
room_changed |= btn("WDOORS:", 10, 200, room::editor::refWallDoorTex(), 0, 5);
|
||||
|
||||
if (room_changed) room::update();
|
||||
break;
|
||||
|
||||
case SECTION_ACTOR:
|
||||
act = actor::getSelected();
|
||||
if (act)
|
||||
{
|
||||
draw::setViewport(420, 90, 100, 150);
|
||||
//draw::setViewport(420, 90, 100, 150);
|
||||
|
||||
btn_txt("NAME:", 2, 0, act->name);
|
||||
if (btn_opt2("BMP:", 2, 10, act->bmp, gifs)) {
|
||||
@@ -503,6 +480,9 @@ bool game::loop()
|
||||
btn_check(24+38, 140, "YN", act->react_push, PUSH_YN);
|
||||
btn_check(24+50, 140, "ZP", act->react_push, PUSH_ZP);
|
||||
btn_check(24+62, 140, "ZN", act->react_push, PUSH_ZN);
|
||||
}
|
||||
break;
|
||||
};
|
||||
|
||||
/*
|
||||
break;
|
||||
@@ -538,7 +518,6 @@ bool game::loop()
|
||||
}
|
||||
break;
|
||||
*/
|
||||
}
|
||||
|
||||
draw::render();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user