mirror of
https://github.com/lalbornoz/roar.git
synced 2024-11-16 12:36:38 +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, ...)
|
12) Sprites & scripted (Python?) animation on the basis of asset traits and {composable,parametrised} patterns (metric flow, particle system, rigging, ...)
|
||||||
13) GUI TODO list:
|
13) GUI TODO list:
|
||||||
a) switch to Gtk
|
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, ...)
|
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)
|
d) replace resize buttons w/ {-,edit box,+} buttons & lock button re: ratio (ty lol3)
|
||||||
|
|
||||||
Release roadmap:
|
Release roadmap:
|
||||||
1) {copy,cut,delete,insert from,paste}, edit asset in new canvas, import from {canvas,object}
|
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
|
2) BUG: a) apply tool b) move cursor c) undo d) cursor artifacts
|
||||||
3) add hotkeys.txt mIRC art canvas to help menu
|
3) operators: crop, scale, shift, slice
|
||||||
4) operators: crop, scale, shift, slice
|
4) auto{load,save} & {backup,restore}
|
||||||
5) auto{load,save} & {backup,restore}
|
5) tools: unicode block elements
|
||||||
6) tools: unicode block elements
|
6) floating/dockable toolbar
|
||||||
7) floating/dockable toolbar
|
|
||||||
|
|
||||||
vim:ff=dos tw=0
|
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.
|
Global hotkeys:
|
||||||
<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> -/+ Decrease/increase brush size height and width
|
||||||
<Ctrl> C, U, E, F, L, P, R, E, T Switch to circle, cursor, erase, fill, line, pick colour, rectangle, object, text tool
|
<Ctrl> <Shift> -/+ Decrease/increase canvas size height and width
|
||||||
<Ctrl> I Flip colours
|
<Ctrl> 0-9 Set foreground colour to #0-9
|
||||||
<Ctrl> N New canvas
|
<Ctrl> <Shift> 0-5, 6 Set foreground colour to #10-15 or transparent colour, resp.
|
||||||
<Ctrl> O Open mIRC art file
|
<Ctrl> <Alt> 0-9 Set background colour to #0-9
|
||||||
<Ctrl> S Save canvas as mIRC art file
|
<Ctrl> <Alt> <Shift> 0-5, 6 Set background colour to #10-15 or transparent colour, resp.
|
||||||
<Ctrl> X Exit
|
<Ctrl> C, U, E, F, L, P, R, E, T Switch to circle, cursor, erase, fill, line, pick colour, rectangle, object, text tool
|
||||||
<Ctrl> Y, Z Redo, undo, resp.
|
<Ctrl> I Flip colours
|
||||||
<Shift> <Pause> Break into Python debugger
|
<Ctrl> N New canvas
|
||||||
(Canvas) <Down>, <Left>, <Right>, <Up> Move canvas cursor
|
<Ctrl> O Open mIRC art file
|
||||||
(Canvas) <Left mouse button>, <Space> Apply current tool with foreground colour or initiate tool action (line and object tool)
|
<Ctrl> S Save canvas as mIRC art file
|
||||||
(Canvas) <Right mouse button> Apply current tool with background colour
|
<Ctrl> X Exit
|
||||||
(Erase tool) <Right mouse button> Erase background colour with foreground colour
|
<Ctrl> Y, Z Redo, undo last action
|
||||||
(Fill tool) <Ctrl> <Left mouse button>, <Right mouse button> Fill entire region ignoring character cells
|
<Shift> <Pause> Break into Python debugger
|
||||||
(Object tool) <Ctrl> <Left mouse button> Move selection instead of cloning
|
|
||||||
|
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>
|
# 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 RoarWindowAbout import RoarWindowAbout
|
||||||
|
from RoarWindowMelp import RoarWindowMelp
|
||||||
|
import webbrowser
|
||||||
|
|
||||||
class RoarCanvasCommandsHelp():
|
class RoarCanvasCommandsHelp():
|
||||||
@GuiCommandDecorator("About", "&About", None, None, True)
|
@GuiCommandDecorator("About roar", "&About roar", None, None, True)
|
||||||
def canvasAbout(self, event):
|
def canvasAbout(self, event):
|
||||||
RoarWindowAbout(self.parentFrame)
|
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)
|
# __init__(self)
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
self.accels = ()
|
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
|
# 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
|
from Tool import Tool
|
||||||
import re, string, time, wx
|
import re, string, wx
|
||||||
|
|
||||||
class ToolText(Tool):
|
class ToolText(Tool):
|
||||||
name = "Text"
|
name = "Text"
|
||||||
|
Loading…
Reference in New Issue
Block a user