Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit112557b

Browse files
committed
EngineSettings: Add property for setting WidgetLog padding
1 parent9a16a43 commit112557b

File tree

5 files changed

+13
-2
lines changed

5 files changed

+13
-2
lines changed

‎RELEASE_NOTES.txt‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ Engine features:
4141
* Support using gamepad during initial launch menus.
4242
* Added prompt for language on first launch.
4343
* Added 'show_permadeath' option to menus/gamenew.txt config.
44+
* Added 'log.padding' property to engine/widget_settings.txt config.
4445
* Android: Enabled use of external input devices (gamepads, keyboards, mice)
4546

4647
Engine fixes:

‎src/EngineSettings.cpp‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1005,6 +1005,8 @@ void EngineSettings::Widgets::load() {
10051005

10061006
scrollbar_bg_color =Color(0,0,0,64);
10071007

1008+
log_padding =4;
1009+
10081010
FileParser infile;
10091011
// @CLASS EngineSettings: Widgets|Description of engine/widget_settings.txt
10101012
if (infile.open("engine/widget_settings.txt", FileParser::MOD_FILE, FileParser::ERROR_NONE)) {
@@ -1077,6 +1079,12 @@ void EngineSettings::Widgets::load() {
10771079
scrollbar_bg_color =Parse::toRGBA(infile.val);
10781080
}
10791081
}
1082+
elseif (infile.section =="log") {
1083+
if (infile.key =="padding") {
1084+
// @ATTR log.padding|int|The padding in pixels of the log text area.
1085+
log_padding =Parse::toInt(infile.val);
1086+
}
1087+
}
10801088
}
10811089
}
10821090
}

‎src/EngineSettings.h‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -284,6 +284,7 @@ class EngineSettings {
284284
Point listbox_text_margin;
285285
int horizontal_list_text_width;
286286
Color scrollbar_bg_color;
287+
int log_padding;
287288
};
288289

289290
classXPTable {

‎src/Version.cpp‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ FLARE. If not, see http://www.gnu.org/licenses/
3030

3131
#include<SDL.h>
3232

33-
VersionVersionInfo::ENGINE(1,14,193);
33+
VersionVersionInfo::ENGINE(1,14,194);
3434
VersionVersionInfo::MIN(0,0,0);
3535
VersionVersionInfo::MAX(USHRT_MAX, USHRT_MAX, USHRT_MAX);
3636

‎src/WidgetLog.cpp‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ FLARE. If not, see http://www.gnu.org/licenses/
2020
*/
2121

2222
#include"CommonIncludes.h"
23+
#include"EngineSettings.h"
2324
#include"FontEngine.h"
2425
#include"MessageEngine.h"
2526
#include"RenderDevice.h"
@@ -30,7 +31,7 @@ FLARE. If not, see http://www.gnu.org/licenses/
3031

3132
WidgetLog::WidgetLog (int width,int height)
3233
: scroll_box(new WidgetScrollBox(width, height))
33-
, padding(4)
34+
, padding(eset->widgets.log_padding)
3435
, max_messages(MAX_MESSAGES)
3536
, updated(false)
3637
, next_color(font->getColor(FontEngine::COLOR_MENU_NORMAL))

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp