Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions license_short.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
Reggie Next - a supercharged fork of the modern level editor
Copyright (C) 2014 Treeki, Tempus, angelsl, JasonP27, Kinnay, MalStar1000, RoadrunnerWMC
Development forums: http://reggienext.byethost11.com/

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
8 changes: 4 additions & 4 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@

----------------------------------------------------------------

Homepage: http://rvlution.net/reggie/
Support: http://rvlution.net/forums/
On GitHub: https://github.com/RoadrunnerWMC/Reggie-Next
Homepage & Support: http://reggienext.nsmbwii.com
GitHub: https://github.com/RoadrunnerWMC/Reggie-Next
Mac Port Github: https://github.com/MalStar1000/Reggie-Next-Mac

----------------------------------------------------------------

Expand Down Expand Up @@ -60,7 +60,7 @@ Developers:
* JasonP27 - ReggieMod Developer: Programmer, UI, Sprite Images
* Kamek64 - Reggie! Newer Sprites Developer: Programmer, Sprite Images
* ZementBlock - Sprite Data
* MalStar1000 - Sprite Images, Other
* MalStar1000 - Sprite Images, Mac Port, Other
* Grop - Sprite Data
* joietyfull64 - Sprite Data
* MidiGuyDP - NewerSMBW Background Images & Names
Expand Down
120 changes: 112 additions & 8 deletions reggie.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ def loadResources(self):
Reads the info from self.cfgData and loads stuff
"""
self.basePix = QtGui.QPixmap(os.path.join('reggiedata', self.cfgData['base_image']))
#print(os.getcwd())

def loadFont(name):
fname = self.cfgData.get(name + '_font', 'Arial')
Expand All @@ -153,11 +154,13 @@ def loadFont(name):
wLim = self.cfgData.get(name + '_wrap_limit', 1024)
position = self.cfgData.get(name + '_position', (0, 0))
centered = self.cfgData.get(name + '_centered', False)
weight = self.cfgData.get(name + '_font_weight', 50)

font = QtGui.QFont()
font.setFamily(fname)
font.setBold(bold)
font.setPointSize(size)
font.setWeight(weight)
return font, position, color, centered, wLim

self.versionFontInfo = loadFont('version')
Expand Down Expand Up @@ -2443,7 +2446,7 @@ def LoadNumberFont():
if hasattr(s, 'WindowsVersion'):
NumberFont = QtGui.QFont('Tahoma', 7)
elif hasattr(s, 'MacintoshVersion'):
NumberFont = QtGui.QFont('Lucida Grande', 9)
NumberFont = QtGui.QFont('Helvetica Neue', 9)
else:
NumberFont = QtGui.QFont('Sans', 8)

Expand Down Expand Up @@ -9664,9 +9667,9 @@ def InitAsEnglish(self):
15: 'Take a full size screenshot of your level for you to share',
16: 'Change Game Path...',
17: 'Set a different folder to load the game files from',
18: 'Reggie Next Preferences...',
18: 'Preferences',
19: 'Change important Reggie Next settings',
20: 'Exit Reggie Next',
20: 'Exit',
21: 'Exit the editor',
22: 'Select All',
23: 'Select all items in this area',
Expand Down Expand Up @@ -10511,8 +10514,31 @@ def __init__(self, scene, parent):
self.XScrollBar = QtWidgets.QScrollBar(Qt.Horizontal, parent)
self.setVerticalScrollBar(self.YScrollBar)
self.setHorizontalScrollBar(self.XScrollBar)
self.grabGesture(Qt.PinchGesture)

self.currentobj = None

#Gesture for Zoom
def event(self,event):
print('First Cond: ', event.type(), QtCore.QEvent.Gesture)
if event.type() == QtCore.QEvent.Gesture:
return self.myGestureZoomingFunction(event)
return QtWidgets.QGraphicsView.event(self, event)

def myGestureZoomingFunction(self, event):
# Make your zoom code here
print('Second Cond: ', event.gesture(Qt.PinchGesture))
if event.gesture(Qt.PinchGesture):
gesture = event.gesture(Qt.PinchGesture)
scale = gesture.scaleFactor()
print('Scale Factor: ', scale)
# scale = scale
self.scale(scale, scale) / 60

# accept the event
event.accept()
return True


def mousePressEvent(self, event):
"""
Expand Down Expand Up @@ -14606,6 +14632,9 @@ def __init__(self):
"""
Creates and initializes the widget
"""

