Thomas Bernard
6a01368242
Fix L_SetPictureSize()
...
just call Upload_infos_page() just before calling Backup_with_new_dimensions()
fixes http://pulkomandy.tk/projects/GrafX2/ticket/37
2018-12-18 15:45:38 +01:00
Thomas Bernard
7e3e39a753
enum FSOBJECT_TYPE for object type : File / Directory / Drive
2018-12-09 00:09:01 +01:00
Thomas Bernard
307912681c
Lua: detect that the layer has changed and update layer buttons
...
fixes bug #42
http://pulkomandy.tk/projects/GrafX2/ticket/42
2018-12-08 18:22:20 +01:00
Thomas Bernard
12050cd068
update Find_file_in_fileselector() to return -1 when not found
2018-09-15 11:11:48 +02:00
Thomas Bernard
2d46fbc4d6
factory.c: include <stdlib.h> for atof()
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
Nic Soudée
a01e7eea69
Implement shortcut/underscore for input button
2018-06-24 15:25:26 +00:00
Thomas Bernard
d6ce86cae4
Remove Circle_limit global variable
2018-03-10 00:46:11 +01:00
Thomas Bernard
ce1b55be03
graph.c: Pixel_figure is not a global var anymore
2018-03-10 00:46:11 +01:00
Thomas Bernard
b6c3852aad
Display unicode names in script factory as well
...
So in windows the long filename is shown instead of the short filename
2018-02-23 18:46:28 +01:00
Thomas Bernard
db39392411
Update MSVC project to compile with lua
...
minor changes to remove need for C features unsupported by MS Visual C
2018-02-23 18:46:22 +01:00
Thomas Bernard
9a03a54fef
Display the current directory in unicode
...
rename function Print_in_window_utf16() to Print_in_window_unicode()
2018-02-20 15:44:39 +01:00
Thomas Bernard
a1f0f36062
chdir() => Change_directory()
...
improve portability
2018-02-20 15:44:39 +01:00
Thomas Bernard
62944c724e
getcwd() => Get_current_directory()
2018-02-20 15:44:39 +01:00
Thomas Bernard
cb936b24e7
Update For_each_directory_entry() for more args in callback
2018-02-20 15:44:39 +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
Adrien Destugues
5b6095f0bc
Fix all warnings and enable -Werror
...
mostly unused variables and broken indentation.
2017-05-06 15:13:50 +02:00
Adrien Destugues
0ce386bb19
Add a way to query the layer count and spare layers functions.
...
Fixes #43
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@2171 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2016-11-28 21:29:06 +00:00
Yves Rizoud
67d3636512
Fix Lua function matchcolor2() inaccuracies caused by integer arithmetics
...
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@2082 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2015-02-15 22:20:47 +00:00
Yves Rizoud
65eb4a54eb
Lua bindings for sliders (not in GUI library yet)
...
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@2057 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2013-02-12 00:48:56 +00:00
Yves Rizoud
495245b17d
Lua: gui library supports textboxes, for numbers or strings.
...
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@2056 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2013-02-10 20:14:08 +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
37007e7a7b
Lua: Running a script no longer systematically take an history step ('Undo/Redo'). This backup is now only performed on the first time that an image-modifying function is called, and only on layers/frames that need it. Also fix up selectlayer() a little.
...
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@2052 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2013-02-07 00:13:11 +00:00
Yves Rizoud
e87f9140c7
Fix issue 516: Some changes can't be undone on animations > 32 frames
...
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@2033 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2012-10-16 00:07:42 +00:00
Yves Rizoud
eb882524cd
Brush factory: display current path on top
...
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@2019 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2012-09-29 15:00:12 +00:00
Adrien Destugues
76222af12a
* Brush factory: Drive entries in fileselector don't have an icon on some platforms
...
* File selector: remove BeOS quirk for getting home directory (the OS was fixed), and try to guess the drive type for UNIX OSes (untested)
Fixes #492 .
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@2015 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2012-09-28 18:19:31 +00:00
Yves Rizoud
f7d9cc1a90
Fixes support of Lua 5.0 and 5.1, and a compilation warning on Linux
...
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@2005 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2012-09-22 17:51:37 +00:00
Yves Rizoud
2e16f0bec3
Lua version now displayed in stats. Now using Lua 5.2 on Windows. Add modified gfx2def.ini, forgotten in previous revision
...
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@2000 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2012-09-19 21:09:07 +00:00
Yves Rizoud
b31cf6b61e
Lua inputbox() : Fix an issue with label lines: putting a label at line N was disabling the Nth control button on the screen.
...
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1997 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2012-09-18 21:53:41 +00:00
Yves Rizoud
3ae0ff5edf
Lua inputbox: support for labels. Labels are defined with min=max=0
...
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1992 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2012-08-24 13:46:42 +00:00
Yves Rizoud
5d69b71cf9
Issue 501: Lua function run() now converts Unix 'parent directory' to AROS format. To be tested/reviewed on the actual platform! Function also converts antislashes to slashes on all platforms.
...
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1991 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2012-08-15 17:15:49 +00:00
Yves Rizoud
f507cb7bcb
Fix error handling in Lua function run(). Made the samples use run() instead of dofile()
...
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1989 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2012-08-11 22:06:11 +00:00
Yves Rizoud
b1f6a0329b
Issue 494: fixed code to compile as well with Lua 5.1 and 5.2
...
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1988 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2012-08-11 21:16:21 +00:00
Yves Rizoud
de1c8f9a8e
Lua: added run(), which works like dofile() but supports nested calls with subdirectories, and includes a safety against infinite recursion. See also issue 501
...
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1986 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2012-08-11 18:38:50 +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
mazzearos
ce8fbe076d
Started to add Lua support to AROS.
...
src/Makefile: link with lua. Note that I'm currently using an absolute path to include/lua
which only exits on my machine until AROS has support for pkg-config.
src/setup.h: added valid path to lua scripts.
src/io.c: take colon into account when checking for last separator.
src/factory.c: use luaL_newstate() instead of lua_open() because latter doesn't exist anymore in Lua-5.2.
Note: that fix should be valid for all platforms.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1977 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2012-08-03 19:10:44 +00:00
Adrien Destugues
d4d57f750d
In brush factory, when the selected entry is not a file, display the full path in the description window.
...
Since the factory can open in an empty or even non-existing (!) dir, this is helpful to locate where you are.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1962 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2012-06-09 20:41:05 +00:00
Yves Rizoud
55d0889bc8
Change rendering system to use function pointers, see Issue 31 c38 : preliminary work to make the same executable handle Layers or Anims. Fixed an old issue where Lasso-ing a brush with right mouse button wouldn't erase cleanly (visual). Fixed an old issue where picking colors in layer 5 would not 'see' through layers.
...
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1906 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2012-02-22 23:47:53 +00:00
Adrien Destugues
7137e1fc05
Strings with more than 24 chars were not properly null-terminated before sending them to Print_in_menu, causing random data to appear in the status bar since Print_in_menu will print more chars if there's space.
...
Thanks to DawnBringer for noticing!
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1899 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2012-01-11 18:29:46 +00:00
Yves Rizoud
dae1bc856b
Tilemap mode: Undo and Redo only refresh tilemap when image size changes. Lua scripts that change image size also refresh tilemap
...
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1877 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2011-11-26 14:46:09 +00:00
Yves Rizoud
8fb16e7089
Re-integrated anim in trunk, fixing the 999-layer limit at the same time
...
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1841 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2011-10-19 23:35:56 +00:00
Adrien Destugues
22d3f19df3
* Add lua stuff to write to spare page
...
* Use it in Tiler to put the tilemap in the spare.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1834 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2011-09-25 20:37:45 +00:00
Adrien Destugues
da48c58445
* Sync Brush Factory documentation and sourcecode
...
* Remove useless and undocumented function getbrushtransparentcolor (does the same as getbackcolor)
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1832 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2011-09-25 14:35:50 +00:00
Adrien Destugues
4dc40e7784
Add lua getfilename function (that also returns the path).
...
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1826 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2011-09-24 13:38:54 +00:00
Yves Rizoud
8ba389e06b
Lua: matchcolor2() now takes an optional argument that is the weight of lightness in color proximity algorithm (instead of the 0.25 default).
...
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1821 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2011-07-18 23:08:33 +00:00
Yves Rizoud
f2316f12e2
Lua: statusmessage() now clears remainder of line
...
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1820 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2011-07-16 19:15:08 +00:00
Yves Rizoud
51ddfe4f86
Fix build on Windows ( $shell in makefile). Lua: waitinput now additionally returns mouse position in image coordinates
...
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1819 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2011-07-16 18:57:55 +00:00