1040 Commits

Author SHA1 Message Date
Yves Rizoud
5e38c68a6f Makefile fix: package the Lua scripts by default
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1359 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2010-02-21 18:41:16 +00:00
Yves Rizoud
5d213a11fa Lua: New clearpicture command
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1358 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2010-02-21 18:15:15 +00:00
Yves Rizoud
8c2655f88a Lua: finished inputbox with negative and decimal inputs. Added to the repository more than 20(!) new scripts by DawnBringer
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1357 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2010-02-21 17:58:20 +00:00
Yves Rizoud
b393482c58 Lua: fix crash when a string argument is missing or an array instead. Implemented universal error messages and checks for function arguments
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1356 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2010-02-20 01:33:22 +00:00
Yves Rizoud
14464fef39 Lua inputbox: Allow negative values and floating point input. Unfinished, has problems of display (mouse cursor cleaning, display cleaning and alignment, removing redundant digits like in 15.000)
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1354 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2010-02-19 02:09:50 +00:00
Adrien Destugues
f05906f99b Open lua base lib to allow use of require() and dofile().
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1353 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2010-02-17 18:34:14 +00:00
Adrien Destugues
7fe8d44805 Fix all remaining warnings in gp2x build. The compiler is a bit more picky about the includes and feature macros.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1352 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2010-02-16 13:31:29 +00:00
Adrien Destugues
13865a0ade Fix build on gp2x.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1351 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2010-02-16 12:56:24 +00:00
Yves Rizoud
4219ca839d The 'Clear' function now clears with Transparent color instead of hard-coded 0. Outside edges of images are also drawn with this color. Reduced max layers to 16, for consistency with UI. Added help screens for Layer menu and Brush factory.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1349 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2010-02-14 04:50:23 +00:00
Yves Rizoud
d5353b378d Lua window: shortcut 'return' runs highlighted script, and the script selector remembers which filename was highlighted (during current session)
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1348 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2010-02-14 03:10:55 +00:00
Yves Rizoud
aa316b066e Reverted r1300 about Polygon overdraw and effects feedback (issue 131). The non-straight polygon lines was bigger problem than the specific case I raised.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1347 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2010-02-14 02:13:23 +00:00
Yves Rizoud
25e8943e4c Fix an hourglass cursor when loading a file from command-line (recent bug). Fix issue 307: Drop-opened files do not retain name in Save-as dialog.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1346 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2010-02-14 01:39:56 +00:00
Yves Rizoud
76887dd84d cleaner deletion of lock file
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1345 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2010-02-14 01:13:14 +00:00
Yves Rizoud
35121c58a8 Fixes on Debian Linux for the 'file locking'. Tested ok
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1344 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2010-02-14 01:07:05 +00:00
Yves Rizoud
4c3a0b6f68 Grafx2 now disables safety backups (and warns the user on startup) if another instance is running or if its configuration directory is read-only. Implemented separately on Linux and Windows, tested only on Windows
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1343 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2010-02-14 00:28:42 +00:00
Yves Rizoud
7076e8e06d Eliminated a lot of tab characters in source code
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1342 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2010-02-13 19:25:49 +00:00
Yves Rizoud
480c9abaab Eliminated some tab characters in source code
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1341 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2010-02-13 19:05:16 +00:00
Yves Rizoud
917847cdab Lua: added a message box. messagebox('message'), or messagebox('caption','message'). note that Lua supports concatenation (operator ..) and this function accepts backslash-n for carriage return. It performs word-wrapping if needed. Fixed the Hourglass cursor showing up in some error boxes, instead of the arrow cursor.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1340 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2010-02-13 19:00:13 +00:00
Yves Rizoud
683f8c6a18 Undo of test for Lua messages
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1339 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2010-02-13 18:31:58 +00:00
Yves Rizoud
f64117aeda Fix display in message boxes when very long messages happened (normally only with Lua messages)
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1338 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2010-02-13 18:23:13 +00:00
Yves Rizoud
87432470f3 Fix a crash in 'Copy to spare:Palette' when both images have different height. Fix Lua which didin't report useful message when an error was detected.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1337 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2010-02-13 14:54:19 +00:00
Yves Rizoud
05d6d546a3 More Lua functions: GetForeColor, GetBackColor, GetTransColor (layer translucency), and to read data from spare page: GetSparePictureSize, GetSpareColor (spare's palette), GetSpareTransColor, GetSpareLayerPixel (pixel from 'current layer' only of spare), GetSparePicturePixel (pixel from 'all visible layers' of spare)
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1336 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2010-02-12 02:57:00 +00:00
Yves Rizoud
25097afafd Lua: added a command that creates an input box with variable arguments (inputbox), up to 9 values can be input. Fix a cursor issue when opening brush factory.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1334 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2010-02-12 01:52:18 +00:00
Yves Rizoud
65f19eeec9 Text tool with bitmap fonts now uses the background color instead of color 0. It was not possible to draw text with a black font if black was color 0.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1333 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2010-02-09 21:53:43 +00:00
Yves Rizoud
4f73c24989 Added Layer menu. Issue 263 and issue 110: Added background transparency, for GIF and PNG formats (tested OK in Load, Save, and preview
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1332 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2010-02-09 20:04:56 +00:00
Yves Rizoud
7bccc7dda2 Make future toolbars visible by default
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1330 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2010-02-08 23:16:12 +00:00
Yves Rizoud
1f672681bc Stencil mode now 'reads' from only the current layer, instead of all visible layers.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1328 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2010-02-08 19:22:26 +00:00
Yves Rizoud
6f08d59f01 Layer toolbar visible by default. Grafx2 now records which toolbars are visible on exit, and restores them next time.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1327 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2010-02-08 18:58:42 +00:00
Yves Rizoud
b0a700850f Lua factory: More room for file names (34 chars instead of 18), and a preview of the script's first lines of comments.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1326 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2010-02-07 20:13:54 +00:00
Yves Rizoud
df2a0ec4dd Source-only: displaced and documented a function prototype
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1324 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2010-02-07 17:13:41 +00:00
Adrien Destugues
b928aa306a oops.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1323 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2010-02-07 11:45:05 +00:00
Adrien Destugues
056ce73ee9 Some user-contributed patches to cleanup the build and remove warnings.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1322 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2010-02-07 11:44:38 +00:00
Yves Rizoud
571cf70b58 Hide button: inverted right and left clicks. Fixed credits. Lua: arguments of MatchColor and SetColor are now automatically clamped on 0 and 255 when they are too small or too big, instead of wrapping.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1321 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2010-02-05 01:27:00 +00:00
Adrien Destugues
06a5bafd32 Added some long forgotten bugfinders... sorry guys !
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1320 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2010-02-04 09:49:13 +00:00
Yves Rizoud
bc96d0f0f0 Added Dawnbringer to credits (bugfinders section)
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1318 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2010-02-04 01:21:11 +00:00
Yves Rizoud
5678f0712d Fix issue 310:Lua's 'getbackuppixel' that returns wrong data, and Picture Scroll that shows garbage; both after Load/Reload/Resize.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1317 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2010-02-04 01:07:42 +00:00
Adrien Destugues
de2096c711 -Update nitrofuranoo's script to render palette so it sets the picture size
-Complete the palette repository with nitrofurano's palettes
-Move the palette files so they have cleaner names


git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1304 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2010-02-03 20:01:24 +00:00
Adrien Destugues
84ccd7f845 Fixed polygon and polyform overdrawing the first point in an approximate way.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1300 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2010-02-03 18:27:04 +00:00
Adrien Destugues
4c40a0a99a Fix backup not being deleted on exit.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1299 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2010-02-03 18:07:15 +00:00
Yves Rizoud
e96be96ce1 Magnifier: Both views positions are preserved on switching to Spare and back. Changing zoom with dropdown menu doesn't accidentally zoom on mouse
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1298 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2010-02-02 19:40:51 +00:00
Adrien Destugues
051f5e60cf Missed this one in my mailbox.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1297 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2010-02-02 16:19:40 +00:00
Adrien Destugues
46ed0b5718 Script contest entries.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1296 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2010-02-02 16:14:46 +00:00
Yves Rizoud
47f8f8ffc4 Improved zoom-on-mouse: when changing zoom factor, the pixel under mouse cursor, either in normal or magnified view, stays 'stuck' under it, and both views re-center accordingly. Only limits are the scrolling constraints of Grafx2: The zoomed view must always be part of the non-zoomed view, it's not allowed to see above and left of picture limits, and it auto-scrolls left or top when you go near the right or bottom limit (show more pixels)
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1295 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2010-02-02 01:06:14 +00:00
Yves Rizoud
0125c15209 Eliminated some alien tab characters in source file windows.c
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1294 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2010-02-01 23:17:51 +00:00
Adrien Destugues
59f2c45c43 Fixed stupid bug making the zoom drift to bottom right corner of the picture.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1292 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2010-02-01 19:31:32 +00:00
Yves Rizoud
56785bd94e Lua: Added GetBackupColor, to read RGB values from the original palette (Useful if your script modifies the palette then reads pixels from backup)
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1290 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2010-01-31 16:09:40 +00:00
Yves Rizoud
fa15037a42 Lua: GetBrushBackupPixel now works (Had forgotten to make initial copy :-/ )
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1289 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2010-01-29 02:20:45 +00:00
Yves Rizoud
bfbefeff82 Lua changes: Safety in all functions. Invalid arguments raise an error message and halt script (ex: Resize screen or brush with size < 1) or is silently ignored (drawing outside limits does nothing, reading outside limit reports transparent color). Fixed: SetColor. New: GetBrushTransparentColor, GetBrushBackupPixel. Removed: BrushEnabled (autodetected when needed)
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1287 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2010-01-29 01:47:09 +00:00
Yves Rizoud
62cc506737 Fix Fill, Polyform/Polyline, and Contour fill when using effects (Transparency) with layers: it was reading from all visible layers instead of only current, so the result kind of 'fused' the pixels. Related to issue 245.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1286 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2010-01-28 02:48:56 +00:00
Yves Rizoud
259a3d3338 Lua scripts: Add missing screen update. GetPicturePixel now reads from 'all visible layers'. New GetLayerPixel. Hourglass cursor while script is running.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1285 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2010-01-27 20:44:32 +00:00