Commit Graph

399 Commits

Author SHA1 Message Date
Lucio Andrés Illanes Albornoz
4d4ce6f86e libroar/RoarCanvasCommandsTools.py:canvasTool(): call dropTarget.done() when setting new tool from external object as current tool. 2019-09-16 11:23:47 +02:00
Lucio Andrés Illanes Albornoz
2834fe531b Allow pasting text when using text tool.
libtools/ToolText.py:{_processKeyChar,onKeyboardEvent}(): split from onKeyboardEvent().
libtools/ToolText.py:onKeyboardEvent(): obtain & iteratively _processKeyChar() clipboard text on <Control> V.
libtools/ToolText.py:onKeyboardEvent(): dispatch cursor patch once after {drawing,pasting}.
assets/text/TODO: updated.
2019-09-16 11:15:23 +02:00
Lucio Andrés Illanes Albornoz
e6bdc52af2 Honour RTL flow in text tool.
libtools/ToolText.py:rtlRegEx: added.
libtools/ToolText.py:onKeyboardEvent(): move backwards given RTL keyChar.
assets/text/TODO: updated.
2019-09-16 10:09:25 +02:00
Lucio Andrés Illanes Albornoz
f2a19e0bf3 Fully implement {{arrow keys,backspace,enter},arrow keys} in {text,} tool{,s}.
libroar/RoarCanvasWindow.py:applyTool(): delegate updating of brushPos to ToolText if current tool.
libroar/RoarCanvasWindow.py:applyTool(): fix function result.
libroar/RoarCanvasWindow.py:applyTool(): pass updated set of arguments to on{Keyboard,Mouse}Event().
libroar/RoarCanvasWindow.py:onKeyboardInput(): allow wrapping around canvas when receiving cursor key input.
libroar/RoarCanvasWindow.py:onKeyboardInput(): supply keyCode or None to applyTool().
libroar/RoarCanvas{CommandsTools,Window}.py: supply keyCode or None to applyTool().
libtools/Tool{,Circle,Fill,Line,Object,Rect}.py:on{Keyboard,Mouse}Event(): update type signature.
libtools/ToolText.py:onKeyboardEvent(): fully implement {arrow keys,backspace,enter}.
libtools/ToolText.py:onKeyboardEvent(): update cursor when necessary.
libtools/ToolText.py:onMouseEvent(): correctly set brushPos if mouseLeftDown or mouseRightDown.
libtools/ToolText.py:__init__(): removed.
assets/text/TODO: updated.
2019-09-16 09:55:30 +02:00
Lucio Andrés Illanes Albornoz
1f7d63802c libcanvas/CanvasExportStore.py:exportTextBuffer(): correctly encode {bold,underline} cell state changes. 2019-09-16 08:52:04 +02:00
Lucio Andrés Illanes Albornoz
0c1b62a609 libtools/ToolFill.py: honour cell background colour & character on LMB, cell background colour only on RMB. 2019-09-16 08:45:03 +02:00
Lucio Andrés Illanes Albornoz
da15324fee Fix underlined cells rendering.
libgui/GuiCanvasWxBackend.py: FUCK YOU WXPYTHON
assets/text/TODO: updated.
2019-09-16 08:39:55 +02:00
Lucio Andrés Illanes Albornoz
9de2f906ba liboperators/OperatorFlipVertical.py:{flipPairs,apply()}: correctly flip flippable text characters.
assets/text/TODO: updated.
2019-09-16 08:13:55 +02:00
Lucio Andrés Illanes Albornoz
a295d2c524 libroar/RoarCanvasCommandsFile.py:canvasSaveAs(): fix self.canvasPathName reference.
libroar/RoarCanvasWindow.py:applyTool(): don't dispatch cursor patch if mapPoint == None.
libroar/RoarCanvasWindow.py:applyTool(): correctly handle cursor tool.
assets/text/TODO: updated.
2019-09-16 08:05:50 +02:00
Lucio Andrés Illanes Albornoz
55dfbbb13f Implements cursor tool & arrow keys navigation.
assets/images/toolCursor.png: added.
libroar/Roar{CanvasCommands{,Tools},Client}.py: adds cursor tool.
libroar/RoarCanvasWindow.py:applyTool(): dummy-handle cursor tool.
libroar/RoarCanvasWindow.py:onKeyboardInput(): update cursor position & cursor on {down,left,right,up} arrow key input.
assets/text/TODO: updated.
2019-09-15 21:33:19 +02:00
Lucio Andrés Illanes Albornoz
738b1db74e Implements invert colours operator.
liboperators/OperatorInvert.py: initial implementation.
libroar/RoarCanvasCommandsOperators.py: adds OperatorInvert.
assets/text/TODO: updated.
2019-09-15 20:43:49 +02:00
Lucio Andrés Illanes Albornoz
498a20cd28 assets/images/roar.png: updated. 2019-09-15 20:31:40 +02:00
Lucio Andrés Illanes Albornoz
cad73fd135 libtools/ToolObject.py:_mouseEventTsSelect(): reset object{Map,Size} when resetting to TS_NONE. 2019-09-15 19:37:10 +02:00
Lucio Andrés Illanes Albornoz
0d5f588108 Fix assets management canvas panel scrolling.
libgui/GuiWindow.py: ONCE, THERE WAS A _LETHALLY FUCKING WOUNDED_ WXPYTHON
libroar/RoarAssetsWindow.py: ON THE VERY EDGE OF ITS MISERABLE EXISTENCE
libroar/RoarCanvasWindow.py: BECAUSE A LION VICIOUSLY MAULED IT AND TORTURED IT FOR 392 DAYS AND TWO (2) SECONDS
2019-09-15 16:54:19 +02:00
Lucio Andrés Illanes Albornoz
209b908fb4 Inhibit {drag & drop,{un,re}do} during object tool usage.
libroar/RoarCanvasCommands.py:update(): disable {re,un}do {menu,toolbar} items on lastPanelState["undoInhibit"].
libroar/RoarCanvasWindow.py:applyTool(): call commands.update(undoInhibit=True) after active object tool usage.
libroar/RoarCanvasWindow.py:OnDropText(): inhibit during active object tool usage.
2019-09-15 16:04:38 +02:00
Lucio Andrés Illanes Albornoz
80b6b151db libroar/RoarCanvasWindow.py:onKeyboardInput(): enter pdb on <Shift> <Pause>. 2019-09-15 15:17:27 +02:00
Lucio Andrés Illanes Albornoz
bc50a0ca43 libroar/RoarCanvasWindow.py:RoarCanvasWindowDropTarget.{done,OnDropText,__init__}(): {honour,set} inProgress.
libroar/RoarCanvasWindow.py:applyTool(): call dropTarget.done() when resetting to last tool.
2019-09-15 13:57:41 +02:00
Lucio Andrés Illanes Albornoz
9c6b7fa9b2 Implements object tool operators context menu.
libgui/GuiFrame.py: _FUCK_ _YOU_ WXPYTHON
libroar/RoarCanvasCommandsOperators.py: I _FUCKING_ _HATE_ WXPYTHON
libroar/RoarCanvasWindow.py: DIE IN A DITCH WXPYTHON YOU ROTTING PILE OF FUCKING HIPPOPOTAMUS SHIT
libroar/RoarClient.py: I HATE WXPYTHON I HATE WXPYTHON I HATE WXPYTHON I HATE WXPYTHON I HATE WXPYTHON
2019-09-15 13:52:44 +02:00
Lucio Andrés Illanes Albornoz
dd5dcdcdd4 libroar/RoarCanvasWindow.py:onPaint(): invariably remove cursor prior to calling backend.onPaint().
libroar/RoarCanvasWindow.py:onScroll(): removed.
2019-09-15 12:58:39 +02:00
Lucio Andrés Illanes Albornoz
9d045fe455 libroar/RoarCanvasCommands.py:update(): disable undo if on last undo item. 2019-09-15 12:52:27 +02:00
Lucio Andrés Illanes Albornoz
eda8034075 libgui/GuiFrame.py:{_init,load}Menu(): split from loadMenu(), implement nested (sub)menus.
libroar/RoarCanvasCommandsEdit.py: put {brush,canvas} size commands into submenu.
libroar/RoarCanvasCommandsFile.py: put {ex,im}port commands into submenu.
assets/text/TODO: updated.
2019-09-15 12:41:14 +02:00
Lucio Andrés Illanes Albornoz
4b89180efe Replace RMB w/ LMB outside of region as end selection UI.
libtools/ToolObject.py: cleanup.
assets/text/TODO: updated.
2019-09-15 11:55:59 +02:00
Lucio Andrés Illanes Albornoz
b024dd855a Implements merged object tool & flip operators.
assets/images/toolObject.png: added.
liboperators/Operator{,Flip{Horizontal,Vertical}}.py: initial implementation.
libroar/RoarCanvasCommands.py: adds RoarCanvasCommandsOperators.
libroar/RoarCanvasCommandsOperators.py: initial implementation.
libroar/Roar{CanvasCommands{,Tools},Client}.py: replaces ToolSelect{Clone,Move} w/ ToolObject.
libroar/RoarCanvasWindow.py:RoarCanvasWindowDropTarget.OnDropText(): update ToolObject() invocation.
libroar/RoarCanvasWindow.py:{applyTool,onMouseInput}(): pass keyModifiers to Tool.onMouseEvent().
libroar/RoarCanvasWindow.py:applyTool(): only switch back to lastTool if current object tool contains an external object.
libroar/RoarCanvasWindow.py:onLeaveWindow(): disable hiding cursor for now.
libtools/Tool{,Circle,Fill,Line,Rect,Text}.py:onMouseEvent(): update type signature.
libtools/Tool{Object,Select{,Clone,Move}}.py: merged into libtools/ToolObject.py.
roar.py: add liboperators to sys.path[].
assets/text/TODO: updated.
2019-09-15 11:06:25 +02:00
Lucio Andrés Illanes Albornoz
743383437e libtools/Tool.py:Tool(): derive from object. 2019-09-14 17:11:08 +02:00
Lucio Andrés Illanes Albornoz
f995d7b54f assets/images/roar.png: updated. 2019-09-14 16:29:51 +02:00
Lucio Andrés Illanes Albornoz
d565a7f7ef libroar/RoarWindowAbout.py, assets/tools/deploy-python.sh: updated. 2019-09-14 16:16:36 +02:00
Lucio Andrés Illanes Albornoz
3b47af399a libgui/GuiCanvasWxBackend.py:resize(): set font size from cellSize[0] + 1 vs. hard-wired 8.
libroar/RoarCanvasWindow.py:{onMouseWheel,__init__}(): {de,in}crease cell size w/ <Ctrl> <Mouse Wheel>.
assets/text/TODO: updated.
2019-09-14 15:44:17 +02:00
Lucio Andrés Illanes Albornoz
270a19ea40 libgui/GuiFrame.py:onMenu(): clear event queue after calling command function. 2019-09-14 15:20:20 +02:00
Lucio Andrés Illanes Albornoz
31babe1994 Implements recently used {directory,files} in {assets,application} windows & file dialogues.
libgui/GuiFrame.py:GuiSubMenuDecorator(): added.
libgui/GuiFrame.py:loadMenus(): process submenu menu items.
libroar/RoarCanvasCommandsFile.py:{_{load,push}Recent,canvasOpenRecent}(): initial implementation.
libroar/RoarCanvasCommandsFile.py:_import{,File}(): return pathname along w/ rc.
libroar/RoarCanvasCommandsFile.py:canvas{Open,SaveAs}(): call _pushRecent() post-{open,save}.
libroar/RoarCanvasCommandsFile.py:__init__(): updated.
librtl/RtlPlatform.py: added.
librtl/RtlPlatform.py:getLocalConfPathName(): initial implementation.
roar.py: manually call _loadRecent() & _pushRecent() post-import.
assets/text/TODO: updated.
2019-09-14 15:16:57 +02:00
Lucio Andrés Illanes Albornoz
1d927bf2b9 bcanvas/CanvasImportStore.py:importTextBuffer(): handle exceptions. 2019-09-14 11:52:24 +02:00
Lucio Andrés Illanes Albornoz
f6afcd735a libroar/RoarAssetsWindow.py:{_importFiles, on{Load,Save}List,__init__}(): {pass,receive} lastDir {before,after} wx.FileDialog()s.
libroar/RoarCanvasCommandsFile.py:{_importFile,canvasExportAs{Ansi,Png},SaveAs,__init__}(): {pass,receive} lastDir {before,after} wx.FileDialog()s.
2019-09-14 11:49:08 +02:00
Lucio Andrés Illanes Albornoz
3298e9925b libroar/RoarCanvasWindow.py:onScroll(): hide cursor when scrolling. 2019-09-14 11:33:13 +02:00
Lucio Andrés Illanes Albornoz
342af59ffe .gitignore: ignore build/. 2019-09-14 11:29:26 +02:00
Lucio Andrés Illanes Albornoz
c923890fde setup.py: added.
requirements.txt: updated.
2019-09-14 11:23:29 +02:00
Lucio Andrés Illanes Albornoz
2bbdec394f roar.py: fix argument handling. 2019-09-14 11:21:40 +02:00
Lucio Andrés Illanes Albornoz
771f124314 requirements.txt: added (via Civil.) 2019-09-14 11:05:05 +02:00
Lucio Andrés Illanes Albornoz
a5b37f1d2b libroar/RoarAssetsWindow.py:{_load_list,onLoadList}(): split from onLoadList().
roar.py: optionally load assets list from argv[2].
2019-09-14 10:52:05 +02:00
Lucio Andrés Illanes Albornoz
79f5e4e9e3 libtools/ToolObject.py:onSelectEvent(): obtain correct canvas map cell given transparent object selection cell. 2019-09-14 10:49:11 +02:00
Lucio Andrés Illanes Albornoz
52a575cb47 libroar/RoarCanvasCommandsFile.py:canvasSave{,As}(): don't reset dirty on canvasSaveAs(). 2019-09-13 21:14:11 +02:00
Lucio Andrés Illanes Albornoz
5a3cdaca89 libgui/GuiCanvasWxBackend.py:GuiBufferedDC.__init__(): directly select buffer into DC.
libroar/RoarCanvasWindow.py:applyTool(): normalise mapPoint w/ viewRect if mapPoint != None.
2019-09-13 21:09:51 +02:00
Lucio Andrés Illanes Albornoz
480dc6231e libroar/RoarCanvasWindow.py:applyTool(): only call tool.onMouseEvent() if mouse state has changed since the last call & update lastCellState.
libroar/RoarCanvasWindow.py:{on{Enter,Leave}Window,__init__}(): reset lastCellState.
2019-09-13 20:20:26 +02:00
Lucio Andrés Illanes Albornoz
dc88c0ad80 libgui/GuiCanvasWxBackend.py:{resize,__init__}(): restrict external font loading to Windows (via sym.)
assets/text/TODO: updated.
2019-09-13 10:03:39 +02:00
Lucio Andrés Illanes Albornoz
f7608cf4b7 libgui/GuiCanvasWxBackend.py: render transparent cells as dark grey `░'. 2019-09-12 21:01:06 +02:00
Lucio Andrés Illanes Albornoz
9ce04b2b9d libtools/ToolSelectMove.py: exclude sub-cells of both of {select,src}Rect from being cleared.
libtools/ToolSelect.py: minor cleanup.
2019-09-12 20:09:11 +02:00
Lucio Andrés Illanes Albornoz
16689cf97f libroar/RoarCanvasWindow.py:dispatchDeltaPatches(): remove cursor prior to updating canvas. 2019-09-12 17:03:21 +02:00
Lucio Andrés Illanes Albornoz
b6c27ad434 libtools/ToolSelect.py: fix function signatures. 2019-09-12 16:55:03 +02:00
Lucio Andrés Illanes Albornoz
f16b75d590 libcanvas/CanvasJournal.py:end(): purge patchesUndo if at patchesUndoLevel > 0.
assets/text/TODO: updated.
2019-09-12 16:39:17 +02:00
Lucio Andrés Illanes Albornoz
8b3be4e35f libcanvas/CanvasJournal.py:{begin,end,updateCurrentDeltas}(): {insert,delete,append} at patchesUndoLevel.
libgui/GuiWindow.py:{onEnterWindow,__init__}(): bind wx.EVT_ENTER_WINDOW.
libroar/RoarCanvasWindow.py:applyTool(): only call tool.onMouseEvent() if mouse has moved to another cell since the last dirtying call & update lastDirtyCell.
libroar/RoarCanvasWindow.py:{onEnterWindow,onLeaveWindow,__init__}(): reset lastDirtyCell.
libroar/RoarCanvasWindow.py:__init__():
assets/text/TODO: updated.
2019-09-12 16:24:53 +02:00
Lucio Andrés Illanes Albornoz
33e5645736 Initial implementation of assets window & external object tool.
libgui/GuiFrame.py:GuiMiniFrame(): added as sub-class of wx.MiniFrame().
libgui/GuiWindow.py:RoarCanvasWindowDropTarget(): initial implementation.
libgui/GuiWindow.py:__init__(): receive & pass optional style parameter.
libgui/GuiWindow.py:__init__(): set drop target.
libroar/RoarAssetsWindow.py: initial implementation.
libroar/RoarClient.py:__init__(): add RoarAssetsWindow().
libtools/ToolObject.py: initial implementation.
assets/text/TODO: updated.
2019-09-12 12:49:53 +02:00
Lucio Andrés Illanes Albornoz
3867f34306 libgui/GuiCanvasWxBackend.py:_drawCharPatch(): fix underscore rendering.
libgui/GuiCanvasWxBackend.py:_get{Brush,Char}PatchColours(): fix {back,fore}ground colour {brush{,es},pen}.
assets/text/TODO: updated.
2019-09-12 11:26:17 +02:00