mirror of
https://github.com/lalbornoz/roar.git
synced 2024-11-21 14:56:37 +00:00
Adds GitHub & (hotkey) help dialogue menu items.
assets/text/hotkeys.txt: updated. assets/text/TODO: updated. libtools/ToolText.py: minor cleanup.
This commit is contained in:
parent
6ab7c443eb
commit
84d20a4398
@ -12,17 +12,16 @@
|
||||
12) Sprites & scripted (Python?) animation on the basis of asset traits and {composable,parametrised} patterns (metric flow, particle system, rigging, ...)
|
||||
13) GUI TODO list:
|
||||
a) switch to Gtk
|
||||
b) replace logo w/ canvas panel in About dialogue
|
||||
b) replace logo w/ canvas panel in About dialogue, revisit melp? dialogue
|
||||
c) Settings/Settings window (e.g. autosave, hide cursor on leaving window, ...)
|
||||
d) replace resize buttons w/ {-,edit box,+} buttons & lock button re: ratio (ty lol3)
|
||||
|
||||
Release roadmap:
|
||||
1) {copy,cut,delete,insert from,paste}, edit asset in new canvas, import from {canvas,object}
|
||||
2) BUG: a) apply tool b) move cursor c) undo d) cursor artifacts
|
||||
3) add hotkeys.txt mIRC art canvas to help menu
|
||||
4) operators: crop, scale, shift, slice
|
||||
5) auto{load,save} & {backup,restore}
|
||||
6) tools: unicode block elements
|
||||
7) floating/dockable toolbar
|
||||
3) operators: crop, scale, shift, slice
|
||||
4) auto{load,save} & {backup,restore}
|
||||
5) tools: unicode block elements
|
||||
6) floating/dockable toolbar
|
||||
|
||||
vim:ff=dos tw=0
|
||||
|
@ -1,16 +1,31 @@
|
||||
<Ctrl> 0-9, <Ctrl> <Shift> 0-5, <Ctrl> <Shift> 6 Set foreground colour to #0-9, #10-15, transparent colour, resp.
|
||||
<Ctrl> <Alt> 0-9, <Ctrl> <Alt> <Shift> 0-5, <Ctrl> <Alt> <Shift> 6 Set background colour to #0-9, #10-15, transparent colour, resp.
|
||||
<Ctrl> C, U, E, F, L, P, R, E, T Switch to circle, cursor, erase, fill, line, pick colour, rectangle, object, text tool
|
||||
<Ctrl> I Flip colours
|
||||
<Ctrl> N New canvas
|
||||
<Ctrl> O Open mIRC art file
|
||||
<Ctrl> S Save canvas as mIRC art file
|
||||
<Ctrl> X Exit
|
||||
<Ctrl> Y, Z Redo, undo, resp.
|
||||
<Shift> <Pause> Break into Python debugger
|
||||
(Canvas) <Down>, <Left>, <Right>, <Up> Move canvas cursor
|
||||
(Canvas) <Left mouse button>, <Space> Apply current tool with foreground colour or initiate tool action (line and object tool)
|
||||
(Canvas) <Right mouse button> Apply current tool with background colour
|
||||
(Erase tool) <Right mouse button> Erase background colour with foreground colour
|
||||
(Fill tool) <Ctrl> <Left mouse button>, <Right mouse button> Fill entire region ignoring character cells
|
||||
(Object tool) <Ctrl> <Left mouse button> Move selection instead of cloning
|
||||
Global hotkeys:
|
||||
<Ctrl> -/+ Decrease/increase brush size height and width
|
||||
<Ctrl> <Shift> -/+ Decrease/increase canvas size height and width
|
||||
<Ctrl> 0-9 Set foreground colour to #0-9
|
||||
<Ctrl> <Shift> 0-5, 6 Set foreground colour to #10-15 or transparent colour, resp.
|
||||
<Ctrl> <Alt> 0-9 Set background colour to #0-9
|
||||
<Ctrl> <Alt> <Shift> 0-5, 6 Set background colour to #10-15 or transparent colour, resp.
|
||||
<Ctrl> C, U, E, F, L, P, R, E, T Switch to circle, cursor, erase, fill, line, pick colour, rectangle, object, text tool
|
||||
<Ctrl> I Flip colours
|
||||
<Ctrl> N New canvas
|
||||
<Ctrl> O Open mIRC art file
|
||||
<Ctrl> S Save canvas as mIRC art file
|
||||
<Ctrl> X Exit
|
||||
<Ctrl> Y, Z Redo, undo last action
|
||||
<Shift> <Pause> Break into Python debugger
|
||||
|
||||
Canvas hotkeys:
|
||||
<Down>, <Left>, <Right>, <Up> Move canvas cursor
|
||||
<LMB>/<Space> Apply current tool with foreground colour (with exceptions)
|
||||
<RMB> Apply current tool with background colour (with exceptions)
|
||||
|
||||
Tool-specific hotkeys:
|
||||
(Erase) <RMB> Erase background colour with foreground colour
|
||||
(Fill) <Ctrl> <LMB>/<Space>/<RMB> Fill entire region with foreground/background colour ignoring character cells
|
||||
(Line, object) <LMB>/<Space> Initiate line drawing/selection
|
||||
(Object) <Ctrl> <LMB> Move selection instead of cloning
|
||||
(Pick colour) <LMB>/<Space> Pick current cell's foreground colour
|
||||
(Pick colour) <RMB> Pick current cell's background colour
|
||||
(Text) <Backspace> Erase last cell and move backwards w/ wraparound
|
||||
(Text) <Ctrl> V Paste text from clipboard
|
||||
(Text) <Enter> Move to leftmost cell on next row w/ wraparound
|
@ -4,18 +4,32 @@
|
||||
# Copyright (c) 2018, 2019 Lucio Andrés Illanes Albornoz <lucio@lucioillanes.de>
|
||||
#
|
||||
|
||||
from GuiFrame import GuiCommandDecorator
|
||||
from GuiFrame import GuiCommandDecorator, NID_MENU_SEP
|
||||
from RoarWindowAbout import RoarWindowAbout
|
||||
from RoarWindowMelp import RoarWindowMelp
|
||||
import webbrowser
|
||||
|
||||
class RoarCanvasCommandsHelp():
|
||||
@GuiCommandDecorator("About", "&About", None, None, True)
|
||||
@GuiCommandDecorator("About roar", "&About roar", None, None, True)
|
||||
def canvasAbout(self, event):
|
||||
RoarWindowAbout(self.parentFrame)
|
||||
|
||||
@GuiCommandDecorator("View melp?", "View &melp?", None, None, True)
|
||||
def canvasMelp(self, event):
|
||||
RoarWindowMelp(self.parentFrame)
|
||||
|
||||
@GuiCommandDecorator("Open &issue on GitHub", "Open &issue on GitHub", None, None, True)
|
||||
def canvasNewIssueGitHub(self, event):
|
||||
webbrowser.open("https://github.com/lalbornoz/roar/issues/new")
|
||||
|
||||
@GuiCommandDecorator("Visit GitHub website", "Visit &GitHub website", None, None, True)
|
||||
def canvasVisitGitHub(self, event):
|
||||
webbrowser.open("https://www.github.com/lalbornoz/roar")
|
||||
|
||||
#
|
||||
# __init__(self)
|
||||
def __init__(self):
|
||||
self.accels = ()
|
||||
self.menus, self.toolBars = (("&Help", self.canvasAbout,),), ()
|
||||
self.menus, self.toolBars = (("&Help", self.canvasMelp, NID_MENU_SEP, self.canvasNewIssueGitHub, self.canvasVisitGitHub, NID_MENU_SEP, self.canvasAbout,),), ()
|
||||
|
||||
# vim:expandtab foldmethod=marker sw=4 ts=4 tw=0
|
||||
|
33
libroar/RoarWindowMelp.py
Normal file
33
libroar/RoarWindowMelp.py
Normal file
@ -0,0 +1,33 @@
|
||||
#!/usr/bin/env python3
|
||||
#
|
||||
# RoarWindowMelp.py
|
||||
# Copyright (c) 2018, 2019 Lucio Andrés Illanes Albornoz <lucio@lucioillanes.de>
|
||||
#
|
||||
|
||||
import os, wx
|
||||
|
||||
class RoarWindowMelp(wx.Dialog):
|
||||
def onButtonRoar(self, event):
|
||||
self.Destroy()
|
||||
|
||||
#
|
||||
# __init__(self, parent, minSize=(320, 300), title="melp?")
|
||||
def __init__(self, parent, minSize=(320, 300), title="melp?"):
|
||||
super().__init__(parent, size=minSize, title=title)
|
||||
self.panel, self.sizer = wx.Panel(self), wx.BoxSizer(wx.VERTICAL)
|
||||
|
||||
with open(os.path.join("assets", "text", "hotkeys.txt"), "r") as fileObject:
|
||||
helpLabel = "".join(fileObject.readlines())
|
||||
self.title = wx.StaticText(self.panel, label=helpLabel, style=wx.ALIGN_LEFT)
|
||||
self.title.SetFont(wx.Font(8, wx.MODERN, wx.NORMAL, wx.NORMAL, underline=False))
|
||||
self.buttonRoar = wx.Button(self.panel, label="explodes.")
|
||||
self.buttonRoar.Bind(wx.EVT_BUTTON, self.onButtonRoar)
|
||||
self.sizer.AddMany(((self.title, 1, wx.ALL | wx.CENTER | wx.EXPAND, 4), (self.buttonRoar, 0, wx.ALL | wx.CENTER, 4),))
|
||||
self.panel.SetSizerAndFit(self.sizer)
|
||||
newSize = self.sizer.ComputeFittingWindowSize(self)
|
||||
self.SetSize((newSize[0] + 64, newSize[1],)); self.Center();
|
||||
self.SetTitle(title)
|
||||
|
||||
self.ShowModal()
|
||||
|
||||
# vim:expandtab foldmethod=marker sw=4 ts=4 tw=120
|
@ -5,7 +5,7 @@
|
||||
#
|
||||
|
||||
from Tool import Tool
|
||||
import re, string, time, wx
|
||||
import re, string, wx
|
||||
|
||||
class ToolText(Tool):
|
||||
name = "Text"
|
||||
|
Loading…
Reference in New Issue
Block a user