From e5230b5b9fc572cf411ead1336b8649bdd72b767 Mon Sep 17 00:00:00 2001 From: jacob1 Date: Sun, 15 Apr 2018 18:53:02 -0400 Subject: [PATCH 01/11] upgrade to SDL 2 Still currently in process, there are some issues: Windows version doesn't work, mac version might not work, opengl might not work Icon doesn't work (on Linux at least) Lua will need some changes, there are some sdl 1.2 hacks in there When entering fullscreen, the window loses focus When holding down mouse out of bounds, mouse move events stop being sent When letting go of mouse out of bounds, mouseup event doesn't take into account double scale mode Clicking on startup without moving mouse will draw at 0,0 for a frame Renderer probably won't compile because USE_SDL doesn't entirely work ... and maybe others Some nice things were done though: no more blit2, sdl can do the scaling itself 3d effect removed, no reason to support this joke any longer No need to support copy/paste ourselves, sdl does it now text handling done much better now, separate events for key presses and text input when a new window is shown, all events ignored until next tick (ignore textinput event if window shown from key press event like console) --- SConscript | 18 +- src/PowderToy.h | 1 - src/PowderToySDL.cpp | 589 +++--------------- src/SDLCompat.h | 4 +- src/debug/DebugInfo.h | 2 +- src/debug/ParticleDebug.cpp | 2 +- src/debug/ParticleDebug.h | 2 +- src/gui/colourpicker/ColourPickerActivity.cpp | 4 +- src/gui/colourpicker/ColourPickerActivity.h | 2 +- src/gui/console/ConsoleView.cpp | 16 +- src/gui/console/ConsoleView.h | 2 +- .../elementsearch/ElementSearchActivity.cpp | 8 +- src/gui/elementsearch/ElementSearchActivity.h | 4 +- src/gui/game/GameController.cpp | 14 +- src/gui/game/GameController.h | 4 +- src/gui/game/GameView.cpp | 33 +- src/gui/game/GameView.h | 8 +- src/gui/game/PropertyTool.cpp | 4 +- src/gui/game/SignTool.cpp | 4 +- src/gui/interface/Component.cpp | 8 +- src/gui/interface/Component.h | 26 +- src/gui/interface/Engine.cpp | 31 +- src/gui/interface/Engine.h | 9 +- src/gui/interface/Keys.h | 2 + src/gui/interface/Label.cpp | 4 +- src/gui/interface/Label.h | 2 +- src/gui/interface/Mouse.h | 2 +- src/gui/interface/Panel.cpp | 12 +- src/gui/interface/Panel.h | 28 +- src/gui/interface/Textbox.cpp | 276 ++------ src/gui/interface/Textbox.h | 13 +- src/gui/interface/Window.cpp | 31 +- src/gui/interface/Window.h | 10 +- src/gui/localbrowser/LocalBrowserView.cpp | 8 +- src/gui/localbrowser/LocalBrowserView.h | 4 +- src/gui/login/LoginView.cpp | 4 +- src/gui/login/LoginView.h | 2 +- src/gui/options/OptionsController.cpp | 8 - src/gui/options/OptionsController.h | 2 - src/gui/options/OptionsView.cpp | 16 +- src/gui/preview/PreviewView.cpp | 4 +- src/gui/preview/PreviewView.h | 2 +- src/gui/render/RenderView.cpp | 4 +- src/gui/render/RenderView.h | 2 +- src/gui/search/SearchView.cpp | 8 +- src/gui/search/SearchView.h | 4 +- src/gui/tags/TagsView.cpp | 4 +- src/gui/tags/TagsView.h | 2 +- src/lua/CommandInterface.h | 4 +- src/lua/LegacyLuaAPI.cpp | 6 +- src/lua/LuaScriptHelper.h | 2 +- src/lua/LuaScriptInterface.cpp | 18 +- src/lua/LuaScriptInterface.h | 4 +- src/lua/LuaWindow.cpp | 12 +- src/lua/LuaWindow.h | 4 +- 55 files changed, 367 insertions(+), 932 deletions(-) diff --git a/SConscript b/SConscript index 997f01ebd..8418fb57d 100644 --- a/SConscript +++ b/SConscript @@ -245,24 +245,24 @@ def findLibs(env, conf): if not GetOption('renderer'): #Look for SDL runSdlConfig = platform == "Linux" or compilePlatform == "Linux" or platform == "FreeBSD" - if platform == "Darwin" and conf.CheckFramework("SDL"): + if False and platform == "Darwin" and conf.CheckFramework("SDL"): runSdlConfig = False - elif not conf.CheckLib("SDL"): + elif not conf.CheckLib("SDL2"): FatalError("SDL development library not found or not installed") if runSdlConfig: try: - env.ParseConfig('sdl-config --cflags') + env.ParseConfig('sdl2-config --cflags') if GetOption('static'): - env.ParseConfig('sdl-config --static-libs') + env.ParseConfig('sdl2-config --static-libs') else: - env.ParseConfig('sdl-config --libs') + env.ParseConfig('sdl2-config --libs') except: pass #look for SDL.h - if not GetOption('renderer') and not conf.CheckCHeader('SDL.h'): - if conf.CheckCHeader('SDL/SDL.h'): + if not GetOption('renderer') and not conf.CheckCHeader('SDL2.h'): + if conf.CheckCHeader('SDL2/SDL.h'): env.Append(CPPDEFINES=["SDL_INC"]) else: FatalError("SDL.h not found") @@ -555,8 +555,8 @@ if platform == "Windows": envCopy = env.Clone() envCopy.Append(CCFLAGS='-mstackrealign') sources += envCopy.Object('src/simulation/Gravity.cpp') -elif platform == "Darwin": - sources += ["src/SDLMain.m"] +#elif platform == "Darwin": +# sources += ["src/SDLMain.m"] #Program output name diff --git a/src/PowderToy.h b/src/PowderToy.h index aa20e943d..990768677 100644 --- a/src/PowderToy.h +++ b/src/PowderToy.h @@ -5,5 +5,4 @@ void ClipboardPush(ByteString text); ByteString ClipboardPull(); int GetModifiers(); bool LoadWindowPosition(int scale); -void SetCursorEnabled(int enabled); unsigned int GetTicks(); diff --git a/src/PowderToySDL.cpp b/src/PowderToySDL.cpp index 304ef287a..787d9e9ba 100644 --- a/src/PowderToySDL.cpp +++ b/src/PowderToySDL.cpp @@ -29,13 +29,6 @@ #ifndef WIN #include #endif -#ifdef MACOSX -#include -extern "C" { - char * readClipboard(); - void writeClipboard(const char * clipboardData); -} -#endif #include "Format.h" @@ -66,125 +59,22 @@ SDL_SysWMinfo sdl_wminfo; Atom XA_CLIPBOARD, XA_TARGETS, XA_UTF8_STRING; #endif -ByteString clipboardText = ""; - int desktopWidth = 1280, desktopHeight = 1024; -SDL_Surface * sdl_scrn; +SDL_Window * sdl_window; +SDL_Renderer * sdl_renderer; +SDL_Texture * sdl_texture; int scale = 1; bool fullscreen = false; void ClipboardPush(ByteString text) { - clipboardText = text; -#ifdef MACOSX - writeClipboard(text.c_str()); -#elif defined(WIN) - if (OpenClipboard(NULL)) - { - HGLOBAL cbuffer; - char * glbuffer; - - EmptyClipboard(); - - cbuffer = GlobalAlloc(GMEM_DDESHARE, text.size() + 1); - glbuffer = (char*)GlobalLock(cbuffer); - - strcpy(glbuffer, text.c_str()); - - GlobalUnlock(cbuffer); - SetClipboardData(CF_TEXT, cbuffer); - CloseClipboard(); - } -#elif defined(LIN) && defined(SDL_VIDEO_DRIVER_X11) - sdl_wminfo.info.x11.lock_func(); - XSetSelectionOwner(sdl_wminfo.info.x11.display, XA_CLIPBOARD, sdl_wminfo.info.x11.window, CurrentTime); - XFlush(sdl_wminfo.info.x11.display); - sdl_wminfo.info.x11.unlock_func(); -#else - printf("Not implemented: put text on clipboard \"%s\"\n", text.c_str()); -#endif + SDL_SetClipboardText(text.c_str()); } -void EventProcess(SDL_Event event); - ByteString ClipboardPull() { -#ifdef MACOSX - const char *text = readClipboard(); - return text ? ByteString(text) : ""; -#elif defined(WIN) - if (OpenClipboard(NULL)) - { - HANDLE cbuffer; - char * glbuffer; - - cbuffer = GetClipboardData(CF_TEXT); - glbuffer = (char*)GlobalLock(cbuffer); - GlobalUnlock(cbuffer); - CloseClipboard(); - return glbuffer ? ByteString(glbuffer) : ""; - } -#elif defined(LIN) && defined(SDL_VIDEO_DRIVER_X11) - ByteString text = ""; - Window selectionOwner; - sdl_wminfo.info.x11.lock_func(); - selectionOwner = XGetSelectionOwner(sdl_wminfo.info.x11.display, XA_CLIPBOARD); - if (selectionOwner != None) - { - unsigned char *data = NULL; - Atom type; - int format, result; - unsigned long len, bytesLeft; - XConvertSelection(sdl_wminfo.info.x11.display, XA_CLIPBOARD, XA_UTF8_STRING, XA_CLIPBOARD, sdl_wminfo.info.x11.window, CurrentTime); - XFlush(sdl_wminfo.info.x11.display); - sdl_wminfo.info.x11.unlock_func(); - while (1) - { - SDL_Event event; - SDL_WaitEvent(&event); - if (event.type == SDL_SYSWMEVENT) - { - XEvent xevent = event.syswm.msg->event.xevent; - if (xevent.type == SelectionNotify && xevent.xselection.requestor == sdl_wminfo.info.x11.window) - break; - else - EventProcess(event); - } - else - EventProcess(event); - } - sdl_wminfo.info.x11.lock_func(); - XGetWindowProperty(sdl_wminfo.info.x11.display, sdl_wminfo.info.x11.window, XA_CLIPBOARD, 0, 0, 0, AnyPropertyType, &type, &format, &len, &bytesLeft, &data); - if (data) - { - XFree(data); - data = NULL; - } - if (bytesLeft) - { - result = XGetWindowProperty(sdl_wminfo.info.x11.display, sdl_wminfo.info.x11.window, XA_CLIPBOARD, 0, bytesLeft, 0, AnyPropertyType, &type, &format, &len, &bytesLeft, &data); - if (result == Success) - { - text = data ? ByteString((char const *)data) : ""; - XFree(data); - } - else - { - printf("Failed to pull from clipboard\n"); - return "?"; - } - } - else - return ""; - XDeleteProperty(sdl_wminfo.info.x11.display, sdl_wminfo.info.x11.window, XA_CLIPBOARD); - } - sdl_wminfo.info.x11.unlock_func(); - return text; -#else - printf("Not implemented: get text from clipboard\n"); -#endif - return clipboardText; + return ByteString(SDL_GetClipboardText()); } int mousex = 0, mousey = 0; @@ -194,259 +84,12 @@ void blit() SDL_GL_SwapBuffers(); } #else -void DrawPixel(pixel * vid, pixel color, int x, int y) -{ - if (x >= 0 && x < WINDOWW && y >= 0 && y < WINDOWH) - vid[x+y*WINDOWW] = color; -} -// draws a custom cursor, used to make 3D mode work properly (normal cursor ruins the effect) -void DrawCursor(pixel * vid) -{ - for (int j = 0; j <= 9; j++) - { - for (int i = 0; i <= j; i++) - { - if (i == 0 || i == j) - DrawPixel(vid, 0xFFFFFFFF, mousex+i, mousey+j); - else - DrawPixel(vid, 0xFF000000, mousex+i, mousey+j); - } - } - DrawPixel(vid, 0xFFFFFFFF, mousex, mousey+10); - for (int i = 0; i < 5; i++) - { - DrawPixel(vid, 0xFF000000, mousex+1+i, mousey+10); - DrawPixel(vid, 0xFFFFFFFF, mousex+6+i, mousey+10); - } - DrawPixel(vid, 0xFFFFFFFF, mousex, mousey+11); - DrawPixel(vid, 0xFF000000, mousex+1, mousey+11); - DrawPixel(vid, 0xFF000000, mousex+2, mousey+11); - DrawPixel(vid, 0xFFFFFFFF, mousex+3, mousey+11); - DrawPixel(vid, 0xFF000000, mousex+4, mousey+11); - DrawPixel(vid, 0xFF000000, mousex+5, mousey+11); - DrawPixel(vid, 0xFFFFFFFF, mousex+6, mousey+11); - - DrawPixel(vid, 0xFFFFFFFF, mousex, mousey+12); - DrawPixel(vid, 0xFF000000, mousex+1, mousey+12); - DrawPixel(vid, 0xFFFFFFFF, mousex+2, mousey+12); - DrawPixel(vid, 0xFFFFFFFF, mousex+4, mousey+12); - DrawPixel(vid, 0xFF000000, mousex+5, mousey+12); - DrawPixel(vid, 0xFF000000, mousex+6, mousey+12); - DrawPixel(vid, 0xFFFFFFFF, mousex+7, mousey+12); - - DrawPixel(vid, 0xFFFFFFFF, mousex, mousey+13); - DrawPixel(vid, 0xFFFFFFFF, mousex+1, mousey+13); - DrawPixel(vid, 0xFFFFFFFF, mousex+4, mousey+13); - DrawPixel(vid, 0xFF000000, mousex+5, mousey+13); - DrawPixel(vid, 0xFF000000, mousex+6, mousey+13); - DrawPixel(vid, 0xFFFFFFFF, mousex+7, mousey+13); - - DrawPixel(vid, 0xFFFFFFFF, mousex, mousey+14); - for (int i = 0; i < 2; i++) - { - DrawPixel(vid, 0xFFFFFFFF, mousex+5, mousey+14+i); - DrawPixel(vid, 0xFF000000, mousex+6, mousey+14+i); - DrawPixel(vid, 0xFF000000, mousex+7, mousey+14+i); - DrawPixel(vid, 0xFFFFFFFF, mousex+8, mousey+14+i); - - DrawPixel(vid, 0xFFFFFFFF, mousex+6, mousey+16+i); - DrawPixel(vid, 0xFF000000, mousex+7, mousey+16+i); - DrawPixel(vid, 0xFF000000, mousex+8, mousey+16+i); - DrawPixel(vid, 0xFFFFFFFF, mousex+9, mousey+16+i); - } - - DrawPixel(vid, 0xFFFFFFFF, mousex+7, mousey+18); - DrawPixel(vid, 0xFFFFFFFF, mousex+8, mousey+18); -} void blit(pixel * vid) { - if (sdl_scrn) - { - int depth3d = ui::Engine::Ref().Get3dDepth(); - if (depth3d) - DrawCursor(vid); - pixel * src = vid; - int j, x = 0, y = 0, w = WINDOWW, h = WINDOWH, pitch = WINDOWW; - pixel *dst; - if (SDL_MUSTLOCK(sdl_scrn)) - if (SDL_LockSurface(sdl_scrn)<0) - return; - dst=(pixel *)sdl_scrn->pixels+y*sdl_scrn->pitch/PIXELSIZE+x; - if (SDL_MapRGB(sdl_scrn->format,0x33,0x55,0x77)!=PIXPACK(0x335577)) - { - //pixel format conversion, used for strange formats (OS X specifically) - int i; - unsigned int red, green, blue; - pixel px, lastpx, nextpx; - SDL_PixelFormat *fmt = sdl_scrn->format; - if(depth3d) - { - for (j=0; j= depth3d && i < w+depth3d ? src[i-depth3d] : 0; - nextpx = i >= -depth3d && i < w-depth3d ? src[i+depth3d] : 0; - int redshift = PIXB(lastpx) + PIXG(lastpx); - if (redshift > 255) - redshift = 255; - int blueshift = PIXR(nextpx) + PIXG(nextpx); - if (blueshift > 255) - blueshift = 255; - red = ((int)(PIXR(lastpx)*.69f+redshift*.3f)>>fmt->Rloss)<Rshift; - green = ((int)(PIXG(nextpx)*.3f)>>fmt->Gloss)<Gshift; - blue = ((int)(PIXB(nextpx)*.69f+blueshift*.3f)>>fmt->Bloss)<Bshift; - dst[i] = red|green|blue; - } - dst+=sdl_scrn->pitch/PIXELSIZE; - src+=pitch; - } - } - else - { - for (j=0; j>fmt->Rloss)<Rshift; - green = (PIXG(px)>>fmt->Gloss)<Gshift; - blue = (PIXB(px)>>fmt->Bloss)<Bshift; - dst[i] = red|green|blue; - } - dst+=sdl_scrn->pitch/PIXELSIZE; - src+=pitch; - } - } - } - else - { - int i; - if(depth3d) - { - pixel lastpx, nextpx; - for (j=0; j= depth3d && i < w+depth3d ? src[i-depth3d] : 0; - nextpx = i >= -depth3d && i < w-depth3d ? src[i+depth3d] : 0; - int redshift = PIXB(lastpx) + PIXG(lastpx); - if (redshift > 255) - redshift = 255; - int blueshift = PIXR(nextpx) + PIXG(nextpx); - if (blueshift > 255) - blueshift = 255; - dst[i] = PIXRGB((int)(PIXR(lastpx)*.69f+redshift*.3f), (int)(PIXG(nextpx)*.3f), (int)(PIXB(nextpx)*.69f+blueshift*.3f)); - } - dst+=sdl_scrn->pitch/PIXELSIZE; - src+=pitch; - } - } - else - { - for (j=0; jpitch/PIXELSIZE; - src+=pitch; - } - } - } - if (SDL_MUSTLOCK(sdl_scrn)) - SDL_UnlockSurface(sdl_scrn); - SDL_UpdateRect(sdl_scrn,0,0,0,0); - } -} -void blit2(pixel * vid, int currentScale) -{ - if (sdl_scrn) - { - int depth3d = ui::Engine::Ref().Get3dDepth(); - if (depth3d) - DrawCursor(vid); - pixel * src = vid; - int j, x = 0, y = 0, w = WINDOWW, h = WINDOWH, pitch = WINDOWW; - pixel *dst; - pixel px, lastpx, nextpx; - int i,k,sx; - if (SDL_MUSTLOCK(sdl_scrn)) - if (SDL_LockSurface(sdl_scrn)<0) - return; - dst=(pixel *)sdl_scrn->pixels+y*sdl_scrn->pitch/PIXELSIZE+x; - if (SDL_MapRGB(sdl_scrn->format,0x33,0x55,0x77)!=PIXPACK(0x335577)) - { - //pixel format conversion - SDL_PixelFormat *fmt = sdl_scrn->format; - int red, green, blue; - for (j=0; j= depth3d && i < w+depth3d ? src[i-depth3d] : 0; - nextpx = i >= -depth3d && i < w-depth3d ? src[i+depth3d] : 0; - int redshift = PIXB(lastpx) + PIXG(lastpx); - if (redshift > 255) - redshift = 255; - int blueshift = PIXR(nextpx) + PIXG(nextpx); - if (blueshift > 255) - blueshift = 255; - red = ((int)(PIXR(lastpx)*.69f+redshift*.3f)>>fmt->Rloss)<Rshift; - green = ((int)(PIXG(nextpx)*.3f)>>fmt->Gloss)<Gshift; - blue = ((int)(PIXB(nextpx)*.69f+blueshift*.3f)>>fmt->Bloss)<Bshift; - } - else - { - px = src[i]; - red = (PIXR(px)>>fmt->Rloss)<Rshift; - green = (PIXG(px)>>fmt->Gloss)<Gshift; - blue = (PIXB(px)>>fmt->Bloss)<Bshift; - } - for (sx=0; sxpitch/PIXELSIZE; - } - src+=pitch; - } - } - else - { - for (j=0; j= depth3d && i < w+depth3d ? src[i-depth3d] : 0; - nextpx = i >= -depth3d && i < w-depth3d ? src[i+depth3d] : 0; - int redshift = PIXB(lastpx) + PIXG(lastpx); - if (redshift > 255) - redshift = 255; - int blueshift = PIXR(nextpx) + PIXG(nextpx); - if (blueshift > 255) - blueshift = 255; - px = PIXRGB((int)(PIXR(lastpx)*.69f+redshift*.3f), (int)(PIXG(nextpx)*.3f), (int)(PIXB(nextpx)*.69f+blueshift*.3f)); - } - for (sx=0; sxpitch/PIXELSIZE; - } - src+=pitch; - } - } - if (SDL_MUSTLOCK(sdl_scrn)) - SDL_UnlockSurface(sdl_scrn); - SDL_UpdateRect(sdl_scrn,0,0,0,0); - } + SDL_UpdateTexture(sdl_texture, NULL, vid, WINDOWW * sizeof (Uint32)); + SDL_RenderClear(sdl_renderer); + SDL_RenderCopy(sdl_renderer, sdl_texture, NULL, NULL); + SDL_RenderPresent(sdl_renderer); } #endif @@ -460,10 +103,12 @@ int SDLOpen() fprintf(stderr, "Initializing SDL: %s\n", SDL_GetError()); return 1; } - const SDL_VideoInfo * vidInfo = SDL_GetVideoInfo(); - desktopWidth = vidInfo->current_w; - desktopHeight = vidInfo->current_h; - SDL_EnableUNICODE(1); + + SDL_DisplayMode SDLDisplayMode; + SDL_GetCurrentDisplayMode(0, &SDLDisplayMode); + desktopWidth = SDLDisplayMode.w; + desktopHeight = SDLDisplayMode.h; + #if defined(WIN) && defined(WINCONSOLE) //On Windows, SDL redirects stdout to stdout.txt, which can be annoying when debugging, here we redirect back to the console if (console) @@ -490,33 +135,31 @@ int SDLOpen() SendMessage(WindowHandle, WM_SETICON, ICON_BIG, (LPARAM)hIconBig); #elif defined(LIN) SDL_Surface *icon = SDL_CreateRGBSurfaceFrom((void*)app_icon, 48, 48, 24, 144, 0x00FF0000, 0x0000FF00, 0x000000FF, 0); - SDL_WM_SetIcon(icon, (Uint8*)app_icon_bitmap); + //SDL_WM_SetIcon(icon, (Uint8*)app_icon_bitmap); + SDL_SetWindowIcon(sdl_window, icon); SDL_FreeSurface(icon); #endif - SDL_WM_SetCaption("The Powder Toy", "Powder Toy"); - //SDL_EnableKeyRepeat(SDL_DEFAULT_REPEAT_DELAY, SDL_DEFAULT_REPEAT_INTERVAL); atexit(SDL_Quit); return 0; } -SDL_Surface * SDLSetScreen(int newScale, bool newFullscreen) +void SDLSetScreen(int newScale, bool newFullscreen) { + SDL_DestroyTexture(sdl_texture); + SDL_DestroyRenderer(sdl_renderer); + SDL_DestroyWindow(sdl_window); scale = newScale; fullscreen = newFullscreen; - SDL_Surface * surface; -#ifndef OGLI - surface = SDL_SetVideoMode(WINDOWW * newScale, WINDOWH * newScale, 32, SDL_SWSURFACE | (newFullscreen?SDL_FULLSCREEN:0)); -#else - surface = SDL_SetVideoMode(WINDOWW * newScale, WINDOWH * newScale, 32, SDL_OPENGL | SDL_RESIZABLE | (newFullscreen?SDL_FULLSCREEN:0)); -#endif - return surface; -} - -void SetCursorEnabled(int enabled) -{ - SDL_ShowCursor(enabled); + sdl_window = SDL_CreateWindow("The Powder Toy", SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, WINDOWW * newScale, WINDOWH * newScale, + newFullscreen ? SDL_WINDOW_FULLSCREEN_DESKTOP : 0); + sdl_renderer = SDL_CreateRenderer(sdl_window, -1, 0); + if (newScale > 1) + SDL_RenderSetLogicalSize(sdl_renderer, WINDOWW, WINDOWH); + sdl_texture = SDL_CreateTexture(sdl_renderer, SDL_PIXELFORMAT_ARGB8888, SDL_TEXTUREACCESS_STREAMING, WINDOWW, WINDOWH); + //SDL_SetHint(SDL_HINT_RENDER_SCALE_QUALITY, "linear"); + //SDL_SetWindowResizable(sdl_window, SDL_TRUE); } unsigned int GetTicks() @@ -588,7 +231,7 @@ std::map readArguments(int argc, char * argv[]) return arguments; } -SDLKey MapNumpad(SDLKey key) +/*SDLKey MapNumpad(SDLKey key) { switch(key) { @@ -613,18 +256,20 @@ SDLKey MapNumpad(SDLKey key) default: return key; } -} +}*/ int elapsedTime = 0, currentTime = 0, lastTime = 0, currentFrame = 0; unsigned int lastTick = 0; -float fps = 0, delta = 1.0f, inputScale = 1.0f; +float fps = 0, delta = 1.0f; +float inputScaleH = 1.0f, inputScaleV = 1.0f; ui::Engine * engine = NULL; bool showDoubleScreenDialog = false; float currentWidth, currentHeight; void EventProcess(SDL_Event event) { - if (event.type == SDL_KEYDOWN || event.type == SDL_KEYUP) + //inputScale= 1.0f; + /*if (event.type == SDL_KEYDOWN || event.type == SDL_KEYUP) { if (event.key.keysym.unicode==0) { @@ -638,7 +283,7 @@ void EventProcess(SDL_Event event) event.key.keysym.unicode = 0; } } - } + }*/ switch (event.type) { case SDL_QUIT: @@ -646,106 +291,61 @@ void EventProcess(SDL_Event event) engine->Exit(); break; case SDL_KEYDOWN: - if (event.key.keysym.sym == 'q' && (event.key.keysym.mod&KMOD_CTRL)) + if (!event.key.repeat && event.key.keysym.sym == 'q' && (event.key.keysym.mod&KMOD_CTRL)) engine->ConfirmExit(); else - engine->onKeyPress(event.key.keysym.sym, event.key.keysym.unicode, event.key.keysym.mod&KMOD_SHIFT, event.key.keysym.mod&KMOD_CTRL, event.key.keysym.mod&KMOD_ALT); + engine->onKeyPress(event.key.keysym.sym, event.key.keysym.scancode, event.key.repeat, event.key.keysym.mod&KMOD_SHIFT, event.key.keysym.mod&KMOD_CTRL, event.key.keysym.mod&KMOD_ALT); break; case SDL_KEYUP: - engine->onKeyRelease(event.key.keysym.sym, event.key.keysym.unicode, event.key.keysym.mod&KMOD_SHIFT, event.key.keysym.mod&KMOD_CTRL, event.key.keysym.mod&KMOD_ALT); + engine->onKeyRelease(event.key.keysym.sym, event.key.keysym.scancode, event.key.repeat, event.key.keysym.mod&KMOD_SHIFT, event.key.keysym.mod&KMOD_CTRL, event.key.keysym.mod&KMOD_ALT); break; + case SDL_TEXTINPUT: + engine->onTextInput(ByteString(event.text.text).FromUtf8()); + break; + case SDL_MOUSEWHEEL: + { + int x = event.wheel.x; + int y = event.wheel.y; + if (event.wheel.direction == SDL_MOUSEWHEEL_FLIPPED) + { + x *= -1; + y *= -1; + } + bool positiveDir = y == 0 ? x > 0 : y > 0; + engine->onMouseWheel(event.motion.x * inputScaleH, event.motion.y * inputScaleV, positiveDir ? 1 : -1); + break; + } case SDL_MOUSEMOTION: - engine->onMouseMove(event.motion.x*inputScale, event.motion.y*inputScale); - mousex = event.motion.x*inputScale; - mousey = event.motion.y*inputScale; + engine->onMouseMove(event.motion.x * inputScaleH, event.motion.y * inputScaleV); + mousex = event.motion.x * inputScaleH; + mousey = event.motion.y * inputScaleV; break; case SDL_MOUSEBUTTONDOWN: - if (event.button.button == SDL_BUTTON_WHEELUP) - { - engine->onMouseWheel(event.motion.x*inputScale, event.motion.y*inputScale, 1); - } - else if (event.button.button == SDL_BUTTON_WHEELDOWN) - { - engine->onMouseWheel(event.motion.x*inputScale, event.motion.y*inputScale, -1); - } - else - { - engine->onMouseClick(event.motion.x*inputScale, event.motion.y*inputScale, event.button.button); - } - mousex = event.motion.x*inputScale; - mousey = event.motion.y*inputScale; + engine->onMouseClick(event.motion.x * inputScaleH, event.motion.y * inputScaleV, event.button.button); + mousex = event.motion.x * inputScaleH; + mousey = event.motion.y * inputScaleV; break; case SDL_MOUSEBUTTONUP: - if (event.button.button != SDL_BUTTON_WHEELUP && event.button.button != SDL_BUTTON_WHEELDOWN) - engine->onMouseUnclick(event.motion.x*inputScale, event.motion.y*inputScale, event.button.button); - mousex = event.motion.x*inputScale; - mousey = event.motion.y*inputScale; + engine->onMouseUnclick(event.motion.x * inputScaleH, event.motion.y * inputScaleV, event.button.button); + mousex = event.motion.x * inputScaleH; + mousey = event.motion.y * inputScaleV; break; -#ifdef OGLI - case SDL_VIDEORESIZE: + case SDL_WINDOWEVENT: { - float ratio = (float)WINDOWW / WINDOWH; - float width = event.resize.w; - float height = width/ratio; - - sdl_scrn = SDL_SetVideoMode(event.resize.w, height, 32, SDL_OPENGL | SDL_RESIZABLE); - - glViewport(0, 0, width, height); - engine->g->Reset(); - //glScaled(width/currentWidth, height/currentHeight, 1.0f); + if (event.window.event != SDL_WINDOWEVENT_RESIZED) + break; + float width = event.window.data1; + float height = event.window.data2; currentWidth = width; currentHeight = height; - inputScale = (float)WINDOWW/currentWidth; + // this "* scale" thing doesn't really work properly + // currently there is a bug where input doesn't scale properly after resizing, only when double scale mode is active + inputScaleH = (float)WINDOWW * scale / currentWidth; + inputScaleV = (float)WINDOWH * scale / currentHeight; - glLineWidth(currentWidth/(float)WINDOWW); - if(sdl_scrn == NULL) - { - std::cerr << "Oh bugger" << std::endl; - } break; } -#endif -#if defined (USE_SDL) && defined(LIN) && defined(SDL_VIDEO_DRIVER_X11) - case SDL_SYSWMEVENT: - if (event.syswm.msg->subsystem != SDL_SYSWM_X11) - break; - sdl_wminfo.info.x11.lock_func(); - XEvent xe = event.syswm.msg->event.xevent; - if (xe.type==SelectionClear) - { - clipboardText = ""; - } - else if (xe.type==SelectionRequest) - { - XEvent xr; - xr.xselection.type = SelectionNotify; - xr.xselection.requestor = xe.xselectionrequest.requestor; - xr.xselection.selection = xe.xselectionrequest.selection; - xr.xselection.target = xe.xselectionrequest.target; - xr.xselection.property = xe.xselectionrequest.property; - xr.xselection.time = xe.xselectionrequest.time; - if (xe.xselectionrequest.target==XA_TARGETS) - { - // send list of supported formats - Atom targets[] = {XA_TARGETS, XA_STRING, XA_UTF8_STRING}; - xr.xselection.property = xe.xselectionrequest.property; - XChangeProperty(sdl_wminfo.info.x11.display, xe.xselectionrequest.requestor, xe.xselectionrequest.property, XA_ATOM, 32, PropModeReplace, (unsigned char*)targets, (int)(sizeof(targets)/sizeof(Atom))); - } - // TODO: Supporting more targets would be nice - else if ((xe.xselectionrequest.target==XA_STRING || xe.xselectionrequest.target==XA_UTF8_STRING)) - { - XChangeProperty(sdl_wminfo.info.x11.display, xe.xselectionrequest.requestor, xe.xselectionrequest.property, xe.xselectionrequest.target, 8, PropModeReplace, (unsigned char*)clipboardText.c_str(), clipboardText.size()+1); - } - else - { - // refuse clipboard request - xr.xselection.property = None; - } - XSendEvent(sdl_wminfo.info.x11.display, xe.xselectionrequest.requestor, 0, 0, &xr); - } - sdl_wminfo.info.x11.unlock_func(); -#endif } } @@ -786,17 +386,13 @@ void EngineProcess() if(scale != engine->Scale || fullscreen != engine->Fullscreen) { - sdl_scrn = SDLSetScreen(engine->Scale, engine->Fullscreen); - inputScale = 1.0f/(float)scale; + SDLSetScreen(engine->Scale, engine->Fullscreen); } #ifdef OGLI blit(); #else - if(engine->Scale > 1) - blit2(engine->g->vid, engine->Scale); - else - blit(engine->g->vid); + blit(engine->g->vid); #endif int frameTime = SDL_GetTicks() - frameStart; @@ -914,7 +510,8 @@ bool SaveWindowPosition() #endif -void BlueScreen(String detailMessage){ +void BlueScreen(String detailMessage) +{ ui::Engine * engine = &ui::Engine::Ref(); engine->g->fillrect(0, 0, engine->GetWidth(), engine->GetHeight(), 17, 114, 169, 210); @@ -948,10 +545,7 @@ void BlueScreen(String detailMessage){ #ifdef OGLI blit(); #else - if(engine->Scale > 1) - blit2(engine->g->vid, engine->Scale); - else - blit(engine->g->vid); + blit(engine->g->vid); #endif } } @@ -1047,7 +641,7 @@ int main(int argc, char * argv[]) #ifdef WIN LoadWindowPosition(tempScale); #endif - sdl_scrn = SDLSetScreen(tempScale, tempFullscreen); + SDLSetScreen(tempScale, tempFullscreen); #ifdef OGLI SDL_GL_SetAttribute (SDL_GL_DOUBLEBUFFER, 1); @@ -1060,27 +654,9 @@ int main(int argc, char * argv[]) fprintf(stderr, "Initializing Glew: %d\n", status); exit(-1); } -#endif -#if defined (USE_SDL) && defined(LIN) && defined(SDL_VIDEO_DRIVER_X11) - SDL_EventState(SDL_SYSWMEVENT, SDL_ENABLE); - SDL_VERSION(&sdl_wminfo.version); - if(SDL_GetWMInfo(&sdl_wminfo) > 0) - { - sdl_wminfo.info.x11.lock_func(); - XA_CLIPBOARD = XInternAtom(sdl_wminfo.info.x11.display, "CLIPBOARD", 1); - XA_TARGETS = XInternAtom(sdl_wminfo.info.x11.display, "TARGETS", 1); - XA_UTF8_STRING = XInternAtom(sdl_wminfo.info.x11.display, "UTF8_STRING", 1); - sdl_wminfo.info.x11.unlock_func(); - } - else - { - fprintf(stderr, "X11 setup failed, X11 window info not found"); - exit(-1); - } #endif ui::Engine::Ref().g = new Graphics(); ui::Engine::Ref().Scale = scale; - inputScale = 1.0f/float(scale); ui::Engine::Ref().Fullscreen = fullscreen; engine = &ui::Engine::Ref(); @@ -1156,10 +732,7 @@ int main(int argc, char * argv[]) #ifdef OGLI blit(); #else - if(engine->Scale > 1) - blit2(engine->g->vid, engine->Scale); - else - blit(engine->g->vid); + blit(engine->g->vid); #endif ByteString ptsaveArg = arguments["ptsave"]; try @@ -1208,7 +781,7 @@ int main(int argc, char * argv[]) //initial mouse coords int sdl_x, sdl_y; SDL_GetMouseState(&sdl_x, &sdl_y); - engine->onMouseMove(sdl_x*inputScale, sdl_y*inputScale); + engine->onMouseMove(sdl_x * inputScaleH, sdl_y * inputScaleV); EngineProcess(); #ifdef WIN diff --git a/src/SDLCompat.h b/src/SDLCompat.h index 309c3915d..c330c0911 100644 --- a/src/SDLCompat.h +++ b/src/SDLCompat.h @@ -1,7 +1,7 @@ #ifdef USE_SDL #ifdef SDL_INC -#include "SDL/SDL.h" +#include "SDL2/SDL.h" #else #include "SDL.h" #endif @@ -9,7 +9,7 @@ #ifdef INCLUDE_SYSWM #if defined(WIN) || defined(LIN) #ifdef SDL_INC -#include +#include #else #include #endif diff --git a/src/debug/DebugInfo.h b/src/debug/DebugInfo.h index 2414bd669..d41809664 100644 --- a/src/debug/DebugInfo.h +++ b/src/debug/DebugInfo.h @@ -11,5 +11,5 @@ public: unsigned int debugID; virtual void Draw() {} // currentMouse doesn't belong but I don't want to create more hooks at the moment - virtual bool KeyPress(int key, Uint16 character, bool shift, bool ctrl, bool alt, ui::Point currentMouse) { return true; } + virtual bool KeyPress(int key, int scan, bool shift, bool ctrl, bool alt, ui::Point currentMouse) { return true; } }; diff --git a/src/debug/ParticleDebug.cpp b/src/debug/ParticleDebug.cpp index d50ed7a9f..1df0e9e87 100644 --- a/src/debug/ParticleDebug.cpp +++ b/src/debug/ParticleDebug.cpp @@ -57,7 +57,7 @@ void ParticleDebug::Debug(int mode, int x, int y) } } -bool ParticleDebug::KeyPress(int key, Uint16 character, bool shift, bool ctrl, bool alt, ui::Point currentMouse) +bool ParticleDebug::KeyPress(int key, int scan, bool shift, bool ctrl, bool alt, ui::Point currentMouse) { if (key == 'f') { diff --git a/src/debug/ParticleDebug.h b/src/debug/ParticleDebug.h index 719941615..19ef0d613 100644 --- a/src/debug/ParticleDebug.h +++ b/src/debug/ParticleDebug.h @@ -12,7 +12,7 @@ class ParticleDebug : public DebugInfo public: ParticleDebug(unsigned int id, Simulation * sim, GameModel * model); void Debug(int mode, int x, int y); - virtual bool KeyPress(int key, Uint16 character, bool shift, bool ctrl, bool alt, ui::Point currentMouse); + virtual bool KeyPress(int key, int scan, bool shift, bool ctrl, bool alt, ui::Point currentMouse); virtual ~ParticleDebug(); }; diff --git a/src/gui/colourpicker/ColourPickerActivity.cpp b/src/gui/colourpicker/ColourPickerActivity.cpp index 93c58b378..e99302b3c 100644 --- a/src/gui/colourpicker/ColourPickerActivity.cpp +++ b/src/gui/colourpicker/ColourPickerActivity.cpp @@ -239,8 +239,10 @@ void ColourPickerActivity::OnMouseUp(int x, int y, unsigned button) } } -void ColourPickerActivity::OnKeyPress(int key, Uint16 character, bool shift, bool ctrl, bool alt) +void ColourPickerActivity::OnKeyPress(int key, int scan, bool repeat, bool shift, bool ctrl, bool alt) { + if (repeat) + return; if (key == SDLK_TAB) { if (rValue->IsFocused()) diff --git a/src/gui/colourpicker/ColourPickerActivity.h b/src/gui/colourpicker/ColourPickerActivity.h index f8213885b..4aac2f726 100644 --- a/src/gui/colourpicker/ColourPickerActivity.h +++ b/src/gui/colourpicker/ColourPickerActivity.h @@ -36,7 +36,7 @@ public: virtual void OnMouseMove(int x, int y, int dx, int dy); virtual void OnMouseDown(int x, int y, unsigned button); virtual void OnMouseUp(int x, int y, unsigned button); - virtual void OnKeyPress(int key, Uint16 character, bool shift, bool ctrl, bool alt); + virtual void OnKeyPress(int key, int scan, bool repeat, bool shift, bool ctrl, bool alt); virtual void OnTryExit(ExitMethod method); ColourPickerActivity(ui::Colour initialColour, ColourPickedCallback * callback = NULL); virtual ~ColourPickerActivity(); diff --git a/src/gui/console/ConsoleView.cpp b/src/gui/console/ConsoleView.cpp index 4a25dad7b..a9e646731 100644 --- a/src/gui/console/ConsoleView.cpp +++ b/src/gui/console/ConsoleView.cpp @@ -24,17 +24,15 @@ ConsoleView::ConsoleView(): commandField->SetBorder(false); } -void ConsoleView::DoKeyPress(int key, Uint16 character, bool shift, bool ctrl, bool alt) +void ConsoleView::DoKeyPress(int key, int scan, bool repeat, bool shift, bool ctrl, bool alt) { + if ((scan == SDL_SCANCODE_GRAVE && key != '~') || key == SDLK_ESCAPE) + { + c->CloseConsole(); + return; + } switch(key) { - case SDLK_ESCAPE: - case '`': - if (character != '~') - c->CloseConsole(); - else - Window::DoKeyPress(key, character, shift, ctrl, alt); - break; case SDLK_RETURN: case SDLK_KP_ENTER: c->EvaluateCommand(commandField->GetText()); @@ -48,7 +46,7 @@ void ConsoleView::DoKeyPress(int key, Uint16 character, bool shift, bool ctrl, b c->PreviousCommand(); break; default: - Window::DoKeyPress(key, character, shift, ctrl, alt); + Window::DoKeyPress(key, scan, repeat, shift, ctrl, alt); break; } } diff --git a/src/gui/console/ConsoleView.h b/src/gui/console/ConsoleView.h index 22f172c8a..9cb0ab24d 100644 --- a/src/gui/console/ConsoleView.h +++ b/src/gui/console/ConsoleView.h @@ -20,7 +20,7 @@ class ConsoleView: public ui::Window { public: ConsoleView(); virtual void OnDraw(); - virtual void DoKeyPress(int key, Uint16 character, bool shift, bool ctrl, bool alt); + virtual void DoKeyPress(int key, int scan, bool repeat, bool shift, bool ctrl, bool alt); void AttachController(ConsoleController * c_) { c = c_; } void NotifyPreviousCommandsChanged(ConsoleModel * sender); void NotifyCurrentCommandChanged(ConsoleModel * sender); diff --git a/src/gui/elementsearch/ElementSearchActivity.cpp b/src/gui/elementsearch/ElementSearchActivity.cpp index 6f23220fb..827704b8c 100644 --- a/src/gui/elementsearch/ElementSearchActivity.cpp +++ b/src/gui/elementsearch/ElementSearchActivity.cpp @@ -219,8 +219,10 @@ void ElementSearchActivity::OnTick(float dt) } } -void ElementSearchActivity::OnKeyPress(int key, Uint16 character, bool shift, bool ctrl, bool alt) +void ElementSearchActivity::OnKeyPress(int key, int scan, bool repeat, bool shift, bool ctrl, bool alt) { + if (repeat) + return; switch (key) { case SDLK_KP_ENTER: @@ -245,8 +247,10 @@ void ElementSearchActivity::OnKeyPress(int key, Uint16 character, bool shift, bo } } -void ElementSearchActivity::OnKeyRelease(int key, Uint16 character, bool shift, bool ctrl, bool alt) +void ElementSearchActivity::OnKeyRelease(int key, int scan, bool repeat, bool shift, bool ctrl, bool alt) { + if (repeat) + return; switch (key) { case SDLK_LSHIFT: diff --git a/src/gui/elementsearch/ElementSearchActivity.h b/src/gui/elementsearch/ElementSearchActivity.h index a4dfb46e0..7b29bb024 100644 --- a/src/gui/elementsearch/ElementSearchActivity.h +++ b/src/gui/elementsearch/ElementSearchActivity.h @@ -33,8 +33,8 @@ public: void SetActiveTool(int selectionState, Tool * tool); virtual ~ElementSearchActivity(); virtual void OnTick(float dt); - virtual void OnKeyPress(int key, Uint16 character, bool shift, bool ctrl, bool alt); - virtual void OnKeyRelease(int key, Uint16 character, bool shift, bool ctrl, bool alt); + virtual void OnKeyPress(int key, int scan, bool repeat, bool shift, bool ctrl, bool alt); + virtual void OnKeyRelease(int key, int scan, bool repeat, bool shift, bool ctrl, bool alt); virtual void OnDraw(); virtual void ToolTip(ui::Point senderPosition, String ToolTip); }; diff --git a/src/gui/game/GameController.cpp b/src/gui/game/GameController.cpp index 39376c5b6..5b2a0c4a0 100644 --- a/src/gui/game/GameController.cpp +++ b/src/gui/game/GameController.cpp @@ -713,9 +713,11 @@ bool GameController::MouseWheel(int x, int y, int d) return commandInterface->OnMouseWheel(x, y, d); } -bool GameController::KeyPress(int key, Uint16 character, bool shift, bool ctrl, bool alt) +bool GameController::KeyPress(int key, int scan, bool repeat, bool shift, bool ctrl, bool alt) { - bool ret = commandInterface->OnKeyPress(key, character, shift, ctrl, alt); + bool ret = commandInterface->OnKeyPress(key, scan, repeat, shift, ctrl, alt); + if (repeat) + return ret; if (ret) { Simulation * sim = gameModel->GetSimulation(); @@ -783,16 +785,18 @@ bool GameController::KeyPress(int key, Uint16 character, bool shift, bool ctrl, for(std::vector::iterator iter = debugInfo.begin(), end = debugInfo.end(); iter != end; iter++) { if ((*iter)->debugID & debugFlags) - if (!(*iter)->KeyPress(key, character, shift, ctrl, alt, gameView->GetMousePosition())) + if (!(*iter)->KeyPress(key, scan, shift, ctrl, alt, gameView->GetMousePosition())) ret = false; } } return ret; } -bool GameController::KeyRelease(int key, Uint16 character, bool shift, bool ctrl, bool alt) +bool GameController::KeyRelease(int key, int scan, bool repeat, bool shift, bool ctrl, bool alt) { - bool ret = commandInterface->OnKeyRelease(key, character, shift, ctrl, alt); + bool ret = commandInterface->OnKeyRelease(key, scan, repeat, shift, ctrl, alt); + if (repeat) + return ret; if (ret) { Simulation * sim = gameModel->GetSimulation(); diff --git a/src/gui/game/GameController.h b/src/gui/game/GameController.h index 8449cc089..119aeb408 100644 --- a/src/gui/game/GameController.h +++ b/src/gui/game/GameController.h @@ -64,8 +64,8 @@ public: bool MouseDown(int x, int y, unsigned button); bool MouseUp(int x, int y, unsigned button, char type); bool MouseWheel(int x, int y, int d); - bool KeyPress(int key, Uint16 character, bool shift, bool ctrl, bool alt); - bool KeyRelease(int key, Uint16 character, bool shift, bool ctrl, bool alt); + bool KeyPress(int key, int scan, bool repeat, bool shift, bool ctrl, bool alt); + bool KeyRelease(int key, int scan, bool repeat, bool shift, bool ctrl, bool alt); bool MouseTick(); void Tick(); void Exit(); diff --git a/src/gui/game/GameView.cpp b/src/gui/game/GameView.cpp index 49e2985d3..0a3662e0e 100644 --- a/src/gui/game/GameView.cpp +++ b/src/gui/game/GameView.cpp @@ -1374,7 +1374,7 @@ void GameView::BeginStampSelection() buttonTipShow = 120; } -void GameView::OnKeyPress(int key, Uint16 character, bool shift, bool ctrl, bool alt) +void GameView::OnKeyPress(int key, int scan, bool repeat, bool shift, bool ctrl, bool alt) { if (introText > 50) { @@ -1400,6 +1400,8 @@ void GameView::OnKeyPress(int key, Uint16 character, bool shift, bool ctrl, bool c->TranslateSave(ui::Point(0, 1)); return; case 'r': + if (repeat) + return; if (ctrl && shift) { //Vertical flip @@ -1419,6 +1421,14 @@ void GameView::OnKeyPress(int key, Uint16 character, bool shift, bool ctrl, bool } } } + + if (repeat) + return; + if (scan == SDL_SCANCODE_GRAVE) + { + c->ShowConsole(); + return; + } switch(key) { case SDLK_LALT: @@ -1456,9 +1466,6 @@ void GameView::OnKeyPress(int key, Uint16 character, bool shift, bool ctrl, bool case SDLK_TAB: //Tab c->ChangeBrush(); break; - case '`': - c->ShowConsole(); - break; case 'p': case SDLK_F2: if (ctrl) @@ -1657,8 +1664,10 @@ void GameView::OnKeyPress(int key, Uint16 character, bool shift, bool ctrl, bool } } -void GameView::OnKeyRelease(int key, Uint16 character, bool shift, bool ctrl, bool alt) +void GameView::OnKeyRelease(int key, int scan, bool repeat, bool shift, bool ctrl, bool alt) { + if (repeat) + return; switch(key) { case SDLK_LALT: @@ -1689,7 +1698,7 @@ void GameView::OnBlur() drawMode = DrawPoints; c->MouseUp(0, 0, 0, 1); // tell lua that mouse is up (even if it really isn't) if (GetModifiers()) - c->KeyRelease(0, 0, false, false, false); + c->KeyRelease(0, 0, false, false, false, false); } void GameView::OnTick(float dt) @@ -1823,16 +1832,16 @@ void GameView::DoMouseWheel(int x, int y, int d) Window::DoMouseWheel(x, y, d); } -void GameView::DoKeyPress(int key, Uint16 character, bool shift, bool ctrl, bool alt) +void GameView::DoKeyPress(int key, int scan, bool repeat, bool shift, bool ctrl, bool alt) { - if(c->KeyPress(key, character, shift, ctrl, alt)) - Window::DoKeyPress(key, character, shift, ctrl, alt); + if (c->KeyPress(key, scan, repeat, shift, ctrl, alt)) + Window::DoKeyPress(key, scan, repeat, shift, ctrl, alt); } -void GameView::DoKeyRelease(int key, Uint16 character, bool shift, bool ctrl, bool alt) +void GameView::DoKeyRelease(int key, int scan, bool repeat, bool shift, bool ctrl, bool alt) { - if(c->KeyRelease(key, character, shift, ctrl, alt)) - Window::DoKeyRelease(key, character, shift, ctrl, alt); + if(c->KeyRelease(key, scan, repeat, shift, ctrl, alt)) + Window::DoKeyRelease(key, scan, repeat, shift, ctrl, alt); } void GameView::DoTick(float dt) diff --git a/src/gui/game/GameView.h b/src/gui/game/GameView.h index 7c25341ba..4bba4b869 100644 --- a/src/gui/game/GameView.h +++ b/src/gui/game/GameView.h @@ -191,8 +191,8 @@ public: virtual void OnMouseDown(int x, int y, unsigned button); virtual void OnMouseUp(int x, int y, unsigned button); virtual void OnMouseWheel(int x, int y, int d); - virtual void OnKeyPress(int key, Uint16 character, bool shift, bool ctrl, bool alt); - virtual void OnKeyRelease(int key, Uint16 character, bool shift, bool ctrl, bool alt); + virtual void OnKeyPress(int key, int scan, bool repeat, bool shift, bool ctrl, bool alt); + virtual void OnKeyRelease(int key, int scan, bool repeat, bool shift, bool ctrl, bool alt); virtual void OnTick(float dt); virtual void OnDraw(); virtual void OnBlur(); @@ -204,8 +204,8 @@ public: virtual void DoMouseDown(int x, int y, unsigned button); virtual void DoMouseUp(int x, int y, unsigned button); virtual void DoMouseWheel(int x, int y, int d); - virtual void DoKeyPress(int key, Uint16 character, bool shift, bool ctrl, bool alt); - virtual void DoKeyRelease(int key, Uint16 character, bool shift, bool ctrl, bool alt); + virtual void DoKeyPress(int key, int scan, bool repeat, bool shift, bool ctrl, bool alt); + virtual void DoKeyRelease(int key, int scan, bool repeat, bool shift, bool ctrl, bool alt); class MenuAction; class ToolAction; diff --git a/src/gui/game/PropertyTool.cpp b/src/gui/game/PropertyTool.cpp index 5886fe646..62efc96cd 100644 --- a/src/gui/game/PropertyTool.cpp +++ b/src/gui/game/PropertyTool.cpp @@ -23,7 +23,7 @@ public: PropertyWindow(PropertyTool *tool_, Simulation *sim); void SetProperty(); virtual void OnDraw(); - virtual void OnKeyPress(int key, Uint16 character, bool shift, bool ctrl, bool alt); + virtual void OnKeyPress(int key, int scan, bool repeat, bool shift, bool ctrl, bool alt); virtual void OnTryExit(ExitMethod method); virtual ~PropertyWindow() {} class OkayAction: public ui::ButtonAction @@ -217,7 +217,7 @@ void PropertyWindow::OnDraw() g->drawrect(Position.X, Position.Y, Size.X, Size.Y, 200, 200, 200, 255); } -void PropertyWindow::OnKeyPress(int key, Uint16 character, bool shift, bool ctrl, bool alt) +void PropertyWindow::OnKeyPress(int key, int scan, bool repeat, bool shift, bool ctrl, bool alt) { if (key == SDLK_UP) property->SetOption(property->GetOption().second-1); diff --git a/src/gui/game/SignTool.cpp b/src/gui/game/SignTool.cpp index 5302d48b8..c77439840 100644 --- a/src/gui/game/SignTool.cpp +++ b/src/gui/game/SignTool.cpp @@ -27,8 +27,8 @@ public: virtual void DoMouseDown(int x, int y, unsigned button); virtual void DoMouseUp(int x, int y, unsigned button) { if(!signMoving) ui::Window::DoMouseUp(x, y, button); } virtual void DoMouseWheel(int x, int y, int d) { if(!signMoving) ui::Window::DoMouseWheel(x, y, d); } - virtual void DoKeyPress(int key, Uint16 character, bool shift, bool ctrl, bool alt) { if(!signMoving) ui::Window::DoKeyPress(key, character, shift, ctrl, alt); } - virtual void DoKeyRelease(int key, Uint16 character, bool shift, bool ctrl, bool alt) { if(!signMoving) ui::Window::DoKeyRelease(key, character, shift, ctrl, alt); } + virtual void DoKeyPress(int key, int scan, bool repeat, bool shift, bool ctrl, bool alt) { if(!signMoving) ui::Window::DoKeyPress(key, scan, repeat, shift, ctrl, alt); } + virtual void DoKeyRelease(int key, int scan, bool repeat, bool shift, bool ctrl, bool alt) { if(!signMoving) ui::Window::DoKeyRelease(key, scan, repeat, shift, ctrl, alt); } virtual ~SignWindow() {} virtual void OnTryExit(ui::Window::ExitMethod method); class OkayAction: public ui::ButtonAction diff --git a/src/gui/interface/Component.cpp b/src/gui/interface/Component.cpp index e70373d70..a9e0fb5a6 100644 --- a/src/gui/interface/Component.cpp +++ b/src/gui/interface/Component.cpp @@ -190,11 +190,15 @@ void Component::Tick(float dt) { } -void Component::OnKeyPress(int key, Uint16 character, bool shift, bool ctrl, bool alt) +void Component::OnKeyPress(int key, int scan, bool repeat, bool shift, bool ctrl, bool alt) { } -void Component::OnKeyRelease(int key, Uint16 character, bool shift, bool ctrl, bool alt) +void Component::OnKeyRelease(int key, int scan, bool repeat, bool shift, bool ctrl, bool alt) +{ +} + +void Component::OnTextInput(String text) { } diff --git a/src/gui/interface/Component.h b/src/gui/interface/Component.h index b4848ddfc..0ff5b5b90 100644 --- a/src/gui/interface/Component.h +++ b/src/gui/interface/Component.h @@ -66,26 +66,6 @@ namespace ui virtual void OnContextMenuAction(int item); - //UI functions: - /* - void Tick(float dt); - void Draw(const Point& screenPos); - - void OnMouseHover(int localx, int localy); - void OnMouseMoved(int localx, int localy, int dx, int dy); - void OnMouseMovedInside(int localx, int localy, int dx, int dy); - void OnMouseEnter(int localx, int localy); - void OnMouseLeave(int localx, int localy); - void OnMouseDown(int x, int y, unsigned int button); - void OnMouseUp(int x, int y, unsigned int button); - void OnMouseClick(int localx, int localy, unsigned int button); - void OnMouseUnclick(int localx, int localy, unsigned int button); - void OnMouseWheel(int localx, int localy, int d); - void OnMouseWheelInside(int localx, int localy, int d); - void OnKeyPress(int key, Uint16 character, bool shift, bool ctrl, bool alt); - void OnKeyRelease(int key, Uint16 character, bool shift, bool ctrl, bool alt); - */ - /// // Called: Every tick. // Params: @@ -211,7 +191,7 @@ namespace ui // ctrl: Control key is down. // alt: Alternate key is down. /// - virtual void OnKeyPress(int key, Uint16 character, bool shift, bool ctrl, bool alt); + virtual void OnKeyPress(int key, int scan, bool repeat, bool shift, bool ctrl, bool alt); /// // Called: When a key is released. @@ -221,6 +201,8 @@ namespace ui // ctrl: Control key is released. // alt: Alternate key is released. /// - virtual void OnKeyRelease(int key, Uint16 character, bool shift, bool ctrl, bool alt); + virtual void OnKeyRelease(int key, int scan, bool repeat, bool shift, bool ctrl, bool alt); + + virtual void OnTextInput(String text); }; } diff --git a/src/gui/interface/Engine.cpp b/src/gui/interface/Engine.cpp index ed0e09630..680ef630b 100644 --- a/src/gui/interface/Engine.cpp +++ b/src/gui/interface/Engine.cpp @@ -17,7 +17,6 @@ Engine::Engine(): FpsLimit(60.0f), Scale(1), Fullscreen(false), - Depth3d(0), FrameIndex(0), lastBuffer(NULL), prevBuffers(stack()), @@ -93,6 +92,7 @@ void Engine::ConfirmExit() void Engine::ShowWindow(Window * window) { windowOpenState = 0; + ignoreEvents = true; if(window->Position.X==-1) { window->Position.X = (width_-window->Size.X)/2; @@ -199,6 +199,7 @@ void Engine::Tick() lastTick = Platform::GetTime(); + ignoreEvents = false; /*if(statequeued_ != NULL) { if(state_ != NULL) @@ -250,29 +251,35 @@ void Engine::SetFps(float fps) this->dt = 1.0f; } -void Engine::onKeyPress(int key, Uint16 character, bool shift, bool ctrl, bool alt) +void Engine::onKeyPress(int key, int scan, bool repeat, bool shift, bool ctrl, bool alt) { - if(state_) - state_->DoKeyPress(key, character, shift, ctrl, alt); + if (state_ && !ignoreEvents) + state_->DoKeyPress(key, scan, repeat, shift, ctrl, alt); } -void Engine::onKeyRelease(int key, Uint16 character, bool shift, bool ctrl, bool alt) +void Engine::onKeyRelease(int key, int scan, bool repeat, bool shift, bool ctrl, bool alt) { - if(state_) - state_->DoKeyRelease(key, character, shift, ctrl, alt); + if (state_ && !ignoreEvents) + state_->DoKeyRelease(key, scan, repeat, shift, ctrl, alt); +} + +void Engine::onTextInput(String text) +{ + if (state_ && !ignoreEvents) + state_->DoTextInput(text); } void Engine::onMouseClick(int x, int y, unsigned button) { mouseb_ |= button; - if(state_) + if (state_ && !ignoreEvents) state_->DoMouseDown(x, y, button); } void Engine::onMouseUnclick(int x, int y, unsigned button) { mouseb_ &= ~button; - if(state_) + if (state_ && !ignoreEvents) state_->DoMouseUp(x, y, button); } @@ -280,7 +287,7 @@ void Engine::onMouseMove(int x, int y) { mousex_ = x; mousey_ = y; - if(state_) + if (state_ && !ignoreEvents) { state_->DoMouseMove(x, y, mousex_ - mousexp_, mousey_ - mouseyp_); } @@ -290,7 +297,7 @@ void Engine::onMouseMove(int x, int y) void Engine::onMouseWheel(int x, int y, int delta) { - if(state_) + if (state_ && !ignoreEvents) state_->DoMouseWheel(x, y, delta); } @@ -301,6 +308,6 @@ void Engine::onResize(int newWidth, int newHeight) void Engine::onClose() { - if(state_) + if (state_) state_->DoExit(); } diff --git a/src/gui/interface/Engine.h b/src/gui/interface/Engine.h index ada38ca15..82701f799 100644 --- a/src/gui/interface/Engine.h +++ b/src/gui/interface/Engine.h @@ -28,8 +28,9 @@ namespace ui void onMouseClick(int x, int y, unsigned button); void onMouseUnclick(int x, int y, unsigned button); void onMouseWheel(int x, int y, int delta); - void onKeyPress(int key, Uint16 character, bool shift, bool ctrl, bool alt); - void onKeyRelease(int key, Uint16 character, bool shift, bool ctrl, bool alt); + void onKeyPress(int key, int scan, bool repeat, bool shift, bool ctrl, bool alt); + void onKeyRelease(int key, int scan, bool repeat, bool shift, bool ctrl, bool alt); + void onTextInput(String text); void onResize(int newWidth, int newHeight); void onClose(); @@ -47,8 +48,6 @@ namespace ui inline bool GetFullscreen() { return Fullscreen; } void SetScale(int scale) { Scale = scale; } inline int GetScale() { return Scale; } - void Set3dDepth(int depth3d) { Depth3d = depth3d; if (Depth3d) SetCursorEnabled(0); else SetCursorEnabled(1);} - inline int Get3dDepth() { return Depth3d; } void SetFastQuit(bool fastquit) { FastQuit = fastquit; } inline bool GetFastQuit() {return FastQuit; } @@ -78,7 +77,6 @@ namespace ui Graphics * g; int Scale; bool Fullscreen; - int Depth3d; unsigned int FrameIndex; private: @@ -92,6 +90,7 @@ namespace ui Window* state_; Point windowTargetPosition; int windowOpenState; + bool ignoreEvents = false; bool running_; bool break_; diff --git a/src/gui/interface/Keys.h b/src/gui/interface/Keys.h index 9e284e802..781c3bda6 100644 --- a/src/gui/interface/Keys.h +++ b/src/gui/interface/Keys.h @@ -20,6 +20,8 @@ slouken@libsdl.org */ +#include "SDLCompat.h" +#define _SDL_keysym_h #ifndef _SDL_keysym_h #define _SDL_keysym_h diff --git a/src/gui/interface/Label.cpp b/src/gui/interface/Label.cpp index ce4b66f5b..4aeb8510f 100644 --- a/src/gui/interface/Label.cpp +++ b/src/gui/interface/Label.cpp @@ -229,8 +229,10 @@ void Label::OnMouseUp(int x, int y, unsigned button) selecting = false; } -void Label::OnKeyPress(int key, Uint16 character, bool shift, bool ctrl, bool alt) +void Label::OnKeyPress(int key, int scan, bool repeat, bool shift, bool ctrl, bool alt) { + if (repeat) + return; if(ctrl && key == 'c') { copySelection(); diff --git a/src/gui/interface/Label.h b/src/gui/interface/Label.h index 0d3338b84..5f4c06516 100644 --- a/src/gui/interface/Label.h +++ b/src/gui/interface/Label.h @@ -62,7 +62,7 @@ namespace ui virtual void OnMouseClick(int x, int y, unsigned button); virtual void OnMouseUp(int x, int y, unsigned button); virtual void OnMouseMoved(int localx, int localy, int dx, int dy); - virtual void OnKeyPress(int key, Uint16 character, bool shift, bool ctrl, bool alt); + virtual void OnKeyPress(int key, int scan, bool repeat, bool shift, bool ctrl, bool alt); virtual void Draw(const Point& screenPos); virtual void Tick(float dt); }; diff --git a/src/gui/interface/Mouse.h b/src/gui/interface/Mouse.h index 0e9cf5fef..ffa7085f3 100644 --- a/src/gui/interface/Mouse.h +++ b/src/gui/interface/Mouse.h @@ -2,7 +2,7 @@ #ifdef USE_SDL #ifdef SDL_INC -#include "SDL/SDL_mouse.h" +#include "SDL2/SDL_mouse.h" #else #include "SDL_mouse.h" #endif diff --git a/src/gui/interface/Panel.cpp b/src/gui/interface/Panel.cpp index 0d7fd7cd3..87684acdf 100644 --- a/src/gui/interface/Panel.cpp +++ b/src/gui/interface/Panel.cpp @@ -175,14 +175,14 @@ void Panel::Tick(float dt) children[i]->Tick(dt); } -void Panel::OnKeyPress(int key, Uint16 character, bool shift, bool ctrl, bool alt) +void Panel::OnKeyPress(int key, int scan, bool repeat, bool shift, bool ctrl, bool alt) { - XOnKeyPress(key, character, shift, ctrl, alt); + XOnKeyPress(key, scan, repeat, shift, ctrl, alt); } -void Panel::OnKeyRelease(int key, Uint16 character, bool shift, bool ctrl, bool alt) +void Panel::OnKeyRelease(int key, int scan, bool repeat, bool shift, bool ctrl, bool alt) { - XOnKeyRelease(key, character, shift, ctrl, alt); + XOnKeyRelease(key, scan, repeat, shift, ctrl, alt); } void Panel::OnMouseClick(int localx, int localy, unsigned button) @@ -401,11 +401,11 @@ void Panel::XTick(float dt) { } -void Panel::XOnKeyPress(int key, Uint16 character, bool shift, bool ctrl, bool alt) +void Panel::XOnKeyPress(int key, int scan, bool repeat, bool shift, bool ctrl, bool alt) { } -void Panel::XOnKeyRelease(int key, Uint16 character, bool shift, bool ctrl, bool alt) +void Panel::XOnKeyRelease(int key, int scan, bool repeat, bool shift, bool ctrl, bool alt) { } diff --git a/src/gui/interface/Panel.h b/src/gui/interface/Panel.h index c8b3ec258..fe9070aec 100644 --- a/src/gui/interface/Panel.h +++ b/src/gui/interface/Panel.h @@ -72,34 +72,14 @@ class Component; void OnMouseUnclick(int localx, int localy, unsigned button); void OnMouseWheel(int localx, int localy, int d); void OnMouseWheelInside(int localx, int localy, int d); - void OnKeyPress(int key, Uint16 character, bool shift, bool ctrl, bool alt); - void OnKeyRelease(int key, Uint16 character, bool shift, bool ctrl, bool alt); + void OnKeyPress(int key, int scan, bool repeat, bool shift, bool ctrl, bool alt); + void OnKeyRelease(int key, int scan, bool repeat, bool shift, bool ctrl, bool alt); protected: // child components std::vector children; bool mouseInside; - //UI functions: - /* - void XTick(float dt); - void XDraw(const Point& screenPos); - - void XOnMouseHover(int localx, int localy); - void XOnMouseMoved(int localx, int localy, int dx, int dy); - void XOnMouseMovedInside(int localx, int localy, int dx, int dy); - void XOnMouseEnter(int localx, int localy); - void XOnMouseLeave(int localx, int localy); - void XOnMouseDown(int x, int y, unsigned int button); - void XOnMouseUp(int x, int y, unsigned int button); - void XOnMouseClick(int localx, int localy, unsigned int button); - void XOnMouseUnclick(int localx, int localy, unsigned int button); - void XOnMouseWheel(int localx, int localy, int d); - void XOnMouseWheelInside(int localx, int localy, int d); - void XOnKeyPress(int key, Uint16 character, bool shift, bool ctrl, bool alt); - void XOnKeyRelease(int key, Uint16 character, bool shift, bool ctrl, bool alt); - */ - // Overridable. Called by XComponent::Tick() virtual void XTick(float dt); @@ -141,10 +121,10 @@ class Component; virtual void XOnMouseWheelInside(int localx, int localy, int d); // Overridable. Called by XComponent::OnKeyPress() - virtual void XOnKeyPress(int key, Uint16 character, bool shift, bool ctrl, bool alt); + virtual void XOnKeyPress(int key, int scan, bool repeat, bool shift, bool ctrl, bool alt); // Overridable. Called by XComponent::OnKeyRelease() - virtual void XOnKeyRelease(int key, Uint16 character, bool shift, bool ctrl, bool alt); + virtual void XOnKeyRelease(int key, int scan, bool repeat, bool shift, bool ctrl, bool alt); }; } diff --git a/src/gui/interface/Textbox.cpp b/src/gui/interface/Textbox.cpp index 659f909c5..c8fd1a093 100644 --- a/src/gui/interface/Textbox.cpp +++ b/src/gui/interface/Textbox.cpp @@ -251,7 +251,7 @@ void Textbox::pasteIntoSelection() actionCallback->TextChangedCallback(this); } -bool Textbox::CharacterValid(Uint16 character) +bool Textbox::CharacterValid(int character) { switch(inputType) { @@ -270,6 +270,15 @@ bool Textbox::CharacterValid(Uint16 character) return false; } +// TODO: proper unicode validation +bool Textbox::StringValid(String text) +{ + for (String::value_type c : text) + if (!CharacterValid(c)) + return false; + return true; +} + void Textbox::Tick(float dt) { Label::Tick(dt); @@ -281,29 +290,29 @@ void Textbox::Tick(float dt) unsigned long time_pls = Platform::GetTime(); if ((keyDown || characterDown) && repeatTime <= time_pls) { - OnVKeyPress(keyDown, characterDown, false, false, false); + //OnVKeyPress(keyDown, characterDown, false, false, false); repeatTime = Platform::GetTime()+30; } } -void Textbox::OnKeyRelease(int key, Uint16 character, bool shift, bool ctrl, bool alt) +void Textbox::OnKeyRelease(int key, int scan, bool repeat, bool shift, bool ctrl, bool alt) { keyDown = 0; characterDown = 0; } -void Textbox::OnKeyPress(int key, Uint16 character, bool shift, bool ctrl, bool alt) +void Textbox::OnKeyPress(int key, int scan, bool repeat, bool shift, bool ctrl, bool alt) { - characterDown = character; + characterDown = scan; keyDown = key; repeatTime = Platform::GetTime()+300; - OnVKeyPress(key, character, shift, ctrl, alt); + OnVKeyPress(key, scan, repeat, shift, ctrl, alt); } -void Textbox::OnVKeyPress(int key, Uint16 character, bool shift, bool ctrl, bool alt) +void Textbox::OnVKeyPress(int key, int scan, bool repeat, bool shift, bool ctrl, bool alt) { bool changed = false; - if(ctrl && key == 'c' && !masked) + if(ctrl && key == 'c' && !masked && !repeat) { copySelection(); return; @@ -313,7 +322,7 @@ void Textbox::OnVKeyPress(int key, Uint16 character, bool shift, bool ctrl, bool pasteIntoSelection(); return; } - if(ctrl && key == 'x' && !masked && !ReadOnly) + if(ctrl && key == 'x' && !masked && !repeat && !ReadOnly) { cutSelection(); return; @@ -406,38 +415,7 @@ void Textbox::OnVKeyPress(int key, Uint16 character, bool shift, bool ctrl, bool ClearSelection(); break; case SDLK_RETURN: - character = '\n'; - default: - if (CharacterValid(character) && !ReadOnly) - { - if (HasSelection()) - { - if (getLowerSelectionBound() < 0 || getHigherSelectionBound() > (int)backingText.length()) - return; - backingText.erase(backingText.begin()+getLowerSelectionBound(), backingText.begin()+getHigherSelectionBound()); - cursor = getLowerSelectionBound(); - } - - int regionWidth = Size.X; - if (Appearance.icon) - regionWidth -= 13; - regionWidth -= Appearance.Margin.Left; - regionWidth -= Appearance.Margin.Right; - if ((limit==String::npos || backingText.length() < limit) && (Graphics::textwidth(backingText + character) <= regionWidth || multiline)) - { - if (cursor == (int)backingText.length()) - { - backingText += character; - } - else - { - backingText.Insert(cursor, character); - } - cursor++; - } - changed = true; - ClearSelection(); - } + OnTextInput("\n"); break; } } @@ -446,16 +424,23 @@ void Textbox::OnVKeyPress(int key, Uint16 character, bool shift, bool ctrl, bool cursor = 0; backingText = ""; } - if (inputType == Number) - { - //Remove extra preceding 0's - while(backingText[0] == '0' && backingText.length()>1) - backingText.erase(backingText.begin()); - } + AfterTextChange(changed); +} + +void Textbox::AfterTextChange(bool changed) +{ if (cursor > (int)backingText.length()) cursor = backingText.length(); + if (changed) { + if (inputType == Number) + { + //Remove extra preceding 0's + while(backingText[0] == '0' && backingText.length()>1) + backingText.erase(backingText.begin()); + } + if (masked) { String maskedText = backingText; @@ -468,10 +453,10 @@ void Textbox::OnVKeyPress(int key, Uint16 character, bool shift, bool ctrl, bool } } - if(multiline) + if (multiline) updateMultiline(); updateSelection(); - if(multiline) + if (multiline) TextPosition(textLines); else TextPosition(text); @@ -488,6 +473,40 @@ void Textbox::OnVKeyPress(int key, Uint16 character, bool shift, bool ctrl, bool actionCallback->TextChangedCallback(this); } +void Textbox::OnTextInput(String text) +{ + if (StringValid(text) && !ReadOnly) + { + if (HasSelection()) + { + if (getLowerSelectionBound() < 0 || getHigherSelectionBound() > (int)backingText.length()) + return; + backingText.erase(backingText.begin()+getLowerSelectionBound(), backingText.begin()+getHigherSelectionBound()); + cursor = getLowerSelectionBound(); + } + + int regionWidth = Size.X; + if (Appearance.icon) + regionWidth -= 13; + regionWidth -= Appearance.Margin.Left; + regionWidth -= Appearance.Margin.Right; + if ((limit==String::npos || backingText.length() < limit) && (Graphics::textwidth(backingText + text) <= regionWidth || multiline)) + { + if (cursor == (int)backingText.length()) + { + backingText += text; + } + else + { + backingText.Insert(cursor, text); + } + cursor++; + } + ClearSelection(); + AfterTextChange(true); + } +} + void Textbox::OnMouseClick(int x, int y, unsigned button) { @@ -551,162 +570,3 @@ void Textbox::Draw(const Point& screenPos) if(Appearance.icon) g->draw_icon(screenPos.X+iconPosition.X, screenPos.Y+iconPosition.Y, Appearance.icon); } - -/* -Textbox::Textbox(Point position, Point size, std::string textboxText): - Component(position, size), - text(textboxText), - actionCallback(NULL), - masked(false), - border(true) -{ - SetText(textboxText); - cursor = text.length(); -} - -Textbox::~Textbox() -{ - delete actionCallback; -} - -void Textbox::TextPosition() -{ - if(cursor) - { - cursorPosition = Graphics::textnwidth((char *)displayText.c_str(), cursor); - } - else - { - cursorPosition = 0; - } - Component::TextPosition(displayText); -} - -void Textbox::SetText(std::string text) -{ - cursor = text.length(); - this->text = text; - this->displayText = text; - TextPosition(); -} - - -void Textbox::SetDisplayText(std::string text) -{ - displayText = text; - TextPosition(); -} - -std::string Textbox::GetText() -{ - return text; -} - -void Textbox::OnKeyPress(int key, Uint16 character, bool shift, bool ctrl, bool alt) -{ - bool changed = false; - try - { - switch(key) - { - case KEY_HOME: - cursor = 0; - break; - case KEY_END: - cursor = text.length(); - break; - case KEY_LEFT: - if(cursor > 0) - cursor--; - break; - case KEY_RIGHT: - if(cursor < text.length()) - cursor++; - break; - case KEY_DELETE: - if(text.length() && cursor < text.length()) - { - if(ctrl) - text.erase(cursor, text.length()-cursor); - else - text.erase(cursor, 1); - changed = true; - } - break; - case KEY_BACKSPACE: - if(text.length() && cursor > 0) - { - if(ctrl) - { - text.erase(0, cursor); - cursor = 0; - } - else - { - text.erase(cursor-1, 1); - cursor--; - } - changed = true; - } - break; - } - if(character >= ' ' && character < 127) - { - if(cursor == text.length()) - { - text += character; - } - else - { - text.insert(cursor, 1, (char)character); - } - cursor++; - changed = true; - } - } - catch(std::out_of_range &e) - { - cursor = 0; - text = ""; - } - if(changed) - { - if(masked) - { - char * tempText = new char[text.length()+1]; - std::fill(tempText, tempText+text.length(), 0x8d); - tempText[text.length()] = 0; - displayText = std::string(tempText); - delete tempText; - } - else - { - displayText = text; - } - if(actionCallback) - actionCallback->TextChangedCallback(this); - } - TextPosition(); -} - -void Textbox::Draw(const Point& screenPos) -{ - if(!drawn) - { - TextPosition(); - drawn = true; - } - Graphics * g = GetGraphics(); - if(IsFocused()) - { - if(border) g->drawrect(screenPos.X, screenPos.Y, Size.X, Size.Y, 255, 255, 255, 255); - g->draw_line(screenPos.X+textPosition.X+cursorPosition, screenPos.Y+3, screenPos.X+textPosition.X+cursorPosition, screenPos.Y+12, 255, 255, 255, WINDOWW); - } - else - { - if(border) g->drawrect(screenPos.X, screenPos.Y, Size.X, Size.Y, 160, 160, 160, 255); - } - g->drawtext(screenPos.X+textPosition.X, screenPos.Y+textPosition.Y, displayText, 255, 255, 255, 255); - if(Appearance.icon) - g->draw_icon(screenPos.X+iconPosition.X, screenPos.Y+iconPosition.Y, Appearance.icon); -}*/ diff --git a/src/gui/interface/Textbox.h b/src/gui/interface/Textbox.h index 79c3b9461..d86fb9bf4 100644 --- a/src/gui/interface/Textbox.h +++ b/src/gui/interface/Textbox.h @@ -19,6 +19,9 @@ public: class Textbox : public Label { friend class TextboxAction; + + void AfterTextChange(bool changed); + public: bool ReadOnly; enum ValidInput { All, Multiline, Numeric, Number }; // Numeric doesn't delete trailing 0's @@ -44,16 +47,18 @@ public: void resetCursorPosition(); void TabFocus(); //Determines if the given character is valid given the input type - bool CharacterValid(Uint16 character); + bool CharacterValid(int character); + bool StringValid(String text); virtual void Tick(float dt); virtual void OnContextMenuAction(int item); virtual void OnMouseClick(int x, int y, unsigned button); virtual void OnMouseUp(int x, int y, unsigned button); virtual void OnMouseMoved(int localx, int localy, int dx, int dy); - virtual void OnKeyPress(int key, Uint16 character, bool shift, bool ctrl, bool alt); - virtual void OnVKeyPress(int key, Uint16 character, bool shift, bool ctrl, bool alt); - virtual void OnKeyRelease(int key, Uint16 character, bool shift, bool ctrl, bool alt); + virtual void OnKeyPress(int key, int scan, bool repeat, bool shift, bool ctrl, bool alt); + virtual void OnVKeyPress(int key, int scan, bool repeat, bool shift, bool ctrl, bool alt); + virtual void OnKeyRelease(int key, int scan, bool repeat, bool shift, bool ctrl, bool alt); + void OnTextInput(String text) override; virtual void Draw(const Point& screenPos); protected: diff --git a/src/gui/interface/Window.cpp b/src/gui/interface/Window.cpp index 42a011db7..a0492f957 100644 --- a/src/gui/interface/Window.cpp +++ b/src/gui/interface/Window.cpp @@ -283,7 +283,7 @@ void Window::DoTick(float dt) finalise(); } -void Window::DoKeyPress(int key, Uint16 character, bool shift, bool ctrl, bool alt) +void Window::DoKeyPress(int key, int scan, bool repeat, bool shift, bool ctrl, bool alt) { #ifdef DEBUG if (key == SDLK_TAB && ctrl) @@ -374,11 +374,11 @@ void Window::DoKeyPress(int key, Uint16 character, bool shift, bool ctrl, bool a if (focusedComponent_ != NULL) { if (focusedComponent_->Enabled && focusedComponent_->Visible) - focusedComponent_->OnKeyPress(key, character, shift, ctrl, alt); + focusedComponent_->OnKeyPress(key, scan, repeat, shift, ctrl, alt); } if (!stop) - OnKeyPress(key, character, shift, ctrl, alt); + OnKeyPress(key, scan, repeat, shift, ctrl, alt); if (key == SDLK_ESCAPE) OnTryExit(Escape); @@ -390,7 +390,7 @@ void Window::DoKeyPress(int key, Uint16 character, bool shift, bool ctrl, bool a finalise(); } -void Window::DoKeyRelease(int key, Uint16 character, bool shift, bool ctrl, bool alt) +void Window::DoKeyRelease(int key, int scan, bool repeat, bool shift, bool ctrl, bool alt) { #ifdef DEBUG if(debugMode) @@ -400,11 +400,30 @@ void Window::DoKeyRelease(int key, Uint16 character, bool shift, bool ctrl, bool if (focusedComponent_ != NULL) { if (focusedComponent_->Enabled && focusedComponent_->Visible) - focusedComponent_->OnKeyRelease(key, character, shift, ctrl, alt); + focusedComponent_->OnKeyRelease(key, scan, repeat, shift, ctrl, alt); } if (!stop) - OnKeyRelease(key, character, shift, ctrl, alt); + OnKeyRelease(key, scan, repeat, shift, ctrl, alt); + if (destruct) + finalise(); +} + +void Window::DoTextInput(String text) +{ +#ifdef DEBUG + if (debugMode) + return; +#endif + //on key unpress + if (focusedComponent_ != NULL) + { + if (focusedComponent_->Enabled && focusedComponent_->Visible) + focusedComponent_->OnTextInput(text); + } + + if (!stop) + OnTextInput(text); if (destruct) finalise(); } diff --git a/src/gui/interface/Window.h b/src/gui/interface/Window.h index 200aeb8dd..4e515baea 100644 --- a/src/gui/interface/Window.h +++ b/src/gui/interface/Window.h @@ -65,8 +65,9 @@ namespace ui virtual void DoMouseDown(int x, int y, unsigned button); virtual void DoMouseUp(int x, int y, unsigned button); virtual void DoMouseWheel(int x, int y, int d); - virtual void DoKeyPress(int key, Uint16 character, bool shift, bool ctrl, bool alt); - virtual void DoKeyRelease(int key, Uint16 character, bool shift, bool ctrl, bool alt); + virtual void DoKeyPress(int key, int scan, bool repeat, bool shift, bool ctrl, bool alt); + virtual void DoKeyRelease(int key, int scan, bool repeat, bool shift, bool ctrl, bool alt); + virtual void DoTextInput(String text); // Sets halt and destroy, this causes the Windows to stop sending events and remove itself. void SelfDestruct(); @@ -102,8 +103,9 @@ namespace ui virtual void OnMouseDown(int x, int y, unsigned button) {} virtual void OnMouseUp(int x, int y, unsigned button) {} virtual void OnMouseWheel(int x, int y, int d) {} - virtual void OnKeyPress(int key, Uint16 character, bool shift, bool ctrl, bool alt) {} - virtual void OnKeyRelease(int key, Uint16 character, bool shift, bool ctrl, bool alt) {} + virtual void OnKeyPress(int key, int scan, bool repeat, bool shift, bool ctrl, bool alt) {} + virtual void OnKeyRelease(int key, int scan, bool repeat, bool shift, bool ctrl, bool alt) {} + virtual void OnTextInput(String text) {} std::vector Components; Component *focusedComponent_; Component *hoverComponent; diff --git a/src/gui/localbrowser/LocalBrowserView.cpp b/src/gui/localbrowser/LocalBrowserView.cpp index 850264d07..703dd9213 100644 --- a/src/gui/localbrowser/LocalBrowserView.cpp +++ b/src/gui/localbrowser/LocalBrowserView.cpp @@ -266,16 +266,20 @@ void LocalBrowserView::OnMouseWheel(int x, int y, int d) c->PrevPage(); } -void LocalBrowserView::OnKeyPress(int key, Uint16 character, bool shift, bool ctrl, bool alt) +void LocalBrowserView::OnKeyPress(int key, int scan, bool repeat, bool shift, bool ctrl, bool alt) { + if (repeat) + return; if (key == SDLK_ESCAPE) c->Exit(); else if (key == SDLK_LCTRL || key == SDLK_RCTRL) c->SetMoveToFront(false); } -void LocalBrowserView::OnKeyRelease(int key, Uint16 character, bool shift, bool ctrl, bool alt) +void LocalBrowserView::OnKeyRelease(int key, int scan, bool repeat, bool shift, bool ctrl, bool alt) { + if (repeat) + return; if (key == SDLK_LCTRL || key == SDLK_RCTRL) c->SetMoveToFront(true); } diff --git a/src/gui/localbrowser/LocalBrowserView.h b/src/gui/localbrowser/LocalBrowserView.h index 18b9af876..ec6a4e732 100644 --- a/src/gui/localbrowser/LocalBrowserView.h +++ b/src/gui/localbrowser/LocalBrowserView.h @@ -38,8 +38,8 @@ public: void NotifySavesListChanged(LocalBrowserModel * sender); void NotifySelectedChanged(LocalBrowserModel * sender); virtual void OnMouseWheel(int x, int y, int d); - virtual void OnKeyPress(int key, Uint16 character, bool shift, bool ctrl, bool alt); - virtual void OnKeyRelease(int key, Uint16 character, bool shift, bool ctrl, bool alt); + virtual void OnKeyPress(int key, int scan, bool repeat, bool shift, bool ctrl, bool alt); + virtual void OnKeyRelease(int key, int scan, bool repeat, bool shift, bool ctrl, bool alt); virtual ~LocalBrowserView(); }; diff --git a/src/gui/login/LoginView.cpp b/src/gui/login/LoginView.cpp index e6646ddf0..29e087397 100644 --- a/src/gui/login/LoginView.cpp +++ b/src/gui/login/LoginView.cpp @@ -73,8 +73,10 @@ LoginView::LoginView(): passwordField->SetHidden(true); } -void LoginView::OnKeyPress(int key, Uint16 character, bool shift, bool ctrl, bool alt) +void LoginView::OnKeyPress(int key, int scan, bool repeat, bool shift, bool ctrl, bool alt) { + if (repeat) + return; switch(key) { case SDLK_TAB: diff --git a/src/gui/login/LoginView.h b/src/gui/login/LoginView.h index f54279658..fab947a12 100644 --- a/src/gui/login/LoginView.h +++ b/src/gui/login/LoginView.h @@ -27,7 +27,7 @@ public: class LoginAction; class CancelAction; LoginView(); - virtual void OnKeyPress(int key, Uint16 character, bool shift, bool ctrl, bool alt); + virtual void OnKeyPress(int key, int scan, bool repeat, bool shift, bool ctrl, bool alt); virtual void OnTryExit(ExitMethod method); void AttachController(LoginController * c_) { c = c_; } void NotifyStatusChanged(LoginModel * sender); diff --git a/src/gui/options/OptionsController.cpp b/src/gui/options/OptionsController.cpp index 36f59cf55..aeeae5a0f 100644 --- a/src/gui/options/OptionsController.cpp +++ b/src/gui/options/OptionsController.cpp @@ -8,7 +8,6 @@ OptionsController::OptionsController(GameModel * gModel_, ControllerCallback * c callback(callback_), HasExited(false) { - this->depth3d = ui::Engine::Ref().Get3dDepth(); view = new OptionsView(); model = new OptionsModel(gModel); model->AddObserver(view); @@ -71,11 +70,6 @@ void OptionsController::SetFastQuit(bool fastquit) model->SetFastQuit(fastquit); } -void OptionsController::Set3dDepth(int depth) -{ - depth3d = depth; -} - OptionsView * OptionsController::GetView() { return view; @@ -84,8 +78,6 @@ OptionsView * OptionsController::GetView() void OptionsController::Exit() { view->CloseActiveWindow(); - // only update on close, it would be hard to edit if the changes were live - ui::Engine::Ref().Set3dDepth(depth3d); if (callback) callback->ControllerExit(); diff --git a/src/gui/options/OptionsController.h b/src/gui/options/OptionsController.h index fd6836bdf..71e2a1b6f 100644 --- a/src/gui/options/OptionsController.h +++ b/src/gui/options/OptionsController.h @@ -14,7 +14,6 @@ class OptionsController { OptionsView * view; OptionsModel * model; ControllerCallback * callback; - int depth3d; public: bool HasExited; OptionsController(GameModel * gModel_, ControllerCallback * callback_); @@ -29,7 +28,6 @@ public: void SetScale(int scale); void SetFastQuit(bool fastquit); void SetShowAvatars(bool showAvatars); - void Set3dDepth(int depth); void Exit(); OptionsView * GetView(); virtual ~OptionsController(); diff --git a/src/gui/options/OptionsView.cpp b/src/gui/options/OptionsView.cpp index c2881d2cd..96e8003d1 100644 --- a/src/gui/options/OptionsView.cpp +++ b/src/gui/options/OptionsView.cpp @@ -17,7 +17,7 @@ #include "gui/dialogues/ErrorMessage.h" OptionsView::OptionsView(): - ui::Window(ui::Point(-1, -1), ui::Point(300, 348)){ + ui::Window(ui::Point(-1, -1), ui::Point(300, 329)){ ui::Label * tempLabel = new ui::Label(ui::Point(4, 5), ui::Point(Size.X-8, 14), "Simulation Options"); tempLabel->SetTextColour(style::Colour::InformationTitle); @@ -228,19 +228,7 @@ OptionsView::OptionsView(): AddComponent(tempLabel); AddComponent(showAvatars); - class DepthAction: public ui::TextboxAction - { - OptionsView * v; - public: - DepthAction(OptionsView * v_) { v = v_; } - virtual void TextChangedCallback(ui::Textbox * sender) { v->c->Set3dDepth(sender->GetText().ToNumber(true)); } - }; - depthTextbox = new ui::Textbox(ui::Point(8, Size.Y-58), ui::Point(25, 16), String::Build(ui::Engine::Ref().Get3dDepth())); - depthTextbox->SetInputType(ui::Textbox::Numeric); - depthTextbox->SetActionCallback(new DepthAction(this)); - AddComponent(depthTextbox); - - tempLabel = new ui::Label(ui::Point(depthTextbox->Position.X+depthTextbox->Size.X+3, depthTextbox->Position.Y), ui::Point(Size.X-28, 16), "\bg- Change the depth of the 3D anaglyph effect"); + tempLabel = new ui::Label(ui::Point(showAvatars->Position.X+showAvatars->Size.X+3, depthTextbox->Position.Y), ui::Point(Size.X-28, 16), "\bg- Change the depth of the 3D anaglyph effect"); tempLabel->Appearance.HorizontalAlign = ui::Appearance::AlignLeft; tempLabel->Appearance.VerticalAlign = ui::Appearance::AlignMiddle; AddComponent(tempLabel); diff --git a/src/gui/preview/PreviewView.cpp b/src/gui/preview/PreviewView.cpp index c68783dfd..470aecea2 100644 --- a/src/gui/preview/PreviewView.cpp +++ b/src/gui/preview/PreviewView.cpp @@ -479,8 +479,10 @@ void PreviewView::OnMouseUp(int x, int y, unsigned int button) } } -void PreviewView::OnKeyPress(int key, Uint16 character, bool shift, bool ctrl, bool alt) +void PreviewView::OnKeyPress(int key, int scan, bool repeat, bool shift, bool ctrl, bool alt) { + if (repeat) + return; if ((key == SDLK_KP_ENTER || key == SDLK_RETURN) && (!addCommentBox || !addCommentBox->IsFocused())) openButton->DoAction(); } diff --git a/src/gui/preview/PreviewView.h b/src/gui/preview/PreviewView.h index fcf6fc1a7..a082af468 100644 --- a/src/gui/preview/PreviewView.h +++ b/src/gui/preview/PreviewView.h @@ -85,7 +85,7 @@ public: virtual void OnTryExit(ExitMethod method); virtual void OnMouseWheel(int x, int y, int d); virtual void OnMouseUp(int x, int y, unsigned int button); - virtual void OnKeyPress(int key, Uint16 character, bool shift, bool ctrl, bool alt); + virtual void OnKeyPress(int key, int scan, bool repeat, bool shift, bool ctrl, bool alt); virtual ~PreviewView(); }; diff --git a/src/gui/render/RenderView.cpp b/src/gui/render/RenderView.cpp index fd486b2d2..cfc20c39b 100644 --- a/src/gui/render/RenderView.cpp +++ b/src/gui/render/RenderView.cpp @@ -405,8 +405,10 @@ void RenderView::OnTick(float dt) } } -void RenderView::OnKeyPress(int key, Uint16 character, bool shift, bool ctrl, bool alt) +void RenderView::OnKeyPress(int key, int scan, bool repeat, bool shift, bool ctrl, bool alt) { + if (repeat) + return; if (shift && key == '1') c->LoadRenderPreset(10); else if(key >= '0' && key <= '9') diff --git a/src/gui/render/RenderView.h b/src/gui/render/RenderView.h index 8220b91b8..9b0e5892f 100644 --- a/src/gui/render/RenderView.h +++ b/src/gui/render/RenderView.h @@ -37,7 +37,7 @@ public: void OnTryExit(ExitMethod method); virtual void OnDraw(); virtual void OnTick(float dt); - virtual void OnKeyPress(int key, Uint16 character, bool shift, bool ctrl, bool alt); + virtual void OnKeyPress(int key, int scan, bool repeat, bool shift, bool ctrl, bool alt); virtual void ToolTip(ui::Point senderPosition, String toolTip); virtual ~RenderView(); }; diff --git a/src/gui/search/SearchView.cpp b/src/gui/search/SearchView.cpp index 2c2c5a395..245b256a5 100644 --- a/src/gui/search/SearchView.cpp +++ b/src/gui/search/SearchView.cpp @@ -798,16 +798,20 @@ void SearchView::OnMouseWheel(int x, int y, int d) else c->PrevPage(); } -void SearchView::OnKeyPress(int key, Uint16 character, bool shift, bool ctrl, bool alt) +void SearchView::OnKeyPress(int key, int scan, bool repeat, bool shift, bool ctrl, bool alt) { + if (repeat) + return; if (key == SDLK_ESCAPE) c->Exit(); else if (key == SDLK_LCTRL || key == SDLK_RCTRL) c->InstantOpen(true); } -void SearchView::OnKeyRelease(int key, Uint16 character, bool shift, bool ctrl, bool alt) +void SearchView::OnKeyRelease(int key, int scan, bool repeat, bool shift, bool ctrl, bool alt) { + if (repeat) + return; if (key == SDLK_LCTRL || key == SDLK_RCTRL) c->InstantOpen(false); } diff --git a/src/gui/search/SearchView.h b/src/gui/search/SearchView.h index bef054536..14d1ec216 100644 --- a/src/gui/search/SearchView.h +++ b/src/gui/search/SearchView.h @@ -69,8 +69,8 @@ public: virtual void Search(String); virtual void OnTick(float dt); virtual void OnMouseWheel(int x, int y, int d); - virtual void OnKeyPress(int key, Uint16 character, bool shift, bool ctrl, bool alt); - virtual void OnKeyRelease(int key, Uint16 character, bool shift, bool ctrl, bool alt); + virtual void OnKeyPress(int key, int scan, bool repeat, bool shift, bool ctrl, bool alt); + virtual void OnKeyRelease(int key, int scan, bool repeat, bool shift, bool ctrl, bool alt); }; diff --git a/src/gui/tags/TagsView.cpp b/src/gui/tags/TagsView.cpp index 9aca4934d..f72243898 100644 --- a/src/gui/tags/TagsView.cpp +++ b/src/gui/tags/TagsView.cpp @@ -131,8 +131,10 @@ void TagsView::NotifyTagsChanged(TagsModel * sender) } } -void TagsView::OnKeyPress(int key, Uint16 character, bool shift, bool ctrl, bool alt) +void TagsView::OnKeyPress(int key, int scan, bool repeat, bool shift, bool ctrl, bool alt) { + if (repeat) + return; switch(key) { case SDLK_KP_ENTER: diff --git a/src/gui/tags/TagsView.h b/src/gui/tags/TagsView.h index 06a4df807..ff572864b 100644 --- a/src/gui/tags/TagsView.h +++ b/src/gui/tags/TagsView.h @@ -25,7 +25,7 @@ public: TagsView(); virtual void OnDraw(); void AttachController(TagsController * c_) { c = c_; } - virtual void OnKeyPress(int key, Uint16 character, bool shift, bool ctrl, bool alt); + virtual void OnKeyPress(int key, int scan, bool repeat, bool shift, bool ctrl, bool alt); void NotifyTagsChanged(TagsModel * sender); virtual ~TagsView(); }; diff --git a/src/lua/CommandInterface.h b/src/lua/CommandInterface.h index 52ca21bd2..516a3c312 100644 --- a/src/lua/CommandInterface.h +++ b/src/lua/CommandInterface.h @@ -25,8 +25,8 @@ public: virtual bool OnMouseDown(int x, int y, unsigned button) {return true;} virtual bool OnMouseUp(int x, int y, unsigned button, char type) {return true;} virtual bool OnMouseWheel(int x, int y, int d) {return true;} - virtual bool OnKeyPress(int key, Uint16 character, bool shift, bool ctrl, bool alt) {return true;} - virtual bool OnKeyRelease(int key, Uint16 character, bool shift, bool ctrl, bool alt) {return true;} + virtual bool OnKeyPress(int key, int scan, bool repeat, bool shift, bool ctrl, bool alt) {return true;} + virtual bool OnKeyRelease(int key, int scan, bool repeat, bool shift, bool ctrl, bool alt) {return true;} virtual bool OnMouseTick() { return true; } virtual void OnTick() { } virtual int Command(String command); diff --git a/src/lua/LegacyLuaAPI.cpp b/src/lua/LegacyLuaAPI.cpp index 652a7f153..f22d53022 100644 --- a/src/lua/LegacyLuaAPI.cpp +++ b/src/lua/LegacyLuaAPI.cpp @@ -244,7 +244,7 @@ int luacon_elementwrite(lua_State* l) } bool shortcuts = true; -int luacon_keyevent(int key, Uint16 character, int modifier, int event) +int luacon_keyevent(int key, int scan, int modifier, int event) { ui::Engine::Ref().LastTick(Platform::GetTime()); int kycontinue = 1; @@ -263,10 +263,10 @@ int luacon_keyevent(int key, Uint16 character, int modifier, int event) for (int i = 1; i <= len && kycontinue; i++) { lua_rawgeti(l, -1, i); - if ((modifier & KMOD_CTRL) && (character < ' ' || character > '~') && key < 256) + if ((modifier & KMOD_CTRL) && (scan < ' ' || scan > '~') && key < 256) lua_pushlstring(l, (const char*)&key, 1); else - lua_pushlstring(l, (const char*)&character, 1); + lua_pushlstring(l, (const char*)&scan, 1); lua_pushinteger(l, key); lua_pushinteger(l, modifier); lua_pushinteger(l, event); diff --git a/src/lua/LuaScriptHelper.h b/src/lua/LuaScriptHelper.h index 08088c813..c65d9c74d 100644 --- a/src/lua/LuaScriptHelper.h +++ b/src/lua/LuaScriptHelper.h @@ -23,7 +23,7 @@ extern int tptParts, tptPartsMeta, tptElementTransitions, tptPartsCData, tptPart void luacon_hook(lua_State *L, lua_Debug *ar); int luacon_step(int mx, int my); int luacon_mouseevent(int mx, int my, int mb, int event, int mouse_wheel); -int luacon_keyevent(int key, Uint16 character, int modifier, int event); +int luacon_keyevent(int key, int scan, int modifier, int event); int luacon_eval(const char *command); String luacon_geterror(); void luacon_close(); diff --git a/src/lua/LuaScriptInterface.cpp b/src/lua/LuaScriptInterface.cpp index a4fc601f2..5f4e3a175 100644 --- a/src/lua/LuaScriptInterface.cpp +++ b/src/lua/LuaScriptInterface.cpp @@ -2288,17 +2288,7 @@ int LuaScriptInterface::renderer_debugHUD(lua_State * l) int LuaScriptInterface::renderer_depth3d(lua_State * l) { - int acount = lua_gettop(l); - if (acount == 0) - { - lua_pushnumber(l, ui::Engine::Ref().Get3dDepth()); - return 1; - } - int depth3d = luaL_optint(l, 1, -3); - if (depth3d < -30 || depth3d > 30) - return luaL_error(l, "3D depth is too large"); - ui::Engine::Ref().Set3dDepth(depth3d); - return 0; + return luaL_error(l, "This feature is no longer supported"); } void LuaScriptInterface::initElementsAPI() @@ -3374,12 +3364,12 @@ bool LuaScriptInterface::OnMouseWheel(int x, int y, int d) return luacon_mouseevent(x, y, luacon_mousedown?luacon_mousebutton:0, 0, d); } -bool LuaScriptInterface::OnKeyPress(int key, Uint16 character, bool shift, bool ctrl, bool alt) +bool LuaScriptInterface::OnKeyPress(int key, int scan, bool repeat, bool shift, bool ctrl, bool alt) { - return luacon_keyevent(key, character, GetModifiers(), LUACON_KDOWN); + return luacon_keyevent(key, scan, GetModifiers(), LUACON_KDOWN); } -bool LuaScriptInterface::OnKeyRelease(int key, Uint16 character, bool shift, bool ctrl, bool alt) +bool LuaScriptInterface::OnKeyRelease(int key, int scan, bool repeat, bool shift, bool ctrl, bool alt) { int modifiers = 0; if(shift) diff --git a/src/lua/LuaScriptInterface.h b/src/lua/LuaScriptInterface.h index e5e9480a1..7b7557155 100644 --- a/src/lua/LuaScriptInterface.h +++ b/src/lua/LuaScriptInterface.h @@ -182,8 +182,8 @@ public: virtual bool OnMouseDown(int x, int y, unsigned button); virtual bool OnMouseUp(int x, int y, unsigned button, char type); virtual bool OnMouseWheel(int x, int y, int d); - virtual bool OnKeyPress(int key, Uint16 character, bool shift, bool ctrl, bool alt); - virtual bool OnKeyRelease(int key, Uint16 character, bool shift, bool ctrl, bool alt); + virtual bool OnKeyPress(int key, int scan, bool repeat, bool shift, bool ctrl, bool alt); + virtual bool OnKeyRelease(int key, int scan, bool repeat, bool shift, bool ctrl, bool alt); virtual bool OnMouseTick(); virtual void OnTick(); virtual void Init(); diff --git a/src/lua/LuaWindow.cpp b/src/lua/LuaWindow.cpp index b7e4c79e5..dedb17ec2 100644 --- a/src/lua/LuaWindow.cpp +++ b/src/lua/LuaWindow.cpp @@ -98,8 +98,8 @@ LuaWindow::LuaWindow(lua_State * l) : virtual void OnMouseDown(int x, int y, unsigned button) { luaWindow->triggerOnMouseDown(x, y, button); } virtual void OnMouseUp(int x, int y, unsigned button) { luaWindow->triggerOnMouseUp(x, y, button); } virtual void OnMouseWheel(int x, int y, int d) { luaWindow->triggerOnMouseWheel(x, y, d); } - virtual void OnKeyPress(int key, Uint16 character, bool shift, bool ctrl, bool alt) { luaWindow->triggerOnKeyPress(key, character, shift, ctrl, alt); } - virtual void OnKeyRelease(int key, Uint16 character, bool shift, bool ctrl, bool alt) { luaWindow->triggerOnKeyRelease(key, character, shift, ctrl, alt); } + virtual void OnKeyPress(int key, int scan, bool repeat, bool shift, bool ctrl, bool alt) { luaWindow->triggerOnKeyPress(key, scan, repeat, shift, ctrl, alt); } + virtual void OnKeyRelease(int key, int scan, bool repeat, bool shift, bool ctrl, bool alt) { luaWindow->triggerOnKeyRelease(key, scan, repeat, shift, ctrl, alt); } }; window = new DrawnWindow(ui::Point(posX, posY), ui::Point(sizeX, sizeY), this); @@ -359,13 +359,13 @@ void LuaWindow::triggerOnMouseWheel(int x, int y, int d) } } -void LuaWindow::triggerOnKeyPress(int key, Uint16 character, bool shift, bool ctrl, bool alt) +void LuaWindow::triggerOnKeyPress(int key, int scan, bool repeat, bool shift, bool ctrl, bool alt) { if(onKeyPressFunction) { lua_rawgeti(l, LUA_REGISTRYINDEX, onKeyPressFunction); lua_pushinteger(l, key); - lua_pushinteger(l, character); + lua_pushinteger(l, scan); lua_pushboolean(l, shift); lua_pushboolean(l, ctrl); lua_pushboolean(l, alt); @@ -376,13 +376,13 @@ void LuaWindow::triggerOnKeyPress(int key, Uint16 character, bool shift, bool ct } } -void LuaWindow::triggerOnKeyRelease(int key, Uint16 character, bool shift, bool ctrl, bool alt) +void LuaWindow::triggerOnKeyRelease(int key, int scan, bool repeat, bool shift, bool ctrl, bool alt) { if(onKeyReleaseFunction) { lua_rawgeti(l, LUA_REGISTRYINDEX, onKeyReleaseFunction); lua_pushinteger(l, key); - lua_pushinteger(l, character); + lua_pushinteger(l, scan); lua_pushboolean(l, shift); lua_pushboolean(l, ctrl); lua_pushboolean(l, alt); diff --git a/src/lua/LuaWindow.h b/src/lua/LuaWindow.h index 7b0356176..3c697e6dd 100644 --- a/src/lua/LuaWindow.h +++ b/src/lua/LuaWindow.h @@ -60,8 +60,8 @@ class LuaWindow void triggerOnMouseDown(int x, int y, unsigned button); void triggerOnMouseUp(int x, int y, unsigned button); void triggerOnMouseWheel(int x, int y, int d); - void triggerOnKeyPress(int key, Uint16 character, bool shift, bool ctrl, bool alt); - void triggerOnKeyRelease(int key, Uint16 character, bool shift, bool ctrl, bool alt); + void triggerOnKeyPress(int key, int scan, bool repeat, bool shift, bool ctrl, bool alt); + void triggerOnKeyRelease(int key, int scan, bool repeat, bool shift, bool ctrl, bool alt); public: LuaScriptInterface * ci; From ba362c1ab7d1e8e8e0c840e8465231143c0dd5fe Mon Sep 17 00:00:00 2001 From: jacob1 Date: Fri, 20 Apr 2018 22:24:29 -0400 Subject: [PATCH 02/11] fix options menu crash --- src/gui/options/OptionsView.cpp | 4 ---- src/gui/options/OptionsView.h | 1 - 2 files changed, 5 deletions(-) diff --git a/src/gui/options/OptionsView.cpp b/src/gui/options/OptionsView.cpp index 96e8003d1..810df3085 100644 --- a/src/gui/options/OptionsView.cpp +++ b/src/gui/options/OptionsView.cpp @@ -228,10 +228,6 @@ OptionsView::OptionsView(): AddComponent(tempLabel); AddComponent(showAvatars); - tempLabel = new ui::Label(ui::Point(showAvatars->Position.X+showAvatars->Size.X+3, depthTextbox->Position.Y), ui::Point(Size.X-28, 16), "\bg- Change the depth of the 3D anaglyph effect"); - tempLabel->Appearance.HorizontalAlign = ui::Appearance::AlignLeft; tempLabel->Appearance.VerticalAlign = ui::Appearance::AlignMiddle; - AddComponent(tempLabel); - class DataFolderAction: public ui::ButtonAction { public: diff --git a/src/gui/options/OptionsView.h b/src/gui/options/OptionsView.h index 99f40e4cf..29c945c35 100644 --- a/src/gui/options/OptionsView.h +++ b/src/gui/options/OptionsView.h @@ -23,7 +23,6 @@ class OptionsView: public ui::Window { ui::Checkbox * fullscreen; ui::Checkbox * fastquit; ui::Checkbox * showAvatars; - ui::Textbox * depthTextbox; public: OptionsView(); void NotifySettingsChanged(OptionsModel * sender); From bd8550c2d58f31ea8b8fc6c56bb5740b98f9d901 Mon Sep 17 00:00:00 2001 From: jacob1 Date: Sun, 22 Apr 2018 20:09:44 -0400 Subject: [PATCH 03/11] fix a few more sdl 2 bugs: mouse movement captured outside the window when mouse is down fullscreen now focuses the window (there is a bug where you have to click once to get mouse input, though) add linux icon, will need to be redone properly because it's offcentered with a black border (mask isn't present) allow typing ~ into the console + some other fixes --- src/PowderToySDL.cpp | 83 +++++++++++++++++++++++++-------- src/gui/console/ConsoleView.cpp | 23 ++++++++- src/gui/console/ConsoleView.h | 7 ++- src/gui/game/GameController.cpp | 1 + src/gui/interface/Engine.cpp | 1 + 5 files changed, 91 insertions(+), 24 deletions(-) diff --git a/src/PowderToySDL.cpp b/src/PowderToySDL.cpp index 787d9e9ba..5a557c9b0 100644 --- a/src/PowderToySDL.cpp +++ b/src/PowderToySDL.cpp @@ -77,7 +77,6 @@ ByteString ClipboardPull() return ByteString(SDL_GetClipboardText()); } -int mousex = 0, mousey = 0; #ifdef OGLI void blit() { @@ -89,6 +88,16 @@ void blit(pixel * vid) SDL_UpdateTexture(sdl_texture, NULL, vid, WINDOWW * sizeof (Uint32)); SDL_RenderClear(sdl_renderer); SDL_RenderCopy(sdl_renderer, sdl_texture, NULL, NULL); + + /*SDL_Surface *icon = SDL_CreateRGBSurfaceFrom((void*)app_icon, 48, 48, 24, 144, 0x00FF0000, 0x0000FF00, 0x000000FF, 0); + SDL_Texture *iconicon = SDL_CreateTextureFromSurface(sdl_renderer, icon); + SDL_Rect a; + a.h = 48; + a.w = 48; + a.x = 0; + a.y = 0; + SDL_RenderCopy(sdl_renderer, iconicon, NULL, &a);*/ + SDL_RenderPresent(sdl_renderer); } #endif @@ -133,11 +142,6 @@ int SDLOpen() HICON hIconBig = (HICON)LoadImage(hModExe, MAKEINTRESOURCE(101), IMAGE_ICON, 32, 32, LR_SHARED); SendMessage(WindowHandle, WM_SETICON, ICON_SMALL, (LPARAM)hIconSmall); SendMessage(WindowHandle, WM_SETICON, ICON_BIG, (LPARAM)hIconBig); -#elif defined(LIN) - SDL_Surface *icon = SDL_CreateRGBSurfaceFrom((void*)app_icon, 48, 48, 24, 144, 0x00FF0000, 0x0000FF00, 0x000000FF, 0); - //SDL_WM_SetIcon(icon, (Uint8*)app_icon_bitmap); - SDL_SetWindowIcon(sdl_window, icon); - SDL_FreeSurface(icon); #endif atexit(SDL_Quit); @@ -154,9 +158,20 @@ void SDLSetScreen(int newScale, bool newFullscreen) fullscreen = newFullscreen; sdl_window = SDL_CreateWindow("The Powder Toy", SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, WINDOWW * newScale, WINDOWH * newScale, newFullscreen ? SDL_WINDOW_FULLSCREEN_DESKTOP : 0); + SDL_Surface *icon = SDL_CreateRGBSurfaceFrom((void*)app_icon, 48, 48, 24, 144, 0x00FF0000, 0x0000FF00, 0x000000FF, 0); + //SDL_WM_SetIcon(icon, (Uint8*)app_icon_bitmap); + SDL_SetWindowIcon(sdl_window, icon); + SDL_FreeSurface(icon); + sdl_renderer = SDL_CreateRenderer(sdl_window, -1, 0); if (newScale > 1) SDL_RenderSetLogicalSize(sdl_renderer, WINDOWW, WINDOWH); + //SDL_RenderSetIntegerScale(sdl_renderer, SDL_TRUE); + if (newFullscreen) + { + SDL_RaiseWindow(sdl_window); + //SDL_SetHint(SDL_HINT_RENDER_SCALE_QUALITY, "linear"); + } sdl_texture = SDL_CreateTexture(sdl_renderer, SDL_PIXELFORMAT_ARGB8888, SDL_TEXTUREACCESS_STREAMING, WINDOWW, WINDOWH); //SDL_SetHint(SDL_HINT_RENDER_SCALE_QUALITY, "linear"); //SDL_SetWindowResizable(sdl_window, SDL_TRUE); @@ -266,6 +281,10 @@ ui::Engine * engine = NULL; bool showDoubleScreenDialog = false; float currentWidth, currentHeight; +int mousex = 0, mousey = 0; +int mouseButton = 0; +bool mouseDown = false; + void EventProcess(SDL_Event event) { //inputScale= 1.0f; @@ -316,34 +335,58 @@ void EventProcess(SDL_Event event) break; } case SDL_MOUSEMOTION: - engine->onMouseMove(event.motion.x * inputScaleH, event.motion.y * inputScaleV); mousex = event.motion.x * inputScaleH; mousey = event.motion.y * inputScaleV; + engine->onMouseMove(mousex, mousey); break; case SDL_MOUSEBUTTONDOWN: - engine->onMouseClick(event.motion.x * inputScaleH, event.motion.y * inputScaleV, event.button.button); mousex = event.motion.x * inputScaleH; mousey = event.motion.y * inputScaleV; + mouseButton = event.button.button; + engine->onMouseClick(event.motion.x * inputScaleH, event.motion.y * inputScaleV, mouseButton); + + mouseDown = true; + SDL_CaptureMouse(SDL_TRUE); break; case SDL_MOUSEBUTTONUP: - engine->onMouseUnclick(event.motion.x * inputScaleH, event.motion.y * inputScaleV, event.button.button); mousex = event.motion.x * inputScaleH; mousey = event.motion.y * inputScaleV; + mouseButton = event.button.button; + engine->onMouseUnclick(mousex, mousey, mouseButton); + + mouseDown = false; + SDL_CaptureMouse(SDL_FALSE); break; case SDL_WINDOWEVENT: { - if (event.window.event != SDL_WINDOWEVENT_RESIZED) + switch (event.window.event) + { + case SDL_WINDOWEVENT_RESIZED: + { + float width = event.window.data1; + float height = event.window.data2; + + currentWidth = width; + currentHeight = height; + // this "* scale" thing doesn't really work properly + // currently there is a bug where input doesn't scale properly after resizing, only when double scale mode is active + inputScaleH = (float)WINDOWW * scale / currentWidth; + inputScaleV = (float)WINDOWH * scale / currentHeight; + std::cout << "Changing input scale to " << inputScaleH << "x" << inputScaleV << std::endl; break; - float width = event.window.data1; - float height = event.window.data2; - - currentWidth = width; - currentHeight = height; - // this "* scale" thing doesn't really work properly - // currently there is a bug where input doesn't scale properly after resizing, only when double scale mode is active - inputScaleH = (float)WINDOWW * scale / currentWidth; - inputScaleV = (float)WINDOWH * scale / currentHeight; - + } + // This would send a mouse up event when focus is lost + // Not even sdl itself will know when the mouse was released if it happens in another window + // So it will ignore the next mouse down (after tpt is re-focused) and not send any events at all + // This is more unintuitive than pretending the mouse is still down when it's not, so this code is commented out + /*case SDL_WINDOWEVENT_FOCUS_LOST: + if (mouseDown) + { + mouseDown = false; + engine->onMouseUnclick(mousex, mousey, mouseButton); + } + break;*/ + } break; } } diff --git a/src/gui/console/ConsoleView.cpp b/src/gui/console/ConsoleView.cpp index a9e646731..e9cd7fb65 100644 --- a/src/gui/console/ConsoleView.cpp +++ b/src/gui/console/ConsoleView.cpp @@ -28,7 +28,8 @@ void ConsoleView::DoKeyPress(int key, int scan, bool repeat, bool shift, bool ct { if ((scan == SDL_SCANCODE_GRAVE && key != '~') || key == SDLK_ESCAPE) { - c->CloseConsole(); + if (!repeat) + doClose = true; return; } switch(key) @@ -51,6 +52,14 @@ void ConsoleView::DoKeyPress(int key, int scan, bool repeat, bool shift, bool ct } } +void ConsoleView::DoTextInput(std::string text) +{ + if (text == "~") + doClose = false; + if (!doClose) + Window::DoTextInput(text); +} + void ConsoleView::NotifyPreviousCommandsChanged(ConsoleModel * sender) { for (size_t i = 0; i < commandList.size(); i++) @@ -95,6 +104,16 @@ void ConsoleView::OnDraw() g->draw_line(Position.X, Position.Y+Size.Y, Position.X+Size.X, Position.Y+Size.Y, 255, 255, 255, 200); } -ConsoleView::~ConsoleView() { +void ConsoleView::OnTick(float dt) +{ + if (doClose) + { + c->CloseConsole(); + doClose = false; + } +} + +ConsoleView::~ConsoleView() +{ } diff --git a/src/gui/console/ConsoleView.h b/src/gui/console/ConsoleView.h index 9cb0ab24d..eeb8b9540 100644 --- a/src/gui/console/ConsoleView.h +++ b/src/gui/console/ConsoleView.h @@ -17,10 +17,13 @@ class ConsoleView: public ui::Window { ConsoleController * c; ui::Textbox * commandField; std::vector commandList; + bool doClose = false; public: ConsoleView(); - virtual void OnDraw(); - virtual void DoKeyPress(int key, int scan, bool repeat, bool shift, bool ctrl, bool alt); + void OnDraw() override; + void OnTick(float dt) override; + void DoKeyPress(int key, int scan, bool repeat, bool shift, bool ctrl, bool alt) override; + void DoTextInput(std::string text) override; void AttachController(ConsoleController * c_) { c = c_; } void NotifyPreviousCommandsChanged(ConsoleModel * sender); void NotifyCurrentCommandChanged(ConsoleModel * sender); diff --git a/src/gui/game/GameController.cpp b/src/gui/game/GameController.cpp index 5b2a0c4a0..cf656f680 100644 --- a/src/gui/game/GameController.cpp +++ b/src/gui/game/GameController.cpp @@ -93,6 +93,7 @@ public: virtual void ControllerExit() { cc->gameModel->UpdateQuickOptions(); + Client::Ref().WritePrefs(); } }; diff --git a/src/gui/interface/Engine.cpp b/src/gui/interface/Engine.cpp index 680ef630b..6eafc1b15 100644 --- a/src/gui/interface/Engine.cpp +++ b/src/gui/interface/Engine.cpp @@ -158,6 +158,7 @@ int Engine::CloseWindow() mousexp_ = mousex_; mouseyp_ = mousey_; } + ignoreEvents = true; return 0; } else From 802ec4d2520d0b486bcf2ecb86028ca3a07fbdf8 Mon Sep 17 00:00:00 2001 From: jacob1 Date: Sun, 22 Apr 2018 20:15:48 -0400 Subject: [PATCH 04/11] remove icon debug stuff --- src/PowderToySDL.cpp | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/src/PowderToySDL.cpp b/src/PowderToySDL.cpp index 5a557c9b0..dead7c3d2 100644 --- a/src/PowderToySDL.cpp +++ b/src/PowderToySDL.cpp @@ -88,16 +88,6 @@ void blit(pixel * vid) SDL_UpdateTexture(sdl_texture, NULL, vid, WINDOWW * sizeof (Uint32)); SDL_RenderClear(sdl_renderer); SDL_RenderCopy(sdl_renderer, sdl_texture, NULL, NULL); - - /*SDL_Surface *icon = SDL_CreateRGBSurfaceFrom((void*)app_icon, 48, 48, 24, 144, 0x00FF0000, 0x0000FF00, 0x000000FF, 0); - SDL_Texture *iconicon = SDL_CreateTextureFromSurface(sdl_renderer, icon); - SDL_Rect a; - a.h = 48; - a.w = 48; - a.x = 0; - a.y = 0; - SDL_RenderCopy(sdl_renderer, iconicon, NULL, &a);*/ - SDL_RenderPresent(sdl_renderer); } #endif From 7ac7eec6cf34541e08fabbb5be0df14fc53d5fe1 Mon Sep 17 00:00:00 2001 From: jacob1 Date: Sun, 22 Apr 2018 22:14:06 -0400 Subject: [PATCH 05/11] more sdl2 fixes: don't recreate window every scale / fullscreen change better renderer handling, input scaling no longer needed even if window resizing is enabled load/save window position (replaces old windows code to do this) calculate initial mouse position on startup because sdl no longer does this for us --- src/PowderToy.h | 1 - src/PowderToySDL.cpp | 292 ++++++++++++-------------------- src/gui/console/ConsoleView.cpp | 2 +- src/gui/console/ConsoleView.h | 2 +- src/gui/interface/Engine.cpp | 3 +- 5 files changed, 111 insertions(+), 189 deletions(-) diff --git a/src/PowderToy.h b/src/PowderToy.h index 990768677..e177234c8 100644 --- a/src/PowderToy.h +++ b/src/PowderToy.h @@ -4,5 +4,4 @@ void EngineProcess(); void ClipboardPush(ByteString text); ByteString ClipboardPull(); int GetModifiers(); -bool LoadWindowPosition(int scale); unsigned int GetTicks(); diff --git a/src/PowderToySDL.cpp b/src/PowderToySDL.cpp index dead7c3d2..1f6e2e8fb 100644 --- a/src/PowderToySDL.cpp +++ b/src/PowderToySDL.cpp @@ -67,6 +67,7 @@ SDL_Texture * sdl_texture; int scale = 1; bool fullscreen = false; + void ClipboardPush(ByteString text) { SDL_SetClipboardText(text.c_str()); @@ -77,6 +78,43 @@ ByteString ClipboardPull() return ByteString(SDL_GetClipboardText()); } +int GetModifiers() +{ + return SDL_GetModState(); +} + +void LoadWindowPosition() +{ + int savedWindowX = Client::Ref().GetPrefInteger("WindowX", INT_MAX); + int savedWindowY = Client::Ref().GetPrefInteger("WindowY", INT_MAX); + SDL_SetWindowPosition(sdl_window, savedWindowX, savedWindowY); +} + +void SaveWindowPosition() +{ + int x, y; + SDL_GetWindowPosition(sdl_window, &x, &y); + + int borderTop, borderLeft; + SDL_GetWindowBordersSize(sdl_window, &borderTop, &borderLeft, nullptr, nullptr); + + Client::Ref().SetPref("WindowX", x - borderLeft); + Client::Ref().SetPref("WindowY", y - borderTop); +} + +void CalculateMousePosition(int *x, int *y) +{ + int globalMx, globalMy; + SDL_GetGlobalMouseState(&globalMx, &globalMy); + int windowX, windowY; + SDL_GetWindowPosition(sdl_window, &windowX, &windowY); + + if (x) + *x = (globalMx - windowX) / scale; + if (y) + *y = (globalMy - windowY) / scale; +} + #ifdef OGLI void blit() { @@ -86,7 +124,9 @@ void blit() void blit(pixel * vid) { SDL_UpdateTexture(sdl_texture, NULL, vid, WINDOWW * sizeof (Uint32)); - SDL_RenderClear(sdl_renderer); + // need to clear the renderer if there are black edges (fullscreen, or resizable window) + if (fullscreen) + SDL_RenderClear(sdl_renderer); SDL_RenderCopy(sdl_renderer, sdl_texture, NULL, NULL); SDL_RenderPresent(sdl_renderer); } @@ -134,6 +174,24 @@ int SDLOpen() SendMessage(WindowHandle, WM_SETICON, ICON_BIG, (LPARAM)hIconBig); #endif + sdl_window = SDL_CreateWindow("The Powder Toy", SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, WINDOWW * scale, WINDOWH * scale, + fullscreen ? SDL_WINDOW_FULLSCREEN_DESKTOP : 0); + sdl_renderer = SDL_CreateRenderer(sdl_window, -1, 0); + SDL_RenderSetLogicalSize(sdl_renderer, WINDOWW, WINDOWH); + //Uncomment this to force fullscreen to an integer resolution + //SDL_RenderSetIntegerScale(sdl_renderer, SDL_TRUE); + sdl_texture = SDL_CreateTexture(sdl_renderer, SDL_PIXELFORMAT_ARGB8888, SDL_TEXTUREACCESS_STREAMING, WINDOWW, WINDOWH); + if (fullscreen) + SDL_RaiseWindow(sdl_window); + //Uncomment this to enable resizing + SDL_SetHint(SDL_HINT_RENDER_SCALE_QUALITY, "linear"); + SDL_SetWindowResizable(sdl_window, SDL_TRUE); + +#ifdef LIN + SDL_Surface *icon = SDL_CreateRGBSurfaceFrom((void*)app_icon, 48, 48, 24, 144, 0x00FF0000, 0x0000FF00, 0x000000FF, 0); + SDL_SetWindowIcon(sdl_window, icon); + SDL_FreeSurface(icon); +#endif atexit(SDL_Quit); return 0; @@ -141,30 +199,12 @@ int SDLOpen() void SDLSetScreen(int newScale, bool newFullscreen) { - SDL_DestroyTexture(sdl_texture); - SDL_DestroyRenderer(sdl_renderer); - SDL_DestroyWindow(sdl_window); scale = newScale; fullscreen = newFullscreen; - sdl_window = SDL_CreateWindow("The Powder Toy", SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, WINDOWW * newScale, WINDOWH * newScale, - newFullscreen ? SDL_WINDOW_FULLSCREEN_DESKTOP : 0); - SDL_Surface *icon = SDL_CreateRGBSurfaceFrom((void*)app_icon, 48, 48, 24, 144, 0x00FF0000, 0x0000FF00, 0x000000FF, 0); - //SDL_WM_SetIcon(icon, (Uint8*)app_icon_bitmap); - SDL_SetWindowIcon(sdl_window, icon); - SDL_FreeSurface(icon); - - sdl_renderer = SDL_CreateRenderer(sdl_window, -1, 0); - if (newScale > 1) - SDL_RenderSetLogicalSize(sdl_renderer, WINDOWW, WINDOWH); - //SDL_RenderSetIntegerScale(sdl_renderer, SDL_TRUE); + SDL_SetWindowSize(sdl_window, WINDOWW * newScale, WINDOWH * newScale); + SDL_SetWindowFullscreen(sdl_window, newFullscreen ? SDL_WINDOW_FULLSCREEN_DESKTOP : 0); if (newFullscreen) - { SDL_RaiseWindow(sdl_window); - //SDL_SetHint(SDL_HINT_RENDER_SCALE_QUALITY, "linear"); - } - sdl_texture = SDL_CreateTexture(sdl_renderer, SDL_PIXELFORMAT_ARGB8888, SDL_TEXTUREACCESS_STREAMING, WINDOWW, WINDOWH); - //SDL_SetHint(SDL_HINT_RENDER_SCALE_QUALITY, "linear"); - //SDL_SetWindowResizable(sdl_window, SDL_TRUE); } unsigned int GetTicks() @@ -236,37 +276,9 @@ std::map readArguments(int argc, char * argv[]) return arguments; } -/*SDLKey MapNumpad(SDLKey key) -{ - switch(key) - { - case SDLK_KP8: - return SDLK_UP; - case SDLK_KP2: - return SDLK_DOWN; - case SDLK_KP6: - return SDLK_RIGHT; - case SDLK_KP4: - return SDLK_LEFT; - case SDLK_KP7: - return SDLK_HOME; - case SDLK_KP1: - return SDLK_END; - case SDLK_KP_PERIOD: - return SDLK_DELETE; - case SDLK_KP0: - case SDLK_KP9: - case SDLK_KP3: - return SDLK_UNKNOWN; - default: - return key; - } -}*/ - int elapsedTime = 0, currentTime = 0, lastTime = 0, currentFrame = 0; unsigned int lastTick = 0; float fps = 0, delta = 1.0f; -float inputScaleH = 1.0f, inputScaleV = 1.0f; ui::Engine * engine = NULL; bool showDoubleScreenDialog = false; float currentWidth, currentHeight; @@ -275,24 +287,11 @@ int mousex = 0, mousey = 0; int mouseButton = 0; bool mouseDown = false; +bool calculatedInitialMouse = false, delay = false; +bool hasMouseMoved = false; + void EventProcess(SDL_Event event) { - //inputScale= 1.0f; - /*if (event.type == SDL_KEYDOWN || event.type == SDL_KEYUP) - { - if (event.key.keysym.unicode==0) - { - // If unicode is zero, this could be a numpad key with numlock off, or numlock on and shift on (unicode is set to 0 by SDL or the OS in these circumstances. If numlock is on, unicode is the relevant digit character). - // For some unknown reason, event.key.keysym.mod seems to be unreliable on some computers (keysum.mod&KEY_MOD_NUM is opposite to the actual value), so check keysym.unicode instead. - // Note: unicode is always zero for SDL_KEYUP events, so this translation won't always work properly for keyup events. - SDLKey newKey = MapNumpad(event.key.keysym.sym); - if (newKey != event.key.keysym.sym) - { - event.key.keysym.sym = newKey; - event.key.keysym.unicode = 0; - } - } - }*/ switch (event.type) { case SDL_QUIT: @@ -321,26 +320,36 @@ void EventProcess(SDL_Event event) y *= -1; } bool positiveDir = y == 0 ? x > 0 : y > 0; - engine->onMouseWheel(event.motion.x * inputScaleH, event.motion.y * inputScaleV, positiveDir ? 1 : -1); + engine->onMouseWheel(event.motion.x, event.motion.y, positiveDir ? 1 : -1); break; } case SDL_MOUSEMOTION: - mousex = event.motion.x * inputScaleH; - mousey = event.motion.y * inputScaleV; + mousex = event.motion.x; + mousey = event.motion.y; engine->onMouseMove(mousex, mousey); + + hasMouseMoved = true; break; case SDL_MOUSEBUTTONDOWN: - mousex = event.motion.x * inputScaleH; - mousey = event.motion.y * inputScaleV; + // if mouse hasn't moved yet, sdl will send 0,0. We don't want that + if (hasMouseMoved) + { + mousex = event.motion.x; + mousey = event.motion.y; + } mouseButton = event.button.button; - engine->onMouseClick(event.motion.x * inputScaleH, event.motion.y * inputScaleV, mouseButton); + engine->onMouseClick(event.motion.x, event.motion.y, mouseButton); mouseDown = true; SDL_CaptureMouse(SDL_TRUE); break; case SDL_MOUSEBUTTONUP: - mousex = event.motion.x * inputScaleH; - mousey = event.motion.y * inputScaleV; + // if mouse hasn't moved yet, sdl will send 0,0. We don't want that + if (hasMouseMoved) + { + mousex = event.motion.x; + mousey = event.motion.y; + } mouseButton = event.button.button; engine->onMouseUnclick(mousex, mousey, mouseButton); @@ -351,7 +360,18 @@ void EventProcess(SDL_Event event) { switch (event.window.event) { - case SDL_WINDOWEVENT_RESIZED: + case SDL_WINDOWEVENT_SHOWN: + if (!calculatedInitialMouse) + { + //initial mouse coords, sdl won't tell us this if mouse hasn't moved + CalculateMousePosition(&mousex, &mousey); + engine->onMouseMove(mousex, mousey); + calculatedInitialMouse = true; + } + break; + // This event would be needed in certain glitchy cases of window resizing + // But for all currently tested cases, it isn't needed + /*case SDL_WINDOWEVENT_RESIZED: { float width = event.window.data1; float height = event.window.data2; @@ -364,7 +384,7 @@ void EventProcess(SDL_Event event) inputScaleV = (float)WINDOWH * scale / currentHeight; std::cout << "Changing input scale to " << inputScaleH << "x" << inputScaleV << std::endl; break; - } + }*/ // This would send a mouse up event when focus is lost // Not even sdl itself will know when the mouse was released if it happens in another window // So it will ignore the next mouse down (after tpt is re-focused) and not send any events at all @@ -423,9 +443,9 @@ void EngineProcess() } #ifdef OGLI - blit(); + blit(); #else - blit(engine->g->vid); + blit(engine->g->vid); #endif int frameTime = SDL_GetTicks() - frameStart; @@ -457,92 +477,6 @@ void EngineProcess() #endif } -int GetModifiers() -{ - return SDL_GetModState(); -} - -#ifdef WIN - -// Returns true if the loaded position was set -// Returns false if something went wrong: SDL_GetWMInfo failed or the loaded position was invalid -bool LoadWindowPosition(int scale) -{ - SDL_SysWMinfo sysInfo; - SDL_VERSION(&sysInfo.version); - if (SDL_GetWMInfo(&sysInfo) > 0) - { - int windowW = WINDOWW * scale; - int windowH = WINDOWH * scale; - - int savedWindowX = Client::Ref().GetPrefInteger("WindowX", INT_MAX); - int savedWindowY = Client::Ref().GetPrefInteger("WindowY", INT_MAX); - - // Center the window on the primary desktop by default - int newWindowX = (desktopWidth - windowW) / 2; - int newWindowY = (desktopHeight - windowH) / 2; - - bool success = false; - - if (savedWindowX != INT_MAX && savedWindowY != INT_MAX) - { - POINT windowPoints[] = { - {savedWindowX, savedWindowY}, // Top-left - {savedWindowX + windowW, savedWindowY + windowH} // Bottom-right - }; - - MONITORINFO monitor; - monitor.cbSize = sizeof(monitor); - if (GetMonitorInfo(MonitorFromPoint(windowPoints[0], MONITOR_DEFAULTTONEAREST), &monitor) != 0) - { - // Only use the saved window position if it lies inside the visible screen - if (PtInRect(&monitor.rcMonitor, windowPoints[0]) && PtInRect(&monitor.rcMonitor, windowPoints[1])) - { - newWindowX = savedWindowX; - newWindowY = savedWindowY; - - success = true; - } - else - { - // Center the window on the nearest monitor - newWindowX = monitor.rcMonitor.left + (monitor.rcMonitor.right - monitor.rcMonitor.left - windowW) / 2; - newWindowY = monitor.rcMonitor.top + (monitor.rcMonitor.bottom - monitor.rcMonitor.top - windowH) / 2; - } - } - } - - SetWindowPos(sysInfo.window, 0, newWindowX, newWindowY, 0, 0, SWP_NOSIZE | SWP_NOZORDER | SWP_NOOWNERZORDER); - - // True if we didn't use the default, i.e. the position was valid - return success; - } - - return false; -} - -// Returns true if the window position was saved -bool SaveWindowPosition() -{ - SDL_SysWMinfo sysInfo; - SDL_VERSION(&sysInfo.version); - if (SDL_GetWMInfo(&sysInfo) > 0) - { - WINDOWPLACEMENT placement; - placement.length = sizeof(placement); - GetWindowPlacement(sysInfo.window, &placement); - - Client::Ref().SetPref("WindowX", (int)placement.rcNormalPosition.left); - Client::Ref().SetPref("WindowY", (int)placement.rcNormalPosition.top); - - return true; - } - - return false; -} - -#endif - void BlueScreen(String detailMessage) { ui::Engine * engine = &ui::Engine::Ref(); @@ -619,23 +553,20 @@ int main(int argc, char * argv[]) chdir(arguments["ddir"].c_str()); #endif - int tempScale = 1; - bool tempFullscreen = false; - - tempScale = Client::Ref().GetPrefInteger("Scale", 1); - tempFullscreen = Client::Ref().GetPrefBool("Fullscreen", false); + scale = Client::Ref().GetPrefInteger("Scale", 1); + fullscreen = Client::Ref().GetPrefBool("Fullscreen", false); if(arguments["kiosk"] == "true") { - tempFullscreen = true; - Client::Ref().SetPref("Fullscreen", tempFullscreen); + fullscreen = true; + Client::Ref().SetPref("Fullscreen", fullscreen); } if(arguments["scale"].length()) { - tempScale = arguments["scale"].ToNumber(); - Client::Ref().SetPref("Scale", tempScale); + scale = arguments["scale"].ToNumber(); + Client::Ref().SetPref("Scale", scale); } ByteString proxyString = ""; @@ -660,21 +591,18 @@ int main(int argc, char * argv[]) Client::Ref().Initialise(proxyString); // TODO: maybe bind the maximum allowed scale to screen size somehow - if(tempScale < 1 || tempScale > 10) - tempScale = 1; + if(scale < 1 || scale > 10) + scale = 1; SDLOpen(); // TODO: mabe make a nice loop that automagically finds the optimal scale if (Client::Ref().IsFirstRun() && desktopWidth > WINDOWW*2+50 && desktopHeight > WINDOWH*2+50) { - tempScale = 2; + scale = 2; Client::Ref().SetPref("Scale", 2); showDoubleScreenDialog = true; } -#ifdef WIN - LoadWindowPosition(tempScale); -#endif - SDLSetScreen(tempScale, tempFullscreen); + LoadWindowPosition(); #ifdef OGLI SDL_GL_SetAttribute (SDL_GL_DOUBLEBUFFER, 1); @@ -811,15 +739,9 @@ int main(int argc, char * argv[]) engine->ShowWindow(new FontEditor(argv[1])); #endif - //initial mouse coords - int sdl_x, sdl_y; - SDL_GetMouseState(&sdl_x, &sdl_y); - engine->onMouseMove(sdl_x * inputScaleH, sdl_y * inputScaleV); EngineProcess(); -#ifdef WIN SaveWindowPosition(); -#endif #if !defined(DEBUG) && !defined(_DEBUG) } diff --git a/src/gui/console/ConsoleView.cpp b/src/gui/console/ConsoleView.cpp index e9cd7fb65..984830946 100644 --- a/src/gui/console/ConsoleView.cpp +++ b/src/gui/console/ConsoleView.cpp @@ -52,7 +52,7 @@ void ConsoleView::DoKeyPress(int key, int scan, bool repeat, bool shift, bool ct } } -void ConsoleView::DoTextInput(std::string text) +void ConsoleView::DoTextInput(String text) { if (text == "~") doClose = false; diff --git a/src/gui/console/ConsoleView.h b/src/gui/console/ConsoleView.h index eeb8b9540..8b45afce0 100644 --- a/src/gui/console/ConsoleView.h +++ b/src/gui/console/ConsoleView.h @@ -23,7 +23,7 @@ public: void OnDraw() override; void OnTick(float dt) override; void DoKeyPress(int key, int scan, bool repeat, bool shift, bool ctrl, bool alt) override; - void DoTextInput(std::string text) override; + void DoTextInput(String text) override; void AttachController(ConsoleController * c_) { c = c_; } void NotifyPreviousCommandsChanged(ConsoleModel * sender); void NotifyCurrentCommandChanged(ConsoleModel * sender); diff --git a/src/gui/interface/Engine.cpp b/src/gui/interface/Engine.cpp index 6eafc1b15..cd51079f8 100644 --- a/src/gui/interface/Engine.cpp +++ b/src/gui/interface/Engine.cpp @@ -92,7 +92,8 @@ void Engine::ConfirmExit() void Engine::ShowWindow(Window * window) { windowOpenState = 0; - ignoreEvents = true; + if (state_) + ignoreEvents = true; if(window->Position.X==-1) { window->Position.X = (width_-window->Size.X)/2; From 002ab799c5cf9d0afe194abb58c173cbe60b52b7 Mon Sep 17 00:00:00 2001 From: jacob1 Date: Mon, 23 Apr 2018 21:26:57 -0400 Subject: [PATCH 06/11] whitespace fixes --- src/PowderToySDL.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/PowderToySDL.cpp b/src/PowderToySDL.cpp index 1f6e2e8fb..99064e4e2 100644 --- a/src/PowderToySDL.cpp +++ b/src/PowderToySDL.cpp @@ -175,7 +175,7 @@ int SDLOpen() #endif sdl_window = SDL_CreateWindow("The Powder Toy", SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, WINDOWW * scale, WINDOWH * scale, - fullscreen ? SDL_WINDOW_FULLSCREEN_DESKTOP : 0); + fullscreen ? SDL_WINDOW_FULLSCREEN_DESKTOP : 0); sdl_renderer = SDL_CreateRenderer(sdl_window, -1, 0); SDL_RenderSetLogicalSize(sdl_renderer, WINDOWW, WINDOWH); //Uncomment this to force fullscreen to an integer resolution @@ -184,8 +184,8 @@ int SDLOpen() if (fullscreen) SDL_RaiseWindow(sdl_window); //Uncomment this to enable resizing - SDL_SetHint(SDL_HINT_RENDER_SCALE_QUALITY, "linear"); - SDL_SetWindowResizable(sdl_window, SDL_TRUE); + //SDL_SetHint(SDL_HINT_RENDER_SCALE_QUALITY, "linear"); + //SDL_SetWindowResizable(sdl_window, SDL_TRUE); #ifdef LIN SDL_Surface *icon = SDL_CreateRGBSurfaceFrom((void*)app_icon, 48, 48, 24, 144, 0x00FF0000, 0x0000FF00, 0x000000FF, 0); @@ -443,9 +443,9 @@ void EngineProcess() } #ifdef OGLI - blit(); + blit(); #else - blit(engine->g->vid); + blit(engine->g->vid); #endif int frameTime = SDL_GetTicks() - frameStart; From 841022c907ddd28e6859e29cd9cda23665161560 Mon Sep 17 00:00:00 2001 From: jacob1 Date: Sat, 5 May 2018 21:49:07 -0400 Subject: [PATCH 07/11] recenter linux icon --- data/icon.cpp | 580 ++++++++++++++++++++++++++++++++++- data/icon.h | 1 - resources/icon/icontofile.py | 13 +- resources/icon/powder-48.png | Bin 2699 -> 2340 bytes src/PowderToySDL.cpp | 2 +- 5 files changed, 590 insertions(+), 6 deletions(-) diff --git a/data/icon.cpp b/data/icon.cpp index 67824c339..4210a37fb 100644 --- a/data/icon.cpp +++ b/data/icon.cpp @@ -18,6 +18,582 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA */ -extern const unsigned char app_icon[] = {0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,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0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x87,0x83,0x80,0x88,0x84,0x81,0x88,0x84,0x81,0x88,0x84,0x81,0x88,0x84,0x81,0x88,0x84,0x81,0x88,0x84,0x81,0x88,0x84,0x81,0x88,0x84,0x81,0x88,0x84,0x81,0x88,0x84,0x81,0x88,0x84,0x81,0x88,0x84,0x81,0x88,0x84,0x81,0x88,0x84,0x81,0x88,0x84,0x81,0x88,0x84,0x81,0x88,0x84,0x81,0x88,0x84,0x81,0x88,0x84,0x81,0x88,0x84,0x81,0x88,0x84,0x81,0x88,0x84,0x81,0x88,0x84,0x81,0x88,0x84,0x81,0x88,0x84,0x81,0x88,0x84,0x81,0x88,0x84,0x81,0x88,0x84,0x81,0x88,0x84,0x81,0x88,0x84,0x81,0x88,0x84,0x81,0x88,0x84,0x81,0x88,0x84,0x81,0x88,0x84,0x81,0x88,0x84,0x81,0x88,0x84,0x81,0x88,0x84,0x81,0x88,0x84,0x81,0x88,0x84,0x81,0x88,0x84,0x81,0x88,0x84,0x81,0x88,0x84,0x81,0x7f,0x7c,0x79,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x88,0x84,0x81,0xe0,0xd9,0xd3,0xe0,0xd9,0xd3,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c6,0xbd,0xd1,0xc6,0xbd,0x88,0x84,0x81,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x78,0x74,0x72,0x88,0x84,0x81,0x88,0x84,0x81,0x88,0x84,0x81,0x88,0x84,0x81,0x88,0x84,0x81,0x88,0x84,0x81,0x88,0x84,0x81,0x88,0x84,0x81,0x88,0x84,0x81,0x88,0x84,0x81,0x88,0x84,0x81,0x88,0x84,0x81,0x88,0x84,0x81,0x88,0x84,0x81,0x87,0x83,0x80,0x87,0x83,0x80,0x87,0x83,0x80,0x87,0x83,0x80,0x87,0x83,0x80,0x87,0x83,0x80,0x87,0x83,0x80,0x87,0x83,0x80,0x87,0x83,0x80,0x87,0x83,0x80,0x87,0x83,0x80,0x87,0x83,0x80,0x87,0x83,0x80,0x87,0x83,0x80,0x87,0x83,0x80,0x87,0x83,0x80,0x87,0x83,0x80,0x87,0x83,0x80,0x87,0x83,0x80,0x87,0x83,0x80,0x88,0x84,0x81,0x88,0x84,0x81,0x88,0x84,0x81,0x88,0x84,0x81,0x88,0x84,0x81,0x88,0x84,0x81,0x88,0x84,0x81,0x88,0x84,0x81,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x2,0x0,0x1,0x4,0x1,0x2,0x4,0x1,0x2,0x4,0x1,0x2,0x4,0x1,0x2,0x4,0x1,0x2,0x4,0x1,0x2,0x4,0x1,0x2,0x4,0x1,0x2,0x4,0x1,0x2,0x4,0x1,0x2,0x4,0x1,0x2,0x4,0x1,0x2,0x4,0x1,0x2,0x4,0x1,0x2,0x4,0x1,0x2,0x4,0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x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0}; +extern const unsigned char app_icon[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x83, 0x87, 0x6C, 0x81, 0x84, 0x88, 0xFF, + 0x81, 0x84, 0x88, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x81, 0x84, 0x88, 0xFF, + 0x81, 0x84, 0x88, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x81, 0x84, 0x88, 0xFF, + 0x81, 0x84, 0x88, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x81, 0x84, 0x88, 0xFF, + 0x81, 0x84, 0x88, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x81, 0x84, 0x88, 0xFF, + 0x81, 0x84, 0x88, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x81, 0x84, 0x88, 0xFF, + 0x81, 0x84, 0x88, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x81, 0x84, 0x88, 0xFF, + 0x81, 0x84, 0x88, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x81, 0x84, 0x88, 0xFF, + 0x81, 0x84, 0x88, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0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0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, + 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, + 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, + 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, + 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, + 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, + 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, + 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, + 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, + 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, + 0xBD, 0xC6, 0xD1, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x00, 0x00, 0x00, 0x2A, 0x00, 0x00, 0x00, 0x0E, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x81, 0x84, 0x88, 0xFF, 0xBD, 0xC6, 0xD1, 0xFF, + 0x00, 0x00, 0x00, 0xFF, 0xFA, 0xFB, 0xFB, 0xF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x84, 0x88, 0xFF, 0x00, 0x00, 0x00, 0x2A, 0x00, 0x00, 0x00, 0x0E, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x81, 0x84, 0x88, 0xFF, 0xBD, 0xC6, 0xD1, 0xFF, + 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, + 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, + 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, + 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, + 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, + 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, + 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, + 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, + 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, + 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, + 0xBD, 0xC6, 0xD1, 0xFF, 0x81, 0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xC6, 0xD1, 0xFF, 0xBD, 0xC6, 0xD1, 0xFF, 0xBD, 0xC6, 0xD1, 0xFF, 0xBD, 0xC6, 0xD1, 0xFF, + 0xBD, 0xC6, 0xD1, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x00, 0x00, 0x00, 0x2A, 0x00, 0x00, 0x00, 0x0E, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x72, 0x74, 0x78, 0x45, 0x81, 0x84, 0x88, 0xFF, + 0x81, 0x84, 0x88, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x81, 0x84, 0x88, 0xFF, + 0x81, 0x84, 0x88, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x81, 0x84, 0x88, 0xFF, + 0x81, 0x84, 0x88, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x81, 0x84, 0x88, 0xFF, + 0x81, 0x84, 0x88, 0xFF, 0x80, 0x83, 0x87, 0xFF, 0x80, 0x83, 0x87, 0xFF, 0x80, 0x83, 0x87, 0xFF, + 0x80, 0x83, 0x87, 0xFF, 0x80, 0x83, 0x87, 0xFF, 0x80, 0x83, 0x87, 0xFF, 0x80, 0x83, 0x87, 0xFF, + 0x80, 0x83, 0x87, 0xFF, 0x80, 0x83, 0x87, 0xFF, 0x80, 0x83, 0x87, 0xFF, 0x80, 0x83, 0x87, 0xFF, + 0x80, 0x83, 0x87, 0xFF, 0x80, 0x83, 0x87, 0xFF, 0x80, 0x83, 0x87, 0xFF, 0x80, 0x83, 0x87, 0xFF, + 0x80, 0x83, 0x87, 0xFF, 0x80, 0x83, 0x87, 0xFF, 0x80, 0x83, 0x87, 0xFF, 0x80, 0x83, 0x87, 0xFF, + 0x80, 0x83, 0x87, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x81, 0x84, 0x88, 0xFF, + 0x81, 0x84, 0x88, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x81, 0x84, 0x88, 0xFF, 0x81, 0x84, 0x88, 0xFF, + 0x81, 0x84, 0x88, 0xFF, 0x00, 0x00, 0x00, 0x34, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x0A, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x15, + 0x00, 0x00, 0x00, 0x25, 0x00, 0x00, 0x00, 0x2A, 0x00, 0x00, 0x00, 0x2A, 0x00, 0x00, 0x00, 0x2A, + 0x00, 0x00, 0x00, 0x2A, 0x00, 0x00, 0x00, 0x2A, 0x00, 0x00, 0x00, 0x2A, 0x00, 0x00, 0x00, 0x2A, + 0x00, 0x00, 0x00, 0x2A, 0x00, 0x00, 0x00, 0x2A, 0x00, 0x00, 0x00, 0x2A, 0x00, 0x00, 0x00, 0x2A, + 0x01, 0x00, 0x02, 0x2B, 0x02, 0x01, 0x04, 0x2C, 0x02, 0x01, 0x04, 0x2C, 0x02, 0x01, 0x04, 0x2C, + 0x02, 0x01, 0x04, 0x2C, 0x02, 0x01, 0x04, 0x2C, 0x02, 0x01, 0x04, 0x2C, 0x02, 0x01, 0x04, 0x2C, + 0x02, 0x01, 0x04, 0x2C, 0x02, 0x01, 0x04, 0x2C, 0x02, 0x01, 0x04, 0x2C, 0x02, 0x01, 0x04, 0x2C, + 0x02, 0x01, 0x04, 0x2C, 0x02, 0x01, 0x04, 0x2C, 0x02, 0x01, 0x04, 0x2C, 0x02, 0x01, 0x04, 0x2C, + 0x02, 0x01, 0x04, 0x2C, 0x02, 0x01, 0x04, 0x2C, 0x02, 0x01, 0x04, 0x2C, 0x02, 0x01, 0x04, 0x2C, + 0x02, 0x01, 0x04, 0x2C, 0x00, 0x00, 0x00, 0x2A, 0x00, 0x00, 0x00, 0x2A, 0x00, 0x00, 0x00, 0x2A, + 0x00, 0x00, 0x00, 0x2A, 0x00, 0x00, 0x00, 0x2A, 0x00, 0x00, 0x00, 0x2A, 0x00, 0x00, 0x00, 0x2A, + 0x00, 0x00, 0x00, 0x2A, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x03, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x05, + 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x0E, + 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x0E, + 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x0E, + 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x0E, + 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x0E, + 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x0E, + 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x0E, + 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x0E, + 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x0E, + 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x0E, + 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 +}; -extern const unsigned char app_icon_bitmap[] = {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x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FF,0xFF,0xFF,0xF0,0xFF,0xFF,0xFF,0xFF,0xFF,0xF0,0xFF,0xFF,0xFF,0xFF,0xFF,0xF0,0xFF,0xFF,0xFF,0xFF,0xFF,0xF0,0xFF,0xFF,0xFF,0xFF,0xFF,0xE0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}; diff --git a/data/icon.h b/data/icon.h index afdce54ac..769958027 100644 --- a/data/icon.h +++ b/data/icon.h @@ -20,4 +20,3 @@ */ #pragma once extern const unsigned char app_icon[]; -extern const unsigned char app_icon_bitmap[]; diff --git a/resources/icon/icontofile.py b/resources/icon/icontofile.py index 4e311a59b..b6536c5af 100644 --- a/resources/icon/icontofile.py +++ b/resources/icon/icontofile.py @@ -1,7 +1,16 @@ import sys +from PIL import Image +image = Image.open(sys.argv[1]) -with open(sys.argv[1], "rb") as icon: +output = "" +formatted = [] +for pixel in image.getdata(): + formatted.extend("0x{0:02X}".format(byte) for byte in pixel) +for i in range(len(formatted)/16 + 1): + print(", ".join(formatted[i*16:(i+1)*16]) + ",") + +"""with open(sys.argv[1], "rb") as icon: icondata = icon.read() output = ["0x{0:02X}".format(ord(byte)) for byte in icondata] for line in range(len(output)/16+1): - print(", ".join(output[line*16:(line+1)*16])+",") + print(", ".join(output[line*16:(line+1)*16])+",")""" diff --git a/resources/icon/powder-48.png b/resources/icon/powder-48.png index 8a896e7f65f43705b4619787e4f24838ed19e7ca..bdaf952cd7f699d51baa942e8db146999352b981 100644 GIT binary patch delta 2309 zcmV+g3HtVn6{Hf7Bo78+OGiWi{{a60|De66laW3be*gz`Nliru;spi(FDkQiF+KnQ z2(d{-K~!ko?b%z5UH4T6@ZUP;c+QOH>U&&ACie@W6;+yui=v1GDpep+fhZ_K2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n`^a=bT2CD(go zq4F9+#j}%V&30Z-ob0BJM4bBMrf=xAZrWzpk+%oJg>B+g`tW%tPPRJEiQ{(O?!DGV zr=Pvn>1zO$ccyRV0_1I4ow`mRv^I9{a~l_VHmh!0!#E4uZGY)-IBZkUDU?dTMd#1u zrk`IOXX<&A*AP}-ee64ccouv5S{ZlxdR!vzOka;nmCpuHX)0u+r_N!d-@J?poqh)S zZD0V^v5!or|CVCc$DR6x@(E}9CiThRw0dOfd9PD%J@517U2*NdPCtB%09y#)9HaSM z@;Q*&#S5CX9DngmNPm($@3s5c>FcSJ+qib;v%Pm}qZ`)=z{K56Yxh5Y)8^Gir*8LN z3G3#43;7jdoSAkR0XFrN)akFYX%{132k+DUM&#q}iKE?jYvXR({NCr}-G@~6f#sY! zZs+yP&mEchy>Djn+X(PH0q&FV-kz;{AXMlc*u>}CMt?$BqmiEp3lU!d8(}A%KR|$^ z_PHN-E7KZ4ryhY*9GNHR`*Egz6q>l!m$l8 zB>axY4iE~3Yzo`NYxp3}%UJTGc4FNaQzOF%DHA-3x9*d226hkMN>=9#qsTh2QFm|!-^hmhDE1~5~ ze}9HgLbaC>;KF0;O8fIAE2P5N^WMJZNvo%hUOSt$^=Yd|rT%?PUla1*GV@NH+{u%7 zY_`54J10xnaGtawed4;OP5#DhVFR~>S_<35`VVGb()3zi7jgmePMz$-Di`2W-|sm# zdD6DNEL9Sh2o4~aRT!j<(A2t_tF-5W>0ssI207*qoM6N<$f-jmV^#A|> diff --git a/src/PowderToySDL.cpp b/src/PowderToySDL.cpp index 99064e4e2..a114937b1 100644 --- a/src/PowderToySDL.cpp +++ b/src/PowderToySDL.cpp @@ -188,7 +188,7 @@ int SDLOpen() //SDL_SetWindowResizable(sdl_window, SDL_TRUE); #ifdef LIN - SDL_Surface *icon = SDL_CreateRGBSurfaceFrom((void*)app_icon, 48, 48, 24, 144, 0x00FF0000, 0x0000FF00, 0x000000FF, 0); + SDL_Surface *icon = SDL_CreateRGBSurfaceFrom((void*)app_icon, 48, 48, 32, 192, 0x000000FF, 0x0000FF00, 0x00FF0000, 0xFF000000); SDL_SetWindowIcon(sdl_window, icon); SDL_FreeSurface(icon); #endif From 58127f355b9f6960ef9c097ca45326a2e711ae8a Mon Sep 17 00:00:00 2001 From: jacob1 Date: Sat, 5 May 2018 23:47:31 -0400 Subject: [PATCH 08/11] fix windows / renderer compile (renderer requires sdl for now) --- SConscript | 35 +++++++------- src/PowderToySDL.cpp | 58 ++++++++--------------- src/SDLCompat.cpp | 2 +- src/SDLCompat.h | 8 +--- src/gui/localbrowser/LocalBrowserView.cpp | 4 -- src/gui/options/OptionsView.cpp | 6 --- src/gui/search/SearchView.cpp | 4 -- 7 files changed, 38 insertions(+), 79 deletions(-) diff --git a/SConscript b/SConscript index 8418fb57d..e2f74233c 100644 --- a/SConscript +++ b/SConscript @@ -242,26 +242,25 @@ def findLibs(env, conf): if not GetOption('renderer') and not conf.CheckLib('SDLmain'): FatalError("libSDLmain not found or not installed") - if not GetOption('renderer'): - #Look for SDL - runSdlConfig = platform == "Linux" or compilePlatform == "Linux" or platform == "FreeBSD" - if False and platform == "Darwin" and conf.CheckFramework("SDL"): - runSdlConfig = False - elif not conf.CheckLib("SDL2"): - FatalError("SDL development library not found or not installed") + #Look for SDL + runSdlConfig = platform == "Linux" or compilePlatform == "Linux" or platform == "FreeBSD" + if False and platform == "Darwin" and conf.CheckFramework("SDL"): + runSdlConfig = False + elif not conf.CheckLib("SDL2"): + FatalError("SDL development library not found or not installed") - if runSdlConfig: - try: - env.ParseConfig('sdl2-config --cflags') - if GetOption('static'): - env.ParseConfig('sdl2-config --static-libs') - else: - env.ParseConfig('sdl2-config --libs') - except: - pass + if runSdlConfig: + try: + env.ParseConfig('sdl2-config --cflags') + if GetOption('static'): + env.ParseConfig('sdl2-config --static-libs') + else: + env.ParseConfig('sdl2-config --libs') + except: + pass #look for SDL.h - if not GetOption('renderer') and not conf.CheckCHeader('SDL2.h'): + if not conf.CheckCHeader('SDL2.h'): if conf.CheckCHeader('SDL2/SDL.h'): env.Append(CPPDEFINES=["SDL_INC"]) else: @@ -505,8 +504,6 @@ if GetOption('opengl') or GetOption('opengl-renderer'): if GetOption('renderer'): env.Append(CPPDEFINES=['RENDERER']) -else: - env.Append(CPPDEFINES=['USE_SDL']) if GetOption('font'): env.Append(CPPDEFINES=['FONTEDITOR']) diff --git a/src/PowderToySDL.cpp b/src/PowderToySDL.cpp index a114937b1..89c3e9c9c 100644 --- a/src/PowderToySDL.cpp +++ b/src/PowderToySDL.cpp @@ -1,11 +1,10 @@ -#ifdef USE_SDL +#ifndef RENDERER #include #include "common/String.h" #include #include #ifdef WIN -#define _WIN32_WINNT 0x0501 //Necessary for some macros and functions, tells windows.h to include functions only available in Windows XP or later #include #endif #include "SDLCompat.h" @@ -54,10 +53,6 @@ using namespace std; #define INCLUDE_SYSWM #include "SDLCompat.h" -#if defined(USE_SDL) && defined(LIN) && defined(SDL_VIDEO_DRIVER_X11) -SDL_SysWMinfo sdl_wminfo; -Atom XA_CLIPBOARD, XA_TARGETS, XA_UTF8_STRING; -#endif int desktopWidth = 1280, desktopHeight = 1024; @@ -134,10 +129,7 @@ void blit(pixel * vid) int SDLOpen() { -#if defined(WIN) && defined(WINCONSOLE) - FILE * console = fopen("CON", "w" ); -#endif - if (SDL_Init(SDL_INIT_VIDEO)<0) + if (SDL_Init(SDL_INIT_VIDEO) < 0) { fprintf(stderr, "Initializing SDL: %s\n", SDL_GetError()); return 1; @@ -148,32 +140,6 @@ int SDLOpen() desktopWidth = SDLDisplayMode.w; desktopHeight = SDLDisplayMode.h; -#if defined(WIN) && defined(WINCONSOLE) - //On Windows, SDL redirects stdout to stdout.txt, which can be annoying when debugging, here we redirect back to the console - if (console) - { - freopen("CON", "w", stdout); - freopen("CON", "w", stderr); - //fclose(console); - } -#endif -#ifdef WIN - SDL_SysWMinfo SysInfo; - SDL_VERSION(&SysInfo.version); - if(SDL_GetWMInfo(&SysInfo) <= 0) { - printf("%s : %p\n", SDL_GetError(), SysInfo.window); - exit(-1); - } - HWND WindowHandle = SysInfo.window; - - // Use GetModuleHandle to get the Exe HMODULE/HINSTANCE - HMODULE hModExe = GetModuleHandle(NULL); - HICON hIconSmall = (HICON)LoadImage(hModExe, MAKEINTRESOURCE(101), IMAGE_ICON, 16, 16, LR_SHARED); - HICON hIconBig = (HICON)LoadImage(hModExe, MAKEINTRESOURCE(101), IMAGE_ICON, 32, 32, LR_SHARED); - SendMessage(WindowHandle, WM_SETICON, ICON_SMALL, (LPARAM)hIconSmall); - SendMessage(WindowHandle, WM_SETICON, ICON_BIG, (LPARAM)hIconBig); -#endif - sdl_window = SDL_CreateWindow("The Powder Toy", SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, WINDOWW * scale, WINDOWH * scale, fullscreen ? SDL_WINDOW_FULLSCREEN_DESKTOP : 0); sdl_renderer = SDL_CreateRenderer(sdl_window, -1, 0); @@ -187,6 +153,23 @@ int SDLOpen() //SDL_SetHint(SDL_HINT_RENDER_SCALE_QUALITY, "linear"); //SDL_SetWindowResizable(sdl_window, SDL_TRUE); +#ifdef WIN + SDL_SysWMinfo SysInfo; + SDL_VERSION(&SysInfo.version); + if(SDL_GetWindowWMInfo(sdl_window, &SysInfo) <= 0) + { + printf("%s : %p\n", SDL_GetError(), SysInfo.info.win.window); + exit(-1); + } + HWND WindowHandle = SysInfo.info.win.window; + + // Use GetModuleHandle to get the Exe HMODULE/HINSTANCE + HMODULE hModExe = GetModuleHandle(NULL); + HICON hIconSmall = (HICON)LoadImage(hModExe, MAKEINTRESOURCE(101), IMAGE_ICON, 16, 16, LR_SHARED); + HICON hIconBig = (HICON)LoadImage(hModExe, MAKEINTRESOURCE(101), IMAGE_ICON, 32, 32, LR_SHARED); + SendMessage(WindowHandle, WM_SETICON, ICON_SMALL, (LPARAM)hIconSmall); + SendMessage(WindowHandle, WM_SETICON, ICON_BIG, (LPARAM)hIconBig); +#endif #ifdef LIN SDL_Surface *icon = SDL_CreateRGBSurfaceFrom((void*)app_icon, 48, 48, 32, 192, 0x000000FF, 0x0000FF00, 0x00FF0000, 0xFF000000); SDL_SetWindowIcon(sdl_window, icon); @@ -412,9 +395,6 @@ void DoubleScreenDialog() { Client::Ref().SetPref("Scale", 1); engine->SetScale(1); -#ifdef WIN - LoadWindowPosition(1); -#endif } } diff --git a/src/SDLCompat.cpp b/src/SDLCompat.cpp index 32c3f3adc..2e57a071c 100644 --- a/src/SDLCompat.cpp +++ b/src/SDLCompat.cpp @@ -1,4 +1,4 @@ -#if defined(USE_SDL) && defined(_MSC_VER) && (_MSC_VER >= 1900) +#if defined(_MSC_VER) && (_MSC_VER >= 1900) #include diff --git a/src/SDLCompat.h b/src/SDLCompat.h index c330c0911..3ae486eac 100644 --- a/src/SDLCompat.h +++ b/src/SDLCompat.h @@ -1,5 +1,3 @@ -#ifdef USE_SDL - #ifdef SDL_INC #include "SDL2/SDL.h" #else @@ -7,13 +5,11 @@ #endif #ifdef INCLUDE_SYSWM -#if defined(WIN) || defined(LIN) +#if defined(WIN) #ifdef SDL_INC #include #else #include #endif -#endif // WIN || LIN +#endif // WIN #endif // INCLUDE_SYSWM - -#endif // USE_SDL diff --git a/src/gui/localbrowser/LocalBrowserView.cpp b/src/gui/localbrowser/LocalBrowserView.cpp index 703dd9213..7f7971009 100644 --- a/src/gui/localbrowser/LocalBrowserView.cpp +++ b/src/gui/localbrowser/LocalBrowserView.cpp @@ -114,21 +114,17 @@ void LocalBrowserView::textChanged() else if (num > pageCount) pageTextbox->SetText(String::Build(pageCount)); changed = true; -#ifdef USE_SDL lastChanged = GetTicks()+600; -#endif } void LocalBrowserView::OnTick(float dt) { c->Update(); -#ifdef USE_SDL if (changed && lastChanged < GetTicks()) { changed = false; c->SetPage(std::max(pageTextbox->GetText().ToNumber(true), 0)); } -#endif } void LocalBrowserView::NotifyPageChanged(LocalBrowserModel * sender) diff --git a/src/gui/options/OptionsView.cpp b/src/gui/options/OptionsView.cpp index 810df3085..8ffdbadc1 100644 --- a/src/gui/options/OptionsView.cpp +++ b/src/gui/options/OptionsView.cpp @@ -180,13 +180,7 @@ OptionsView::OptionsView(): FullscreenAction(OptionsView * v_){ v = v_; } virtual void ActionCallback(ui::Checkbox * sender) { -#ifdef USE_SDL -#if defined(MACOSX) && !SDL_VERSION_ATLEAST(1, 2, 15) - ErrorMessage::Blocking("Information", "Fullscreen doesn't work on OS X"); -#else v->c->SetFullscreen(sender->GetChecked()); -#endif -#endif } }; diff --git a/src/gui/search/SearchView.cpp b/src/gui/search/SearchView.cpp index 245b256a5..94c6cb511 100644 --- a/src/gui/search/SearchView.cpp +++ b/src/gui/search/SearchView.cpp @@ -291,9 +291,7 @@ void SearchView::textChanged() else if (num > pageCount) pageTextbox->SetText(String::Build(pageCount)); changed = true; -#ifdef USE_SDL lastChanged = GetTicks()+600; -#endif } void SearchView::OnTryOkay(OkayMethod method) @@ -780,13 +778,11 @@ void SearchView::NotifySelectedChanged(SearchModel * sender) void SearchView::OnTick(float dt) { c->Update(); -#ifdef USE_SDL if (changed && lastChanged < GetTicks()) { changed = false; c->SetPage(std::max(pageTextbox->GetText().ToNumber(true), 0)); } -#endif } void SearchView::OnMouseWheel(int x, int y, int d) From 743ec98e3f542d2864ee604a16b4ae4716ff942e Mon Sep 17 00:00:00 2001 From: jacob1 Date: Sat, 19 May 2018 16:50:47 -0400 Subject: [PATCH 09/11] add resizable window and original fullscreen options --- src/PowderToySDL.cpp | 38 ++++++++++++++++------ src/gui/interface/Engine.cpp | 2 ++ src/gui/interface/Engine.h | 7 ++++ src/gui/options/OptionsController.cpp | 10 ++++++ src/gui/options/OptionsController.h | 2 ++ src/gui/options/OptionsModel.cpp | 26 ++++++++++++++- src/gui/options/OptionsModel.h | 4 +++ src/gui/options/OptionsView.cpp | 46 ++++++++++++++++++++++++--- src/gui/options/OptionsView.h | 2 ++ 9 files changed, 122 insertions(+), 15 deletions(-) diff --git a/src/PowderToySDL.cpp b/src/PowderToySDL.cpp index 89c3e9c9c..a0031bfaf 100644 --- a/src/PowderToySDL.cpp +++ b/src/PowderToySDL.cpp @@ -61,6 +61,8 @@ SDL_Renderer * sdl_renderer; SDL_Texture * sdl_texture; int scale = 1; bool fullscreen = false; +bool altFullscreen = false; +bool resizable = false; void ClipboardPush(ByteString text) @@ -120,7 +122,7 @@ void blit(pixel * vid) { SDL_UpdateTexture(sdl_texture, NULL, vid, WINDOWW * sizeof (Uint32)); // need to clear the renderer if there are black edges (fullscreen, or resizable window) - if (fullscreen) + if (fullscreen || resizable) SDL_RenderClear(sdl_renderer); SDL_RenderCopy(sdl_renderer, sdl_texture, NULL, NULL); SDL_RenderPresent(sdl_renderer); @@ -140,8 +142,13 @@ int SDLOpen() desktopWidth = SDLDisplayMode.w; desktopHeight = SDLDisplayMode.h; + unsigned int flags = 0; + if (fullscreen) + flags = altFullscreen ? SDL_WINDOW_FULLSCREEN : SDL_WINDOW_FULLSCREEN_DESKTOP; + if (resizable) + flags |= SDL_WINDOW_RESIZABLE; sdl_window = SDL_CreateWindow("The Powder Toy", SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, WINDOWW * scale, WINDOWH * scale, - fullscreen ? SDL_WINDOW_FULLSCREEN_DESKTOP : 0); + flags); sdl_renderer = SDL_CreateRenderer(sdl_window, -1, 0); SDL_RenderSetLogicalSize(sdl_renderer, WINDOWW, WINDOWH); //Uncomment this to force fullscreen to an integer resolution @@ -180,14 +187,20 @@ int SDLOpen() return 0; } -void SDLSetScreen(int newScale, bool newFullscreen) +void SDLSetScreen(int scale_, bool resizable_, bool fullscreen_, bool altFullscreen_) { - scale = newScale; - fullscreen = newFullscreen; - SDL_SetWindowSize(sdl_window, WINDOWW * newScale, WINDOWH * newScale); - SDL_SetWindowFullscreen(sdl_window, newFullscreen ? SDL_WINDOW_FULLSCREEN_DESKTOP : 0); - if (newFullscreen) + scale = scale_; + fullscreen = fullscreen_; + altFullscreen = altFullscreen_; + resizable = resizable_; + SDL_SetWindowSize(sdl_window, WINDOWW * scale, WINDOWH * scale); + unsigned int flags = 0; + if (fullscreen) + flags = altFullscreen ? SDL_WINDOW_FULLSCREEN : SDL_WINDOW_FULLSCREEN_DESKTOP; + SDL_SetWindowFullscreen(sdl_window, flags); + if (fullscreen) SDL_RaiseWindow(sdl_window); + SDL_SetWindowResizable(sdl_window, resizable ? SDL_TRUE : SDL_FALSE); } unsigned int GetTicks() @@ -417,9 +430,10 @@ void EngineProcess() engine->Tick(); engine->Draw(); - if(scale != engine->Scale || fullscreen != engine->Fullscreen) + if (scale != engine->Scale || fullscreen != engine->Fullscreen + || altFullscreen != engine->GetAltFullscreen() || resizable != engine->GetResizable()) { - SDLSetScreen(engine->Scale, engine->Fullscreen); + SDLSetScreen(engine->Scale, engine->GetResizable(), engine->Fullscreen, engine->GetAltFullscreen()); } #ifdef OGLI @@ -534,7 +548,9 @@ int main(int argc, char * argv[]) #endif scale = Client::Ref().GetPrefInteger("Scale", 1); + resizable = Client::Ref().GetPrefBool("Resizable", false); fullscreen = Client::Ref().GetPrefBool("Fullscreen", false); + altFullscreen = Client::Ref().GetPrefBool("AltFullscreen", false); if(arguments["kiosk"] == "true") @@ -598,7 +614,9 @@ int main(int argc, char * argv[]) #endif ui::Engine::Ref().g = new Graphics(); ui::Engine::Ref().Scale = scale; + ui::Engine::Ref().SetResizable(resizable); ui::Engine::Ref().Fullscreen = fullscreen; + ui::Engine::Ref().SetAltFullscreen(altFullscreen); engine = &ui::Engine::Ref(); engine->SetMaxSize(desktopWidth, desktopHeight); diff --git a/src/gui/interface/Engine.cpp b/src/gui/interface/Engine.cpp index cd51079f8..c78f35a81 100644 --- a/src/gui/interface/Engine.cpp +++ b/src/gui/interface/Engine.cpp @@ -18,6 +18,8 @@ Engine::Engine(): Scale(1), Fullscreen(false), FrameIndex(0), + altFullscreen(false), + resizable(false), lastBuffer(NULL), prevBuffers(stack()), windows(stack()), diff --git a/src/gui/interface/Engine.h b/src/gui/interface/Engine.h index 82701f799..c0731c75f 100644 --- a/src/gui/interface/Engine.h +++ b/src/gui/interface/Engine.h @@ -46,8 +46,12 @@ namespace ui void SetFullscreen(bool fullscreen) { Fullscreen = fullscreen; } inline bool GetFullscreen() { return Fullscreen; } + void SetAltFullscreen(bool altFullscreen) { this->altFullscreen = altFullscreen; } + inline bool GetAltFullscreen() { return altFullscreen; } void SetScale(int scale) { Scale = scale; } inline int GetScale() { return Scale; } + void SetResizable(bool resizable) { this->resizable = resizable; } + inline bool GetResizable() { return resizable; } void SetFastQuit(bool fastquit) { FastQuit = fastquit; } inline bool GetFastQuit() {return FastQuit; } @@ -80,6 +84,9 @@ namespace ui unsigned int FrameIndex; private: + bool altFullscreen; + bool resizable; + float dt; float fps; pixel * lastBuffer; diff --git a/src/gui/options/OptionsController.cpp b/src/gui/options/OptionsController.cpp index aeeae5a0f..e18141399 100644 --- a/src/gui/options/OptionsController.cpp +++ b/src/gui/options/OptionsController.cpp @@ -55,6 +55,11 @@ void OptionsController::SetFullscreen(bool fullscreen) model->SetFullscreen(fullscreen); } +void OptionsController::SetAltFullscreen(bool altFullscreen) +{ + model->SetAltFullscreen(altFullscreen); +} + void OptionsController::SetShowAvatars(bool showAvatars) { model->SetShowAvatars(showAvatars); @@ -65,6 +70,11 @@ void OptionsController::SetScale(int scale) model->SetScale(scale); } +void OptionsController::SetResizable(bool resizable) +{ + model->SetResizable(resizable); +} + void OptionsController::SetFastQuit(bool fastquit) { model->SetFastQuit(fastquit); diff --git a/src/gui/options/OptionsController.h b/src/gui/options/OptionsController.h index 71e2a1b6f..be070165a 100644 --- a/src/gui/options/OptionsController.h +++ b/src/gui/options/OptionsController.h @@ -25,7 +25,9 @@ public: void SetAirMode(int airMode); void SetEdgeMode(int edgeMode); void SetFullscreen(bool fullscreen); + void SetAltFullscreen(bool altFullscreen); void SetScale(int scale); + void SetResizable(bool resizable); void SetFastQuit(bool fastquit); void SetShowAvatars(bool showAvatars); void Exit(); diff --git a/src/gui/options/OptionsModel.cpp b/src/gui/options/OptionsModel.cpp index 1a22acc67..76f463505 100644 --- a/src/gui/options/OptionsModel.cpp +++ b/src/gui/options/OptionsModel.cpp @@ -102,6 +102,18 @@ void OptionsModel::SetScale(int scale) notifySettingsChanged(); } +bool OptionsModel::GetResizable() +{ + return ui::Engine::Ref().GetResizable(); +} + +void OptionsModel::SetResizable(bool resizable) +{ + ui::Engine::Ref().SetResizable(resizable); + Client::Ref().SetPref("Resizable", resizable); + notifySettingsChanged(); +} + bool OptionsModel::GetFullscreen() { return ui::Engine::Ref().GetFullscreen(); @@ -109,7 +121,19 @@ bool OptionsModel::GetFullscreen() void OptionsModel::SetFullscreen(bool fullscreen) { ui::Engine::Ref().SetFullscreen(fullscreen); - Client::Ref().SetPref("Fullscreen", bool(fullscreen)); + Client::Ref().SetPref("Fullscreen", fullscreen); + notifySettingsChanged(); +} + +bool OptionsModel::GetAltFullscreen() +{ + return ui::Engine::Ref().GetAltFullscreen(); +} + +void OptionsModel::SetAltFullscreen(bool altFullscreen) +{ + ui::Engine::Ref().SetAltFullscreen(altFullscreen); + Client::Ref().SetPref("AltFullscreen", altFullscreen); notifySettingsChanged(); } diff --git a/src/gui/options/OptionsModel.h b/src/gui/options/OptionsModel.h index ba1fa8487..3f68a6762 100644 --- a/src/gui/options/OptionsModel.h +++ b/src/gui/options/OptionsModel.h @@ -33,8 +33,12 @@ public: void SetGravityMode(int gravityMode); int GetScale(); void SetScale(int scale); + bool GetResizable(); + void SetResizable(bool resizable); bool GetFullscreen(); void SetFullscreen(bool fullscreen); + bool GetAltFullscreen(); + void SetAltFullscreen(bool oldFullscreen); bool GetFastQuit(); void SetFastQuit(bool fastquit); virtual ~OptionsModel(); diff --git a/src/gui/options/OptionsView.cpp b/src/gui/options/OptionsView.cpp index 8ffdbadc1..a83cd0eca 100644 --- a/src/gui/options/OptionsView.cpp +++ b/src/gui/options/OptionsView.cpp @@ -17,7 +17,7 @@ #include "gui/dialogues/ErrorMessage.h" OptionsView::OptionsView(): - ui::Window(ui::Point(-1, -1), ui::Point(300, 329)){ + ui::Window(ui::Point(-1, -1), ui::Point(300, 369)){ ui::Label * tempLabel = new ui::Label(ui::Point(4, 5), ui::Point(Size.X-8, 14), "Simulation Options"); tempLabel->SetTextColour(style::Colour::InformationTitle); @@ -173,6 +173,24 @@ OptionsView::OptionsView(): AddComponent(tempLabel); + class ResizableAction: public ui::CheckboxAction + { + OptionsView * v; + public: + ResizableAction(OptionsView * v_){ v = v_; } + virtual void ActionCallback(ui::Checkbox * sender) + { + v->c->SetResizable(sender->GetChecked()); + } + }; + + resizable = new ui::Checkbox(ui::Point(8, scale->Position.Y + 20), ui::Point(Size.X-6, 16), "Resizable", ""); + resizable->SetActionCallback(new ResizableAction(this)); + tempLabel = new ui::Label(ui::Point(resizable->Position.X+Graphics::textwidth(resizable->GetText().c_str())+20, resizable->Position.Y), ui::Point(Size.X-28, 16), "\bg- Allow resizing and maximizing window"); + tempLabel->Appearance.HorizontalAlign = ui::Appearance::AlignLeft; tempLabel->Appearance.VerticalAlign = ui::Appearance::AlignMiddle; + AddComponent(tempLabel); + AddComponent(resizable); + class FullscreenAction: public ui::CheckboxAction { OptionsView * v; @@ -184,13 +202,31 @@ OptionsView::OptionsView(): } }; - fullscreen = new ui::Checkbox(ui::Point(8, 230), ui::Point(Size.X-6, 16), "Fullscreen", ""); + fullscreen = new ui::Checkbox(ui::Point(8, resizable->Position.Y + 20), ui::Point(Size.X-6, 16), "Fullscreen", ""); fullscreen->SetActionCallback(new FullscreenAction(this)); tempLabel = new ui::Label(ui::Point(fullscreen->Position.X+Graphics::textwidth(fullscreen->GetText().c_str())+20, fullscreen->Position.Y), ui::Point(Size.X-28, 16), "\bg- Fill the entire screen"); tempLabel->Appearance.HorizontalAlign = ui::Appearance::AlignLeft; tempLabel->Appearance.VerticalAlign = ui::Appearance::AlignMiddle; AddComponent(tempLabel); AddComponent(fullscreen); + class AltFullscreenAction: public ui::CheckboxAction + { + OptionsView * v; + public: + AltFullscreenAction(OptionsView * v_){ v = v_; } + virtual void ActionCallback(ui::Checkbox * sender) + { + v->c->SetAltFullscreen(sender->GetChecked()); + } + }; + + altFullscreen = new ui::Checkbox(ui::Point(23, fullscreen->Position.Y + 20), ui::Point(Size.X-6, 16), "Change Resolution", ""); + altFullscreen->SetActionCallback(new AltFullscreenAction(this)); + tempLabel = new ui::Label(ui::Point(altFullscreen->Position.X+Graphics::textwidth(altFullscreen->GetText().c_str())+20, altFullscreen->Position.Y), ui::Point(Size.X-28, 16), "\bg- Set optimial screen resolution"); + tempLabel->Appearance.HorizontalAlign = ui::Appearance::AlignLeft; tempLabel->Appearance.VerticalAlign = ui::Appearance::AlignMiddle; + AddComponent(tempLabel); + AddComponent(altFullscreen); + class FastQuitAction: public ui::CheckboxAction { @@ -200,7 +236,7 @@ OptionsView::OptionsView(): virtual void ActionCallback(ui::Checkbox * sender){ v->c->SetFastQuit(sender->GetChecked()); } }; - fastquit = new ui::Checkbox(ui::Point(8, 250), ui::Point(Size.X-6, 16), "Fast Quit", ""); + fastquit = new ui::Checkbox(ui::Point(8, altFullscreen->Position.Y + 20), ui::Point(Size.X-6, 16), "Fast Quit", ""); fastquit->SetActionCallback(new FastQuitAction(this)); tempLabel = new ui::Label(ui::Point(fastquit->Position.X+Graphics::textwidth(fastquit->GetText().c_str())+20, fastquit->Position.Y), ui::Point(Size.X-28, 16), "\bg- Always exit completely when hitting close"); tempLabel->Appearance.HorizontalAlign = ui::Appearance::AlignLeft; tempLabel->Appearance.VerticalAlign = ui::Appearance::AlignMiddle; @@ -215,7 +251,7 @@ OptionsView::OptionsView(): virtual void ActionCallback(ui::Checkbox * sender){ v->c->SetShowAvatars(sender->GetChecked()); } }; - showAvatars = new ui::Checkbox(ui::Point(8, 270), ui::Point(Size.X-6, 16), "Show Avatars", ""); + showAvatars = new ui::Checkbox(ui::Point(8, fastquit->Position.Y + 20), ui::Point(Size.X-6, 16), "Show Avatars", ""); showAvatars->SetActionCallback(new ShowAvatarsAction(this)); tempLabel = new ui::Label(ui::Point(showAvatars->Position.X+Graphics::textwidth(showAvatars->GetText().c_str())+20, showAvatars->Position.Y), ui::Point(Size.X-28, 16), "\bg- Disable if you have a slow connection"); tempLabel->Appearance.HorizontalAlign = ui::Appearance::AlignLeft; tempLabel->Appearance.VerticalAlign = ui::Appearance::AlignMiddle; @@ -279,7 +315,9 @@ void OptionsView::NotifySettingsChanged(OptionsModel * sender) gravityMode->SetOption(sender->GetGravityMode()); edgeMode->SetOption(sender->GetEdgeMode()); scale->SetOption(sender->GetScale()); + resizable->SetChecked(sender->GetResizable()); fullscreen->SetChecked(sender->GetFullscreen()); + altFullscreen->SetChecked(sender->GetAltFullscreen()); fastquit->SetChecked(sender->GetFastQuit()); showAvatars->SetChecked(sender->GetShowAvatars()); } diff --git a/src/gui/options/OptionsView.h b/src/gui/options/OptionsView.h index 29c945c35..a41e15e2d 100644 --- a/src/gui/options/OptionsView.h +++ b/src/gui/options/OptionsView.h @@ -20,7 +20,9 @@ class OptionsView: public ui::Window { ui::DropDown * gravityMode; ui::DropDown * edgeMode; ui::DropDown * scale; + ui::Checkbox * resizable; ui::Checkbox * fullscreen; + ui::Checkbox * altFullscreen; ui::Checkbox * fastquit; ui::Checkbox * showAvatars; public: From 324602fe2600814044283659a8cc54178e755395 Mon Sep 17 00:00:00 2001 From: jacob1 Date: Sat, 26 May 2018 17:38:01 -0400 Subject: [PATCH 10/11] adjust for window border when loading window position too fixes window moving up every time on windows, on linux the border size gets reported as 0 so nothing changes there --- src/PowderToySDL.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/PowderToySDL.cpp b/src/PowderToySDL.cpp index a0031bfaf..dbd664455 100644 --- a/src/PowderToySDL.cpp +++ b/src/PowderToySDL.cpp @@ -84,7 +84,11 @@ void LoadWindowPosition() { int savedWindowX = Client::Ref().GetPrefInteger("WindowX", INT_MAX); int savedWindowY = Client::Ref().GetPrefInteger("WindowY", INT_MAX); - SDL_SetWindowPosition(sdl_window, savedWindowX, savedWindowY); + + int borderTop, borderLeft; + SDL_GetWindowBordersSize(sdl_window, &borderTop, &borderLeft, nullptr, nullptr); + + SDL_SetWindowPosition(sdl_window, savedWindowX + borderLeft, savedWindowY + borderTop); } void SaveWindowPosition() From 40d836106f3b886a17bcf363582573eb55f4ef38 Mon Sep 17 00:00:00 2001 From: jacob1 Date: Sat, 26 May 2018 19:03:55 -0400 Subject: [PATCH 11/11] update libraries required for static sdl2 compile --- SConscript | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/SConscript b/SConscript index e2f74233c..43ca0d26f 100644 --- a/SConscript +++ b/SConscript @@ -231,7 +231,7 @@ def findLibs(env, conf): if msvc: libChecks = ['shell32', 'wsock32', 'user32', 'Advapi32', 'ws2_32'] if GetOption('static'): - libChecks += ['libcmt', 'dxguid'] + libChecks += ['imm32', 'version', 'Ole32', 'OleAut32'] for i in libChecks: if not conf.CheckLib(i): FatalError("Error: some windows libraries not found or not installed, make sure your compiler is set up correctly") @@ -239,8 +239,8 @@ def findLibs(env, conf): if not conf.CheckLib('mingw32') or not conf.CheckLib('ws2_32'): FatalError("Error: some windows libraries not found or not installed, make sure your compiler is set up correctly") - if not GetOption('renderer') and not conf.CheckLib('SDLmain'): - FatalError("libSDLmain not found or not installed") + if not GetOption('renderer') and not conf.CheckLib('SDL2main'): + FatalError("libSDL2main not found or not installed") #Look for SDL runSdlConfig = platform == "Linux" or compilePlatform == "Linux" or platform == "FreeBSD"