STORM-1334 Console debug data scrolls away too quickly and is hard to read
parent
12d9d1d3ef
commit
e2a531791e
|
|
@ -442,6 +442,7 @@ Jonathan Yap
|
|||
STORM-1095
|
||||
STORM-1236
|
||||
STORM-1259
|
||||
STORM-1334
|
||||
Kage Pixel
|
||||
VWR-11
|
||||
Ken March
|
||||
|
|
|
|||
|
|
@ -132,6 +132,9 @@ void LLConsole::setFontSize(S32 size_index)
|
|||
|
||||
void LLConsole::draw()
|
||||
{
|
||||
// Units in pixels
|
||||
static const F32 padding_horizontal = 10;
|
||||
static const F32 padding_vertical = 3;
|
||||
LLGLSUIDefault gls_ui;
|
||||
|
||||
// skip lines added more than mLinePersistTime ago
|
||||
|
|
@ -176,11 +179,9 @@ void LLConsole::draw()
|
|||
// draw remaining lines
|
||||
F32 y_pos = 0.f;
|
||||
|
||||
LLUIImagePtr imagep = LLUI::getUIImage("Rounded_Square");
|
||||
LLUIImagePtr imagep = LLUI::getUIImage("transparent");
|
||||
|
||||
// F32 console_opacity = llclamp(gSavedSettings.getF32("ConsoleBackgroundOpacity"), 0.f, 1.f);
|
||||
F32 console_opacity = llclamp(LLUI::sSettingGroups["config"]->getF32("ConsoleBackgroundOpacity"), 0.f, 1.f);
|
||||
// LLColor4 color = LLUIColorTable::instance().getColor("ConsoleBackground");
|
||||
LLColor4 color = LLUIColorTable::instance().getColor("ConsoleBackground");
|
||||
color.mV[VALPHA] *= console_opacity;
|
||||
|
||||
|
|
@ -188,8 +189,8 @@ void LLConsole::draw()
|
|||
|
||||
for(paragraph_it = mParagraphs.rbegin(); paragraph_it != mParagraphs.rend(); paragraph_it++)
|
||||
{
|
||||
S32 target_height = llfloor( (*paragraph_it).mLines.size() * line_height + 8);
|
||||
S32 target_width = llfloor( (*paragraph_it).mMaxWidth +15);
|
||||
S32 target_height = llfloor( (*paragraph_it).mLines.size() * line_height + padding_vertical);
|
||||
S32 target_width = llfloor( (*paragraph_it).mMaxWidth + padding_horizontal);
|
||||
|
||||
y_pos += ((*paragraph_it).mLines.size()) * line_height;
|
||||
imagep->drawSolid(-14, (S32)(y_pos + line_height - target_height), target_width, target_height, color);
|
||||
|
|
@ -234,7 +235,7 @@ void LLConsole::draw()
|
|||
y_off += line_height;
|
||||
}
|
||||
}
|
||||
y_pos += 8;
|
||||
y_pos += padding_vertical;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -59,10 +59,12 @@ LLDebugView::LLDebugView(const LLDebugView::Params& p)
|
|||
|
||||
void LLDebugView::init()
|
||||
{
|
||||
// Horizontal percentage of screen (not window) to draw debug data in
|
||||
static const F32 debug_console_percentage = 0.75;
|
||||
LLRect r;
|
||||
LLRect rect = getLocalRect();
|
||||
|
||||
r.set(10, rect.getHeight() - 100, rect.getWidth()/2, 100);
|
||||
r.set(10, rect.getHeight() - 100, rect.getWidth() * debug_console_percentage, 100);
|
||||
LLConsole::Params cp;
|
||||
cp.name("debug console");
|
||||
cp.max_lines(20);
|
||||
|
|
|
|||
|
|
@ -135,6 +135,14 @@
|
|||
name="login_panel_holder"
|
||||
width="1024"/>
|
||||
|
||||
<debug_view follows="all"
|
||||
left="0"
|
||||
top="0"
|
||||
mouse_opaque="false"
|
||||
height="500"
|
||||
name="DebugView"
|
||||
width="1024"/>
|
||||
|
||||
<panel follows="all"
|
||||
height="500"
|
||||
left="0"
|
||||
|
|
@ -154,13 +162,6 @@
|
|||
top="0"
|
||||
width="1024"/>
|
||||
</panel>
|
||||
<debug_view follows="all"
|
||||
left="0"
|
||||
top="0"
|
||||
mouse_opaque="false"
|
||||
height="500"
|
||||
name="DebugView"
|
||||
width="1024"/>
|
||||
</layout_panel>
|
||||
</layout_stack>
|
||||
<panel mouse_opaque="false"
|
||||
|
|
|
|||
Loading…
Reference in New Issue