Fix dialog frames not using the inset style
The framestyle format parameter now does nothing. This is temporary.
This commit is contained in:
@@ -276,19 +276,19 @@ bool cControl::triggerFocusHandler(cDialog&, std::string, bool){
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void cControl::drawFrame(short amt, bool med_or_lt){
|
void cControl::drawFrame(short amt, bool){
|
||||||
// dk_gray had a 0..65535 component of 12287, and med_gray had a 0..65535 component of 24574
|
// dk_gray had a 0..65535 component of 12287, and med_gray had a 0..65535 component of 24574
|
||||||
static sf::Color lt_gray = {224,224,224},dk_gray = {48,48,48},med_gray = {96,96,96};
|
static sf::Color lt_gray = {224,224,224},dk_gray = {48,48,48};
|
||||||
rectangle rect = frame, ul_rect;
|
rectangle rect = frame, ul_rect;
|
||||||
|
|
||||||
inWindow->setActive();
|
inWindow->setActive();
|
||||||
|
|
||||||
rect.inset(-amt,-amt);
|
rect.inset(-amt,-amt);
|
||||||
ul_rect = rect;
|
ul_rect = rect;
|
||||||
ul_rect.left -= 1;
|
ul_rect.right -= 1;
|
||||||
ul_rect.top -= 1;
|
ul_rect.bottom -= 1;
|
||||||
|
|
||||||
frame_rect(*inWindow, rect, med_or_lt ? med_gray : lt_gray);
|
frame_rect(*inWindow, rect, lt_gray);
|
||||||
clip_rect(*inWindow, ul_rect);
|
clip_rect(*inWindow, ul_rect);
|
||||||
frame_rect(*inWindow, rect, dk_gray);
|
frame_rect(*inWindow, rect, dk_gray);
|
||||||
undo_clip(*inWindow);
|
undo_clip(*inWindow);
|
||||||
|
@@ -218,11 +218,19 @@ void redraw_screen() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void frame_dlog_rect(sf::RenderWindow& target, rectangle rect) {
|
static void frame_dlog_rect(sf::RenderWindow& target, rectangle rect) {
|
||||||
cTextMsg text(target);
|
// dk_gray had a 0..65535 component of 12287, and med_gray had a 0..65535 component of 24574
|
||||||
text.setFormat(TXT_FRAME, true);
|
static sf::Color dk_gray = {48,48,48},med_gray = {96,96,96};
|
||||||
text.setFormat(TXT_FRAMESTYLE, 1);
|
rectangle ul_rect = rect;
|
||||||
text.setBounds(rect);
|
|
||||||
text.draw();
|
rect.inset(-2,-2);
|
||||||
|
ul_rect = rect;
|
||||||
|
ul_rect.right -= 1;
|
||||||
|
ul_rect.bottom -= 1;
|
||||||
|
|
||||||
|
frame_rect(target, rect, med_gray);
|
||||||
|
clip_rect(target, ul_rect);
|
||||||
|
frame_rect(target, rect, dk_gray);
|
||||||
|
undo_clip(target);
|
||||||
}
|
}
|
||||||
|
|
||||||
void draw_main_screen() {
|
void draw_main_screen() {
|
||||||
|
Reference in New Issue
Block a user