2019-09-04 09:47:09 +00:00
#!/usr/bin/env python3
#
2019-09-10 10:06:56 +00:00
# RoarWindowAbout.py
2019-09-04 14:23:59 +00:00
# Copyright (c) 2018, 2019 Lucio Andrés Illanes Albornoz <lucio@lucioillanes.de>
2019-09-04 09:47:09 +00:00
#
from glob import glob
import os , random , wx , wx . adv
2019-09-10 10:06:56 +00:00
class RoarWindowAbout ( wx . Dialog ) :
2019-09-04 09:47:09 +00:00
def onButtonRoar ( self , event ) :
self . Destroy ( )
Various bugfixes & usability improvements.
1) Add background colour toolbar beneath (foreground) colour toolbar.
2) Add colour flipping command w/ {accelerator,{menu,toolbar} item}.
3) Add {de,in}crease {brush,canvas} size accelerator.
4) Add {hide,show} assets window toolbar item.
5) Circle tool: draw outline with foreground colour.
6) Circle tool: honour transparency.
7) Fill tool: change comprehensive fill modifier key from <Shift> to <Ctrl>.
8) Fill tool: fill with {back,fore}ground colour given <[RL]MB>
9) Fix arrow keys cursor motion when scrolled down.
10 Instantly reflect {brush size,colour,tool} changes in canvas.
11) Object tool: honour transparency w/ non-external objects.
12) Object tool: update selection rectangle during <LMB> whilst dragging, set w/ release of <LMB>.
13) Rectangle tool: draw outline with foreground colour.
14) Rectangle tool: honour transparency.
15) Replace wx.ToolBar() w/ wx.lib.agw.aui.AuiToolBar() & custom wx.lib.agw.aui.AuiDefaultToolBarArt().
16) Restore scrolling position after resizing canvas.
.TODO: deleted.
assets/audio/roar{arab8,spoke11}.wav: added.
assets/text/hotkeys.txt: added to document hotkeys.
assets/text/requirements.txt, requirements.txt: moved.
assets/text/TODO: updated.
{assets/tools,lib{canvas,gui,roar,rtl,tools}}/*.py: remove Vim fold markers.
libroar/RoarCanvasCommandsFile.py:_importFile(): update wx.FileDialog() message.
libroar/RoarCanvasCommandsOperators.py:canvasOperator(): update invert colours {caption,label}.
2019-09-23 16:49:33 +00:00
2019-09-04 09:47:09 +00:00
#
2019-09-10 11:24:47 +00:00
# __init__(self, parent, minSize=(320, 300), title="About roar")
def __init__ ( self , parent , minSize = ( 320 , 300 ) , title = " About roar " ) :
super ( ) . __init__ ( parent , size = minSize , title = title )
2019-09-10 16:43:08 +00:00
self . panel , self . sizer , self . sizerV = wx . Panel ( self ) , wx . FlexGridSizer ( 2 , 2 , 4 , 4 ) , wx . BoxSizer ( wx . VERTICAL )
2019-09-04 09:47:09 +00:00
logoPathNames = glob ( os . path . join ( " assets " , " images " , " logo*.bmp " ) )
logoPathName = logoPathNames [ random . randint ( 0 , len ( logoPathNames ) - 1 ) ]
2019-09-10 11:24:47 +00:00
self . logo = wx . StaticBitmap ( self . panel , - 1 , wx . Bitmap ( logoPathName ) )
2019-09-04 09:47:09 +00:00
2019-09-23 20:32:37 +00:00
self . title = wx . StaticText ( self . panel , label = " roar -- mIRC art editor for Windows && Linux \n __ROAR_RELEASE_VERSION__ \n https://www.github.com/lalbornoz/roar/ \n Copyright (c) 2018, 2019 Lucio Andrés Illanes Albornoz <lucio@lucioillanes.de> \n https://www.lucioillanes.de \n " , style = wx . ALIGN_CENTER )
2019-09-04 09:47:09 +00:00
self . title . SetFont ( wx . Font ( 8 , wx . DEFAULT , wx . NORMAL , wx . NORMAL , underline = False ) )
2019-09-10 11:24:47 +00:00
labelsText = [ " &roar! " , " &ROAR! " , " &roaaaaaaar! " , " &ROAROARAOR " , " _&ROAR_ " ]
2019-09-04 09:47:09 +00:00
labelText = labelsText [ random . randint ( 0 , len ( labelsText ) - 1 ) ]
2019-09-10 11:24:47 +00:00
self . buttonRoar = wx . Button ( self . panel , label = labelText )
2019-09-04 09:47:09 +00:00
self . buttonRoar . Bind ( wx . EVT_BUTTON , self . onButtonRoar )
2019-09-10 16:43:08 +00:00
self . sizerV . AddMany ( ( ( self . title , 0 , wx . ALL | wx . CENTER , 4 ) , ( self . buttonRoar , 0 , wx . ALL | wx . CENTER , 4 ) , ) )
2019-09-04 09:47:09 +00:00
2019-09-10 16:43:08 +00:00
self . sizer . AddMany ( (
( self . logo , 0 , wx . ALL | wx . CENTER , 4 ) ,
( self . sizerV , 0 , wx . ALL | wx . CENTER , 3 ) , ) )
2019-09-10 11:24:47 +00:00
self . panel . SetSizerAndFit ( self . sizer )
self . SetClientSize ( self . sizer . ComputeFittingClientSize ( self ) ) ; self . Center ( ) ;
self . SetTitle ( title )
2019-09-04 09:47:09 +00:00
soundBitePathNames = glob ( os . path . join ( " assets " , " audio " , " roar*.wav " ) )
2019-09-17 06:50:33 +00:00
soundBitePathName = soundBitePathNames [ random . randint ( 0 , len ( soundBitePathNames ) - 1 ) ]
2019-09-04 09:47:09 +00:00
self . soundBite = wx . adv . Sound ( soundBitePathName )
if self . soundBite . IsOk ( ) :
self . soundBite . Play ( wx . adv . SOUND_ASYNC )
self . ShowModal ( )
# vim:expandtab foldmethod=marker sw=4 ts=4 tw=120