1269 Commits

Author SHA1 Message Date
Yves Rizoud
730903251c Fix issue 384: Imprecise palette sliders when RGB scale is lower than 256 (but bigger than 3)
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1606 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2010-09-06 23:33:50 +00:00
Yves Rizoud
25f8942641 Cycling colors: increased max speed from 64 to 105, because I found old LBM file that uses this speed
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1605 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2010-09-04 14:59:33 +00:00
Yves Rizoud
4ac5d47ac8 Lua: fix a stray mouse cursor (hourglass shape) that gets drawn over menu. Richard, that's your small freak gfx-bug from 13 August
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1604 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2010-09-02 22:52:16 +00:00
Yves Rizoud
cf8af1902c In /rgb 3 mode: If skin colors are compatible with /rgb 3, they are the ideal colors for matching, and those you add when loading low-color images or typing 'Backspace' in Palette. Otherwise the ideal color set is hard-coded black/dark_blue/grey/white
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1603 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2010-09-02 00:39:43 +00:00
Yves Rizoud
a61bb9893c Gradient menu: palette now resets when you release speed slider, this fixes bad menu colors when they are in the shift. Lua: messagebox() and inputbox() now recompute menu colors before opening, this fixes bad menu colors if the script had altered the palette earlier.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1602 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2010-09-02 00:06:57 +00:00
Yves Rizoud
9f47e427c7 Fix horrible crash with GIF-saving
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1601 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2010-09-01 00:06:48 +00:00
Yves Rizoud
962d23dbc4 The gradients (Cycling or not) are now per-picture, so: The main and spare page have separate gradients; Loading a picture resets the gradients and loads the new image's (if any); Undo and Redo correctly navigate to the right gradients when you Undo/Redo Loading different color-cycling images.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1600 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2010-08-31 23:48:10 +00:00
Yves Rizoud
838dd63a0c GIF format loads and saves color cycling data
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1599 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2010-08-31 22:30:04 +00:00
Yves Rizoud
97060bc146 Improved Gradation menu for cycling colors, including a horizontal scrollbar. Added helpfile.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1598 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2010-08-29 23:56:42 +00:00
Yves Rizoud
d78c33855b Drag-n-drop file in Grafx2 window is now cleanly prevented while a window is open: The OS's mouse cursor is the 'forbidden' sign. Preparatory work for horizontal slider controls.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1597 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2010-08-29 19:21:33 +00:00
Yves Rizoud
9e20dd71fd Fix icon 'unslected layer 6' in DPaint skin
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1596 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2010-08-29 18:33:09 +00:00
Yves Rizoud
05e05d0d75 Keyboard shortcut for enabling/disabling color cycle.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1595 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2010-08-29 18:11:16 +00:00
Yves Rizoud
a5b5fa69e8 Fix window displacement (window didn't redraw when you released mouse button, only if you additionally moved mouse)
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1594 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2010-08-28 18:01:21 +00:00
Yves Rizoud
38be354d7b Fix issue with previous commit : crash when previewing pictures with non-square pixels
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1593 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2010-08-25 19:40:52 +00:00
Yves Rizoud
236a026137 File selector: display preview no longer changes GUI colors when the image uses less than 253 colors. Fixes many cases of issue 215, and generally allows much smoother browsing.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1592 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2010-08-25 18:55:48 +00:00
Yves Rizoud
fc42854490 Even more work on GUI color auto-detection. Now additionally tries to find a specific color scheme for CPC palettes (pale green and grey), if the skin's colors can't be accurately represented in /rgb 3.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1591 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2010-08-24 22:29:48 +00:00
Yves Rizoud
03a813baec More work on auto-detcting GUI colors. Fixes the cases like the 16-color ramp black->yellow reported by DawnBringer. Seems to work better with many 4-color cpc palettes
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1590 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2010-08-24 18:27:39 +00:00
Adrien Destugues
cf417c9bb9 Enable lua string library (int to string, string to int and some other useful things)
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1588 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2010-08-22 20:26:30 +00:00
Adrien Destugues
fef8aec302 Put a visible error message in case of SDL_Image fail.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1587 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2010-08-22 18:26:12 +00:00
Adrien Destugues
0631f57399 Enable lua scripting on Haiku.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1586 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2010-08-22 18:02:31 +00:00
Adrien Destugues
b0bf727997 Set native end-of-line encoding on all txt files we package in distributions.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1585 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2010-08-22 16:48:58 +00:00
Yves Rizoud
3ed9d0d652 Improve auto-detection of menu colors when using very small palettes
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1584 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2010-08-22 16:48:19 +00:00
Adrien Destugues
7efbe04c6a Don't lose the filename when changing extension.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1583 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2010-08-22 16:39:20 +00:00
Adrien Destugues
715ddad331 iBrush rotation now snap cursor in an useful way (to fixed angles)
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1582 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2010-08-22 16:02:17 +00:00
Yves Rizoud
520da7d168 Reverted the change of input system (mostly, still needs more testing) Changed color cycling so it no longer needs a separate thread.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1581 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2010-08-19 00:33:06 +00:00
Yves Rizoud
858bab41c4 Drag-and-drop file: Question 'Discard unsaved changes' now works
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1580 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2010-08-17 17:22:46 +00:00
Yves Rizoud
190cfe1315 Mouse wheel now works on Gradients menu
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1579 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2010-08-17 17:18:31 +00:00
Adrien Destugues
27f4033076 Try gain again to fix the makefile for lua detection.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1578 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2010-08-17 12:40:59 +00:00
Yves Rizoud
917dbc206b Fix in skin 'Modern', vertical palette arrows where horizontal
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1577 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2010-08-15 19:24:29 +00:00
Yves Rizoud
c581b3c5a6 Fix lack of history step in 'Copy to spare - palette and remap'
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1576 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2010-08-15 19:07:19 +00:00
Yves Rizoud
1cad25e4b5 Reverted r1477: 'Faster translucency effect when perfect matches are available'. When duplicates were available in the palette, it wasn't choosing always the same
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1575 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2010-08-15 18:34:25 +00:00
Yves Rizoud
c474208860 Color cycling: saved in ILBM format.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1574 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2010-08-15 14:47:37 +00:00
Yves Rizoud
4ea23b3e9a Color cycling based on the ranges in Grad menu. A speed slider has appeared. The speed data (and all cycling) is loaded from IFF/ILBM images from Deluxe Paint, Amiga and DOS versions. The data is not saved at the moment, so you shouldn't re-save cycling images
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1573 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2010-08-14 23:23:10 +00:00
Yves Rizoud
1c2ab9aa99 ILBM format : Cycling color ranges are loaded (unused so far)
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1572 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2010-08-14 19:03:55 +00:00
Yves Rizoud
bd20d85cc9 Fix confirmation box when dragging a file on unsaved image.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1571 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2010-08-13 19:45:25 +00:00
Yves Rizoud
c83cd8c339 Drag and drop files: more stable. Unfinished
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1570 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2010-08-12 20:08:36 +00:00
Yves Rizoud
cd39485232 Critical fix for Airbrush, to prevent it from spiraling to death when airbrushing time-consuming brushes : Event queue would fill with 'tick' events, mouse button release wouldn't be caught, more airbrushing , more cpu cost, deadlock
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1569 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2010-08-11 00:23:56 +00:00
Yves Rizoud
25796b9188 More work on SDL events. Also fixed an issue (very old?) where Grafx2 didn't accurately follow mouse movements when it's very busy, ie when using Continuous Freehand with a large brush or transparency. Now, as long as the setting Merge mouse is zero, all intermediate mouse positions are correctly buffered and played back. From my testing, up to 7 seconds will be memorized.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1568 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2010-08-11 00:07:55 +00:00
Yves Rizoud
e4d6dcbcbe Fixed sliders and repeatable buttons, for the change of timing method.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1567 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2010-08-09 22:56:06 +00:00
Adrien Destugues
84e81bbb3f * Try again to fix (or rather work around) pkg-config lua detection.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1566 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2010-08-09 09:30:06 +00:00
Yves Rizoud
951ec2d48a Still work on SDL events. Airbrush seems to work. Need to do repeatable buttons.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1565 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2010-08-08 19:59:17 +00:00
Yves Rizoud
80b8c4e5a5 Palette: moved color# to the 'Reduce' dropdown, which allows nicer names for buttons 'Used' and 'Histo' (I hesitated to name it 'Stats', in case expand this screen)
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1564 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2010-08-08 02:30:00 +00:00
Yves Rizoud
684034c687 Histogram: Shows pixel count, and selects the clicked color.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1563 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2010-08-08 02:17:21 +00:00
Yves Rizoud
b7a083ee92 GUI colors: When all of a skin's preferred colors are available, Grafx2 picks them. This overrides the new algorithm of r1550
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1562 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2010-08-07 19:43:42 +00:00
Yves Rizoud
032f0995a7 Fix in Transparency setting, cursor around 'Alpha' never disappeared.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1561 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2010-08-07 19:23:55 +00:00
Yves Rizoud
68dbb7ad74 Forgot the skins in previous commit.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1560 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2010-08-06 22:45:12 +00:00
Yves Rizoud
c9a917aa85 Fix some compilation warnings (mix code and declarations, breaks on gcc2). Fileselector: Fix the names of drives, which was one character too long, overwriting the scrollbar. Reworked the drive icons for black background (all skins)
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1559 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2010-08-06 22:37:39 +00:00
Adrien Destugues
e0d21e2a89 * Relive the drive icons in the file selector.
They are drawn in the filelist so likely they shoud have a black background in the skins.

git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1558 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2010-08-06 18:12:49 +00:00
Adrien Destugues
42f401b061 * proof of concept (untesterd) for tiles
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1557 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2010-08-06 16:37:41 +00:00
Adrien Destugues
5ee0b4943f * Use SDL_WaitEvent instead of SDL_PollEvent.
* To avoid the program getting 'locked' when there is no user input (sliders, colorspray), we use a timer that queues events to make grafX2 act (and refresh the screen)

TODO :
 * To reduce cpu usage when idle even more, start the timer only when it's needed (colorspray is drawing, or a scrollbar is scrolling)
 * For now everyone uses the same timer, so the same delay. This means there is no fast-scroll and slow-scroll for sliders. Starting the timer with a different speed in each case would solve that
 * The event handling for sliders will currently react to any mouse event. Thismeans the slider will move faster if you slightly move the mouse while keeping in the button. Not what wewant, so weshoud all a timer_expired global and the slider should wait for that (and reset it when acknowledged).

git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1556 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2010-08-06 15:40:01 +00:00