QtWidgets.QGraphicsView.__init__(self)

QtWidgets.QWidget.__init__(self)
maxwidth = 512-128
maxheight = 20
Expand Down Expand Up @@ -14653,6 +14682,7 @@ def __init__(self):
self.setMinimumWidth(maxwidth)
self.setMaximumWidth(maxwidth)
self.setMaximumHeight(maxheight)
# self.grabGesture(Qt.PinchGesture)

def sliderMoved(self):
"""
Expand All @@ -14670,6 +14700,30 @@ def findIndexOfLevel(self, level):
for i, mainlevel in enumerate(mainWindow.ZoomLevels):
if float(mainlevel) == float(level): return i

#Gesture for Zoom
#def event(self, event, level):
''' print('First Cond: ', event.type(), QtCore.QEvent.Gesture)
if event.type() == QtCore.QEvent.Gesture:
return self.myGestureZoomingFunction(event)
return QtWidgets.QGraphicsView.event(self, event)

def myGestureZoomingFunction(self, event):
# Make your zoom code here
print('Second Cond: ', event.gesture(Qt.PinchGesture))
if event.gesture(Qt.PinchGesture):
gesture = event.gesture(Qt.PinchGesture)
ZoomTo = gesture.scaleFactor()
print('Scale Factor: ', scale)
# scale = scale
self.scale(ZoomTo, ZoomTo) / 60

# accept the event
event.accept()
return True'''

''' def zoomGesture(self)
# We need something to add here. '''


class ZoomStatusWidget(QtWidgets.QWidget):
"""
Expand Down Expand Up @@ -15500,7 +15554,7 @@ def __init__(self):

# set up the window
QtWidgets.QMainWindow.__init__(self, None)
self.setWindowTitle('Reggie Level Editor Next')
self.setWindowTitle('Reggie Next')
self.setWindowIcon(QtGui.QIcon('reggiedata/icon.png'))
self.setIconSize(QtCore.QSize(16, 16))

Expand All @@ -15515,20 +15569,27 @@ def __init__(self):
self.view.XScrollBar.valueChanged.connect(self.XScrollChange)
self.view.YScrollBar.valueChanged.connect(self.YScrollChange)
self.view.FrameSize.connect(self.HandleWindowSizeChange)

#self.view.unifiedTitleAndToolBarOnMac = True
#self.setAttribute(Qt.WA_unifiedTitleAndToolBarOnMac)
#self.view.setAttribute(QWidgets.WA_unifiedTitleAndToolBarOnMac, True)


# make a 'ribbon' placeholder
self.ribbon = None

# done creating the window!
self.setCentralWidget(self.view)

# self.view.setAttribute(Qt.WA_TranslucentBackground, True)
#self.setAttribute(Qt.WA_TranslucentBackground, True)

# set up the clipboard stuff
self.clipboard = None
self.systemClipboard = QtWidgets.QApplication.clipboard()
self.systemClipboard.dataChanged.connect(self.TrackClipboardUpdates)

# we might have something there already, activate Paste if so
self.TrackClipboardUpdates()
# self.grabGesture(Qt.PinchGesture)


