Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
...
Checking mergeability… Don't worry, you can still create the pull request.
  • 2 commits
  • 2 files changed
  • 0 commit comments
  • 1 contributor
Showing with 28 additions and 27 deletions.
  1. +17 −7 apple/GemRB.xcodeproj/project.pbxproj
  2. +11 −20 gemrb/core/GUI/TextArea.cpp
View
24 apple/GemRB.xcodeproj/project.pbxproj
@@ -391,6 +391,7 @@
A2D0505214D0B09F00D8CD77 /* SDL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A2D0505014D0B06C00D8CD77 /* SDL.framework */; };
A2D0505414D0C17500D8CD77 /* SDL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A2D0505014D0B06C00D8CD77 /* SDL.framework */; };
A2DB6D5A15D9EE8C00D70E88 /* MessageWindowLogger.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A230584715D5BBCC00BDF69C /* MessageWindowLogger.cpp */; };
+ A2DBE468186C862F00B39AF8 /* SDLSurfaceSprite2D.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A2EC2F92176BD44C00FD960E /* SDLSurfaceSprite2D.cpp */; };
A2DE329914EB071200117503 /* Logger.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A2DE329714EB071200117503 /* Logger.cpp */; };
A2DE329A14EB071200117503 /* Logger.h in Headers */ = {isa = PBXBuildFile; fileRef = A2DE329814EB071200117503 /* Logger.h */; };
A2DE32AD14EB0C6900117503 /* Logger.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A2DE329714EB071200117503 /* Logger.cpp */; };
@@ -1371,7 +1372,7 @@
A29504771609721300BB22AA /* TTFImporter.so */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = TTFImporter.so; sourceTree = BUILT_PRODUCTS_DIR; };
A2969F0D168CDC0D00D9C6FC /* CombatInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CombatInfo.cpp; sourceTree = "<group>"; };
A2969F0E168CDC0D00D9C6FC /* CombatInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CombatInfo.h; sourceTree = "<group>"; };
- A298DD1114EB4E8C00F59F56 /* SDL2Video.so */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = SDL2Video.so; sourceTree = BUILT_PRODUCTS_DIR; };
+ A298DD1114EB4E8C00F59F56 /* SDLVideo.so */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = SDLVideo.so; sourceTree = BUILT_PRODUCTS_DIR; };
A298DD1314EB4EDE00F59F56 /* SDL12Video.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SDL12Video.cpp; sourceTree = "<group>"; };
A298DD1414EB4EDE00F59F56 /* SDL12Video.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL12Video.h; sourceTree = "<group>"; };
A298DD1714EB4EEB00F59F56 /* SDL20Video.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SDL20Video.cpp; sourceTree = "<group>"; };
@@ -2198,7 +2199,7 @@
A276B4AF13A28AEE00D41A8A /* ZLibManager.so */,
A276B4F413A28C0400D41A8A /* STOImporter.so */,
A2F0505113ABB80B0023B7EB /* SAVImporter.so */,
- A298DD1114EB4E8C00F59F56 /* SDL2Video.so */,
+ A298DD1114EB4E8C00F59F56 /* SDLVideo.so */,
A2BD125615A7EDFE000FAB95 /* VLCPlayer.so */,
A29504771609721300BB22AA /* TTFImporter.so */,
A2FE2C8116F2316400DDC6C7 /* NullSource.so */,
@@ -4064,7 +4065,7 @@
);
name = SDL2Video;
productName = SDLVideo;
- productReference = A298DD1114EB4E8C00F59F56 /* SDL2Video.so */;
+ productReference = A298DD1114EB4E8C00F59F56 /* SDLVideo.so */;
productType = "com.apple.product-type.library.dynamic";
};
A29BF7B113A0380F00C812DD /* BAMImporter */ = {
@@ -4724,6 +4725,7 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
+ A2DBE468186C862F00B39AF8 /* SDLSurfaceSprite2D.cpp in Sources */,
A298DD0814EB4E8C00F59F56 /* CocoaWrapper.m in Sources */,
A298DD0914EB4E8C00F59F56 /* SDLVideo.cpp in Sources */,
A298DD1A14EB4EEB00F59F56 /* SDL20Video.cpp in Sources */,
@@ -6613,14 +6615,18 @@
DYLIB_CURRENT_VERSION = "";
EXECUTABLE_EXTENSION = so;
EXECUTABLE_PREFIX = "";
+ FRAMEWORK_SEARCH_PATHS = (
+ "$(inherited)",
+ "$(LOCAL_LIBRARY_DIR)/Frameworks",
+ );
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
HEADER_SEARCH_PATHS = (
- /Library/Frameworks/SDL.framework/Headers,
+ /Library/Frameworks/SDL2.framework/Headers,
"$(HEADER_SEARCH_PATHS)",
);
INSTALL_PATH = "$(HOME)/Application Support/GemRB/plugins";
MACH_O_TYPE = mh_bundle;
- PRODUCT_NAME = SDL2Video;
+ PRODUCT_NAME = SDLVideo;
UNEXPORTED_SYMBOLS_FILE = "";
};
name = Debug;
@@ -6634,14 +6640,18 @@
DYLIB_CURRENT_VERSION = "";
EXECUTABLE_EXTENSION = so;
EXECUTABLE_PREFIX = "";
+ FRAMEWORK_SEARCH_PATHS = (
+ "$(inherited)",
+ "$(LOCAL_LIBRARY_DIR)/Frameworks",
+ );
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
HEADER_SEARCH_PATHS = (
- /Library/Frameworks/SDL.framework/Headers,
+ /Library/Frameworks/SDL2.framework/Headers,
"$(HEADER_SEARCH_PATHS)",
);
INSTALL_PATH = "$(HOME)/Application Support/GemRB/plugins";
MACH_O_TYPE = mh_bundle;
- PRODUCT_NAME = SDL2Video;
+ PRODUCT_NAME = SDLVideo;
UNEXPORTED_SYMBOLS_FILE = "";
};
name = Release;
View
31 gemrb/core/GUI/TextArea.cpp
@@ -93,6 +93,9 @@ void TextArea::RefreshSprite(const char *portrait)
bool TextArea::NeedsDraw()
{
if (Flags&IE_GUI_TEXTAREA_SMOOTHSCROLL) {
+ if (startrow == rows) { // the text is offscreen
+ return false;
+ }
//this might look better in GlobalTimer
//or you might want to change the animated button to work like this
static bool redraw = true;
@@ -111,8 +114,11 @@ bool TextArea::NeedsDraw()
void TextArea::DrawInternal(Region& clip)
{
- Video *video = core->GetVideoDriver();
+ if (lines.size() == 0) {
+ return;
+ }
+ Video *video = core->GetVideoDriver();
if (Flags&IE_GUI_TEXTAREA_SPEAKER) {
if (AnimPicture) {
video->BlitSprite(AnimPicture, clip.x, clip.y, true, &clip);
@@ -121,29 +127,22 @@ void TextArea::DrawInternal(Region& clip)
}
}
- if (Flags &IE_GUI_TEXTAREA_SMOOTHSCROLL)
+ if (Flags&IE_GUI_TEXTAREA_SMOOTHSCROLL)
{
- unsigned long thisTime;
-
- thisTime = GetTickCount();
+ unsigned long thisTime = GetTickCount();
if (thisTime>starttime) {
starttime = thisTime+ticks;
-
TextYPos++;// can't use ScrollToY
if (TextYPos % ftext->maxHeight == 0) SetRow(startrow + 1);
}
}
- if (lines.size() == 0) {
- return;
- }
- size_t linesize = lines.size() - 1; // -1 because 0 counts
-
//if textarea is 'selectable' it actually means, it is a listbox
//in this case the selected value equals the line number
//if it is 'not selectable' it can still have selectable lines
//but then it is like the dialog window in the main game screen:
//the selected value is encoded into the line
+ size_t linesize = lines.size() - 1; // -1 because 0 counts
if (!(Flags & IE_GUI_TEXTAREA_SELECTABLE) ) {
char* Buffer = (char *) malloc( 1 );
Buffer[0] = 0;
@@ -206,14 +205,6 @@ void TextArea::DrawInternal(Region& clip)
IE_FONT_ALIGN_LEFT, finit, Cursor, pos );
free( Buffer );
video->SetClipRect( NULL );
-
- if ((Flags &IE_GUI_TEXTAREA_SMOOTHSCROLL)
- && linesize <= (size_t)(1 + (Height - 1) / ftext->maxHeight)) {
- // streaming text: keep pushing newlines until we have an entire areas worth of them.
- // this way it will appear that the text scrolls out of view
- AppendText("\n", -1);
- }
-
return;
}
// normal scrolling textarea
@@ -669,7 +660,7 @@ void TextArea::ScrollToY(unsigned long y, Control* sender)
/** Set Starting Row */
void TextArea::SetRow(int row)
{
- if (row < rows) {
+ if (row <= rows) {
startrow = row;
TextYPos = row * ftext->maxHeight;
}

No commit comments for this range

Something went wrong with that request. Please try again.