103 Commits

Author SHA1 Message Date
Thomas Bernard
b706566f57 WIN32: get Unicode filename of Dropped files 2018-12-18 17:52:28 +01:00
Thomas Bernard
9f26e372ba
prevent sliders to be displayed out of their range 2018-12-15 16:50:43 +01:00
Thomas Bernard
cdcb4e93da
remove C64_FLI_enforcer() for good 2018-12-11 12:31:07 +01:00
Thomas Bernard
84068c5516
change C64_FLI() to use T_IO_Context 2018-12-11 12:25:39 +01:00
Thomas Bernard
387b4c33f9 fix Open_popup() once again. This time its OK when Menu_factor_Y != 1 2018-12-08 18:20:40 +01:00
Thomas Bernard
811ae20534
layers.c: button functions receive button number as first argument
also minor improvements
2018-11-28 13:01:01 +01:00
Thomas Bernard
5e4d2f5700
Open_popup(): fix dropdown outside of the screen (again)
in commit 6e6f8ca3f404d0868abd32ba2a154f3f3f18a839
I forgot about Menu_factor_Y !

I'm also improving Doxygen here.
2018-11-10 22:44:02 +01:00
Thomas Bernard
21d40948b2
Open_window() : limit to 320x200 2018-11-10 19:20:10 +01:00
Thomas Bernard
0c6add67f5
Open_window(): Fix crash when trying to open window larger than screen
it resulted in negative window position...
2018-11-10 17:20:52 +01:00
Thomas Bernard
970b9a179c fix for building with MS Visual C++ 2010
snprintf should be defined to _snprintf on this compiler
2018-11-09 12:50:40 +01:00
Thomas Bernard
afe65bfb92
use snprintf() in Get_color_behind_window() and Status_print_palette_color() 2018-11-06 17:39:02 +01:00
Thomas Bernard
4978a7cfe2 convert Warning() and DEBUG() to GFX2_Log() 2018-07-12 20:41:49 +02:00
Thomas Bernard
3e4f3d0313 WIP. build under Win32 without SDL 2018-07-02 11:38:51 +02:00
Thomas Bernard
4d86b8a0c1 change all references to SDLK_xxxxx to KEY_xxxx
+ some fixes
2018-07-02 11:38:51 +02:00
Thomas Bernard
77005eb780 use screen.h instead of sdlscreen.h, etc.
Create grafx2-win32 MSVC++ project
create keycode.h
various fixes
2018-07-02 11:38:51 +02:00
Thomas Bernard
fb51c1bb1c SDL_GetTicks() => GFX2_GetTicks()
Signed-off-by: Thomas Bernard <miniupnp@free.fr>
2018-07-02 11:38:51 +02:00
Thomas Bernard
92facef46d Convert comments to UTF-8
most were encoded in Latin1 / CP1252
but a few lines in op_c.c were using IBM437/850 !
2018-06-26 11:37:19 +02:00
Nic Soudée
a01e7eea69 Implement shortcut/underscore for input button 2018-06-24 15:25:26 +00:00
Philip Linde
b8dbbf77fe Disallow panning mid-operation
This fixes issue #78
2018-06-03 21:03:59 +00:00
Philip Linde
b91cfe4ed3 Call Button_Quit and Button_Page with correct enum
These functions are called explicitly in a few places and need to be
handed the corresponding enum value to correctly get the button value.
Since they were previously called with -1, they would cause segfaults.
These seemed to happen when restoring backups or loading images to both
pages.
2018-06-03 20:03:34 +00:00
Thomas Bernard
30f23b93ef Massive change of button callback function prototypes 2018-03-10 00:46:11 +01:00
Thomas Bernard
f2d579695c implements selection of circle/ellipse mode with right button
see http://pulkomandy.tk/projects/GrafX2/ticket/54
2018-03-10 00:46:11 +01:00
Thomas Bernard
6e6f8ca3f4 Open_popup() fix dropdown outside of the screen 2018-02-20 15:45:45 +01:00
Thomas Bernard
d79f25c0be rename Remap_UI_window_backgrounds() to Remap_UI_in_window_backgrounds() 2018-01-26 16:13:03 +01:00
Thomas Bernard
48ae5bf0d8 Correctly remap backgrounds buffers of windows 2018-01-25 22:55:27 +01:00
Thomas Bernard
9fafd0173f minor Restore_background() improvement 2018-01-25 22:55:27 +01:00
Thomas Bernard
ccf3e6a77f Change Load_picture() prototype to allow loading of palette
the change matches what is done with Save_picture()
2018-01-25 22:55:27 +01:00
Thomas Bernard
92620bb4ba merge Upload_infos_page_main() / Upload_infos_page_spare() => Upload_infos_page() 2018-01-22 20:34:29 +01:00
Thomas Bernard
a53d6da6ea Add visible_image and backups to the T_Document structure 2018-01-22 16:16:39 +01:00
Thomas Bernard
8ae651c75f put common fields for Main and Spare page in a T_Document structure 2018-01-22 14:46:44 +01:00
Thomas Bernard
753aaf3422 Add Fast Zoom In & Out functions.
Shift +/-  or  Shift Mouse Wheel

