roar/libroar/RoarWindowMelp.py
Lucio Andrés Illanes Albornoz 0c66f94797 Cleanup, bugfixes & C++ backend implementation.
1) {About,Melp?} window: switch to green on black.
2) Assets window: scroll assets list on selected item update w/ <Cursor> or on deletion.
3) Canvas window: change default brush colours to [3, -1].
4) Canvas window: copy canvas cells given transparent cells from tools.
5) Canvas window: don't disable {re,un}do during object tool usage.
6) Canvas window: don't hide cursor during {re,un}do.
7) Canvas window: draw new cells using current brush background colour on resize.
8) Canvas window: fix memory leak on cell size updating.
9) Text tool: process [\r\n] in text pasted from clipboard.

assets/audio/roar{vap0r[1-8],viking[1-5]}.wav: added.
assets/text/README.txt: updated.
assets/tools/AnsiToMiRCART.py: added (for spoke.)
assets/tools/deploy-python.sh: updated.
2019-10-24 21:14:00 +02:00

33 lines
1.4 KiB
Python

#!/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()
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)
self.panel.SetBackgroundColour(wx.Colour(0, 0, 0)); self.panel.SetForegroundColour(wx.Colour(0, 187, 0));
with open(os.path.join("assets", "text", "melp.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] + 128, newSize[1],)); self.Center();
self.SetTitle(title)
self.ShowModal()
# vim:expandtab foldmethod=marker sw=4 ts=4 tw=120