def __init2__(self):
Expand Down Expand Up @@ -15596,6 +15657,11 @@ def SetupActionsAndMenus(self):
"""
self.RecentMenu = RecentFilesMenu()
self.GameDefMenu = GameDefMenu()
#self.view.setWindowFlags(Qt.WA_UnifiedTitleAndToolBarOnMac)
#self.setAttribute(Qt.WA_unifiedTitleAndToolBarOnMac, True)
self.setUnifiedTitleAndToolBarOnMac(True)
#self.setAttribute(Qt.WA_MacBrushedMetal, True)


self.ribbon = None
if UseRibbon:
Expand Down Expand Up @@ -15666,7 +15732,7 @@ def createMenubar(self):
self.CreateAction('showcomments', self.HandleCommentsVisibility, GetIcon('comments'), trans.stringOneLine('MenuItems', 116), trans.stringOneLine('MenuItems', 117), QtGui.QKeySequence('Ctrl+0'), True)
self.CreateAction('grid', self.HandleSwitchGrid, GetIcon('grid'), trans.stringOneLine('MenuItems', 60), trans.stringOneLine('MenuItems', 61), QtGui.QKeySequence('Ctrl+G'), False)
self.CreateAction('zoommax', self.HandleZoomMax, GetIcon('zoommax'), trans.stringOneLine('MenuItems', 62), trans.stringOneLine('MenuItems', 63), QtGui.QKeySequence('Ctrl+PgDown'), False)
self.CreateAction('zoomin', self.HandleZoomIn, GetIcon('zoomin'), trans.stringOneLine('MenuItems', 64), trans.stringOneLine('MenuItems', 65), QtGui.QKeySequence.ZoomIn, False)
self.CreateAction('zoomin', self.HandleZoomIn, GetIcon('zoomin'), trans.stringOneLine('MenuItems', 64), trans.stringOneLine('MenuItems', 65), Qt.PinchGesture, True) #QGesture.PinchGesture
self.CreateAction('zoomactual', self.HandleZoomActual, GetIcon('zoomactual'), trans.stringOneLine('MenuItems', 66), trans.stringOneLine('MenuItems', 67), QtGui.QKeySequence('Ctrl+0'), False)
self.CreateAction('zoomout', self.HandleZoomOut, GetIcon('zoomout'), trans.stringOneLine('MenuItems', 68), trans.stringOneLine('MenuItems', 69), QtGui.QKeySequence.ZoomOut, False)
self.CreateAction('zoommin', self.HandleZoomMin, GetIcon('zoommin'), trans.stringOneLine('MenuItems', 70), trans.stringOneLine('MenuItems', 71), QtGui.QKeySequence('Ctrl+PgUp'), False)
Expand Down Expand Up @@ -17852,6 +17918,28 @@ def HandleZoomOut(self):
if zi >= 0:
self.ZoomTo(self.ZoomLevels[zi])

#Gesture for Zoom
#def event(self, event, level):
#print('First Cond: ', event.type(), QtCore.QEvent.Gesture)
#if event.type() == QtCore.QEvent.Gesture:
#return self.myGestureZoomingFunction(event)
#return self.handleZoomIn(self, event)

#def myGestureZoomingFunction(self, event):
# Make your zoom code here
#print('Second Cond: ', event.gesture(Qt.PinchGesture))
#if event.gesture(Qt.PinchGesture):
#gesture = event.gesture(Qt.PinchGesture)
#ZoomTo = gesture.scaleFactor()
#print('Scale Factor: ', scale)
# scale = scale
#self.zoomLevel(zoomLevel, zoomLevel)


# accept the event
# event.accept()
#return True


@QtCore.pyqtSlot()
def HandleZoomActual(self):
Expand Down Expand Up @@ -17884,6 +17972,22 @@ def ZoomTo(self, z):
self.ZoomLevel = z
self.view.setTransform(tr)
self.levelOverview.mainWindowScale = z/100.0

'''def event(self, event, level):
print('First Cond: ', event.type(), QtCore.QEvent.Gesture)
if event.type() == QtCore.QEvent.Gesture:
return self.myGestureZoomingFunction(event)
return self.handleZoomIn(self, event)
if event.Gesture(Qt.PinchGesture):
gesture = event.gesture(Qt.PinchGesture)
ZoomTo = gesture.scaleFactor()
print('Scale Factor: ', scale)
self.zoomLevel(zoomLevel, zoomLevel)

# accept the event
event.accept()
return True'''


zi = self.ZoomLevels.index(z)
if UseRibbon:
Expand Down Expand Up @@ -19524,7 +19628,7 @@ def main():
setSetting('GamePath', path)
break

# Check to see if we have anything saved
# check to see if we have anything saved
autofile = setting('AutoSaveFilePath')
if autofile is not None:
autofiledata = setting('AutoSaveFileData', 'x')
Expand Down
Binary file added reggiedata/old splash stuff/ oldesplash.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added reggiedata/old splash stuff/splash_meter_l.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added reggiedata/old splash stuff/splash_meter_m.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added reggiedata/old splash stuff/splash_meter_r.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified reggiedata/splash.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
33 changes: 18 additions & 15 deletions reggiedata/splash_config.txt
Original file line number Diff line number Diff line change
@@ -1,25 +1,28 @@
Base_Image:splash.png
Version_Font:Segoe UI Semibold
Version_Font:Microsoft New Tai Lue
Version_Font_Bold:True
Version_Font_Color:4C0000
Version_Font_Size:14
Version_Position:800,223
Version_Font_Color:ff0000
Version_Font_Size:30
Version_Position:881,250
Version_Centered:True
Loading_Font:Segoe UI Semibold
Loading_Font_Bold:True
Loading_Font_Color:4C0000
Loading_Font_Size:26
Loading_Position:315,252
Version_Font_Weight:60
Loading_Font:Segoe UI
Loading_Font_Bold:False
Loading_Font_Color:FF0000
Loading_Font_Size:24
Loading_Position:160,320
Loading_Centered:False
Copyright_Font:Segoe UI Semibold
Loading_Font_Weight:25
Copyright_Font:Segoe UI
Copyright_Font_Bold:True
Copyright_Font_Color:FF0000
Copyright_Font_Size:8
Copyright_Position:325,310
Copyright_Font_Size:14
Copyright_Position:159,360
Copyright_Centered:False
Copyright_Wrap_Limit:490
Copyright_Wrap_Limit:700
Copyright_Font_Weight:20
Meter_Left:splash_meter_l.png
Meter_Mid:splash_meter_m.png
Meter_Right:splash_meter_r.png
Meter_Position:670,265
Meter_Width:161
Meter_Position:245,531
Meter_Width:803
Binary file modified reggiedata/splash_meter_l.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified reggiedata/splash_meter_m.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified reggiedata/splash_meter_r.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added reggiedata/themes/Cavern/icolg/icon-area.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added reggiedata/themes/Cavern/icosm/icon-events.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 11 additions & 0 deletions reggiedata/themes/Cavern/levelview.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0"?>
<colors>
<color id="bg" value="#14143C" />
<color id="grid" value="#FFFFFF41" />
<color id="ribbon" value="#1E1E50" />
<color id="spritebox_fill" value="#9A3AFF78" />
<color id="spritebox_fill_s" value="#9A3AFFF0" />
<color id="ui" value="#323241" />
<color id="watermark" value="#FFFFFF30" />
<color id="zone_text" value="#F5F5F5" />
</colors>
16 changes: 16 additions & 0 deletions reggiedata/themes/Cavern/main.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?xml version="1.0"?>
<theme
format="1.0"
name="Cavern"
creator="RoadrunnerWMC"
version="1.0"
description="This theme can help you visualize underground levels."
style="Fusion"
>

<colors file="levelview.xml" />
<stylesheet file="ui.css" />
<icons size="sm" folder="icosm" />
<icons size="lg" folder="icolg" />

</theme>
3 changes: 3 additions & 0 deletions reggiedata/themes/Cavern/ui.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
QCheckBox {
color: red;
}
Binary file added reggiedata/themes/Dark.rt
Binary file not shown.
Binary file added reggiedata/themes/RVLutionRed.rt
Binary file not shown.
4 changes: 2 additions & 2 deletions spritelib.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ def GetImg(imgname, image=False):
imgname = str(imgname)

# Try to find the best path
path = 'reggiedata/sprites/' + imgname
path = '../../../reggiedata/sprites/' + imgname

for folder in reversed(SpritesFolders): # find the most recent copy
tryPath = folder + '/' + imgname
Expand Down Expand Up @@ -121,7 +121,7 @@ def LoadBasicSuite():
ImageCache['Blocks'] = Blocks

# Load the overrides
Overrides = QtGui.QPixmap('reggiedata/overrides.png')
Overrides = QtGui.QPixmap('../../../reggiedata/overrides.png')
Blocks = []
x = Overrides.width() // 24
y = Overrides.height() // 24
Expand Down