http://pulkomandy.tk/projects/GrafX2/ticket/28
2018-01-12 10:33:19 +01:00
Adrien Destugues
11fa950ea7 Layer preview: add a 1px border around the previews.
Make it easier to tell the layers apart.


git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@2116 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2015-03-07 09:33:34 +00:00
Adrien Destugues
fa80a10093 Implement "save palette" button
* Actually a shortcut to "save picture" with preset PAL format and different window title.


git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@2110 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2015-03-04 10:08:34 +00:00
Adrien Destugues
810c457483 Change look of window title bars.
* Now they have a white background.


git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@2105 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2015-03-03 14:09:12 +00:00
Adrien Destugues
78fcc648c3 Partial merge of the SDL2 branch into trunk
* Mainly get the cleanup of window drawing functions.


git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@2102 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2015-03-02 13:44:18 +00:00
Yves Rizoud
24433a104c Lua: Added beginning of a Gui toolkit: windowopen, windowclose, windowdodialog, windowbutton, windowrepeatbutton, windowprint, windowinput, windowreadline. The latter two are unfinished and subject to change
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@2053 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2013-02-07 00:56:01 +00:00
Yves Rizoud
1efe6ec5be Fix issue 460: brush 180° rotation. Also, the keyboard shortcut had no effect at all
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@2008 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2012-09-25 22:05:32 +00:00
Yves Rizoud
fdedfd628b Fix an incomplete screen update when you click the top of a button (pressed state), was only visible on toolbar Anim (when menu ratio is x2 or x3) or layers/status (when menu ratio is x3).
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1996 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2012-09-18 21:04:55 +00:00
mazzearos
d28a1df60b Renamed Find_last_slash() to Find_last_separator() to make purpose more clear.
Append_path():
- when adding sub directories: don't add a "/" when last separator is a ":".
- when climbing upwards: don't remove the ":" it it's the last separator.

Those fixes help the file selector for scripts on AROS.


git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1979 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2012-08-05 08:51:16 +00:00
Yves Rizoud
c87fa6ede7 Fix a graphical mouse bug that happened when toolbar was hidden and you moved the mouse from layer button to image. Fix layer preview that disappeared when you clicked on layer button
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1959 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2012-05-14 14:05:12 +00:00
Adrien Destugues
235f7d4d1c Just fix some warnings for Haiku as well.
One of them was a missing prototype, the other was likely some strangeness in the definition of size_t.


git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1953 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2012-05-12 11:48:39 +00:00
Yves Rizoud
d8bb1e1d55 Fix some mostly harmless warnings and re-generated dependencies. Now compiles with zero warnings on Linux (gcc 4.1.2)
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1945 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2012-05-03 21:32:59 +00:00
Yves Rizoud
020e57846b Layer preview now only appears if there's at least 2 layers. Fixed the preview not reappearing after using a keyboard shortcut (ex: scrolling with arrow keys)
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1942 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2012-04-07 19:31:20 +00:00
Yves Rizoud
a137e063f0 Fix a crash that happened in Palette screen when right-clicking near top of screen: it opened the 'Copy/Paste' dropdown outside of screen edge. Now this dropdown menu only appears when you click in the palette area
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1938 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2012-03-25 14:44:29 +00:00
Yves Rizoud
2e5b97eb41 More fixes on layer preview. Layer buttons now activate on click instead of release.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1937 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2012-03-25 14:23:50 +00:00
Yves Rizoud
cd5b3346b0 More adjustments of layer preview : images less wide than a layer button are not zoomed more than normal size, and a max height is applied (Screen_height/4)
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1936 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2012-03-24 19:50:06 +00:00
Yves Rizoud
c6479d22f6 Layer pop-up preview now has higher resolution (bypasses pixel ratio and menu zoom)
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1935 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2012-03-24 18:55:49 +00:00
Yves Rizoud
99ce514ce8 Fix a case where the image could be in layer mode while the anim toolbar is visible. Note that from now on, if main and spare are single-image, changing the type of one will not change the type of the other.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1934 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2012-03-15 19:51:19 +00:00
Yves Rizoud
30e8079236 Fix crash when using Magnifier shortcut while the mouse is on a layer button (issue 480)
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1932 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2012-03-13 19:55:51 +00:00
Yves Rizoud
145c9545e7 Fix the 'FX' button that didn't refresh its state when swapping pages between an image with Tilemap ON (button should be highlighted) and an image with Tilemap OFF (button not highlighted)
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1928 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2012-03-11 16:50:28 +00:00