mirror of
https://github.com/lalbornoz/roar.git
synced 2024-11-04 14:56:38 +00:00
90840bd0a0
1) Canvas window: clear new canvases w/ [-1, -1] by default. 2) Canvas window: don't create new canvas on initialisation. 3) Canvas window: set default brush colours to [3, 9]. 4) Erase tool: correctly fill non-text cells w/ background colour. 5) GUI: correctly show current operator name in status bar whilst active. 6) GUI: {de,in}crease canvas {height,width} w/ <Ctrl> & cursor keys. 7) GUI: disable tiling items unless current tool is object tool. 8) GUI: select tool w/ <F2-F10> accelerators.
32 lines
1.3 KiB
Python
32 lines
1.3 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)
|
|
|
|
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
|