Codechange: use int32_t instead of uint16_t for scroll bar position/size/capacity
(cherry picked from commit d09b5aaeba
)
# Conflicts:
# src/newgrf_debug_gui.cpp
# src/newgrf_gui.cpp
# src/widget_type.h
This commit is contained in:

committed by
Jonathan G Rennison

parent
2219b8e378
commit
5d8e40cad4
@@ -596,7 +596,7 @@ struct FramerateWindow : Window {
|
||||
void DrawElementTimesColumn(const Rect &r, StringID heading_str, const CachedDecimal *values) const
|
||||
{
|
||||
const Scrollbar *sb = this->GetScrollbar(WID_FRW_SCROLLBAR);
|
||||
uint16_t skip = sb->GetPosition();
|
||||
int32_t skip = sb->GetPosition();
|
||||
int drawable = this->num_displayed;
|
||||
int y = r.top;
|
||||
DrawString(r.left, r.right, y, heading_str, TC_FROMSTRING, SA_CENTER, true);
|
||||
@@ -618,7 +618,7 @@ struct FramerateWindow : Window {
|
||||
void DrawElementAllocationsColumn(const Rect &r) const
|
||||
{
|
||||
const Scrollbar *sb = this->GetScrollbar(WID_FRW_SCROLLBAR);
|
||||
uint16_t skip = sb->GetPosition();
|
||||
int32_t skip = sb->GetPosition();
|
||||
int drawable = this->num_displayed;
|
||||
int y = r.top;
|
||||
DrawString(r.left, r.right, y, STR_FRAMERATE_MEMORYUSE, TC_FROMSTRING, SA_CENTER, true);
|
||||
@@ -652,7 +652,7 @@ struct FramerateWindow : Window {
|
||||
case WID_FRW_TIMES_NAMES: {
|
||||
/* Render a column of titles for performance element names */
|
||||
const Scrollbar *sb = this->GetScrollbar(WID_FRW_SCROLLBAR);
|
||||
uint16_t skip = sb->GetPosition();
|
||||
int32_t skip = sb->GetPosition();
|
||||
int drawable = this->num_displayed;
|
||||
int y = r.top + GetCharacterHeight(FS_NORMAL) + WidgetDimensions::scaled.vsep_normal; // first line contains headings in the value columns
|
||||
for (PerformanceElement e : DISPLAY_ORDER_PFE) {
|
||||
@@ -696,8 +696,8 @@ struct FramerateWindow : Window {
|
||||
case WID_FRW_TIMES_AVERAGE: {
|
||||
/* Open time graph windows when clicking detail measurement lines */
|
||||
const Scrollbar *sb = this->GetScrollbar(WID_FRW_SCROLLBAR);
|
||||
int line = sb->GetScrolledRowFromWidget(pt.y, this, widget, WidgetDimensions::scaled.vsep_normal + GetCharacterHeight(FS_NORMAL));
|
||||
if (line != INT_MAX) {
|
||||
int32_t line = sb->GetScrolledRowFromWidget(pt.y, this, widget, WidgetDimensions::scaled.vsep_normal + GetCharacterHeight(FS_NORMAL));
|
||||
if (line != INT32_MAX) {
|
||||
line++;
|
||||
/* Find the visible line that was clicked */
|
||||
for (PerformanceElement e : DISPLAY_ORDER_PFE) {
|
||||
|
Reference in New Issue
Block a user