Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Redesign Connections tab #602

Merged
merged 34 commits into from
Aug 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
db35ec2
Initial connections tab UI redesign
GriffinRichards Jun 26, 2024
391285a
Add buttons to open Dive/Emerge maps
GriffinRichards Jun 29, 2024
2fa3a9b
Connection reorganization
GriffinRichards Jul 1, 2024
1f78fb9
Remove strict offset limitations
GriffinRichards Jul 1, 2024
367198f
Sync changes between connection list and map
GriffinRichards Jul 2, 2024
6b0034e
Fix border visibility in API
GriffinRichards Jul 3, 2024
0aa7ddf
Add tab enums
GriffinRichards Jul 3, 2024
7c6b33d
Add selection highlight to connections list
GriffinRichards Jul 3, 2024
f1cfc3c
Connections tab UI adjustments
GriffinRichards Jul 8, 2024
1e09d08
Reimplement connection mirroring
GriffinRichards Jul 8, 2024
96b5fb1
Performance & bug clean up
GriffinRichards Jul 12, 2024
9ca5f6b
More map connection bug fixes
GriffinRichards Jul 18, 2024
3bf237f
Merge branch 'master' of https://github.com/huderlem/porymap into con…
GriffinRichards Jul 24, 2024
c8434c8
Clean up project close for connections tab
GriffinRichards Jul 24, 2024
13252f9
Add dive/emerge map overlay
GriffinRichards Jul 24, 2024
a07517b
Preserve selection when deleting connections
GriffinRichards Jul 25, 2024
2bb01a9
Add dive map toggle under View
GriffinRichards Jul 25, 2024
7eb3c17
Some connection TODO cleanup
GriffinRichards Aug 4, 2024
4e04e57
MapConnection to QObject
GriffinRichards Aug 4, 2024
b5c7f9f
Save mirroring in config
GriffinRichards Aug 4, 2024
4af1c4d
Take advantage of MapConnection as QObject
GriffinRichards Aug 4, 2024
edb4a67
Simplify map list icon updating
GriffinRichards Aug 8, 2024
6fbc6d8
Prompt for new map connections
GriffinRichards Aug 9, 2024
1686167
Fix more minor map connection issues
GriffinRichards Aug 9, 2024
7c73161
Merge branch 'master' of https://github.com/huderlem/porymap into con…
GriffinRichards Aug 14, 2024
63b77a1
Ignore scrolling for connection map combo boxes
GriffinRichards Aug 14, 2024
0b800c1
Skip unnecessary dive map rendering, fix rendering small connections
GriffinRichards Aug 14, 2024
cbd75dc
Map connection edit history
GriffinRichards Aug 15, 2024
186e201
Merge branch 'master' into connections
GriffinRichards Aug 19, 2024
7a0ae53
Final MapConnection UI updates
GriffinRichards Aug 19, 2024
f70e77a
Final MapConnection testing fixes
GriffinRichards Aug 20, 2024
9927d66
Update changelog and manual
GriffinRichards Aug 20, 2024
d154f47
Fix 'Dynamic' typo
GriffinRichards Aug 20, 2024
4f4e810
Merge branch 'master' into connections
GriffinRichards Aug 21, 2024
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
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,14 @@ The **"Breaking Changes"** listed below are changes that have been made in the d

## [Unreleased]
### Added
- Redesigned the Connections tab, adding a number of new features including the option to open or display diving maps and a list UI for easier edit access.
- Add a `Close Project` option
- An alert will be displayed when attempting to open a seemingly invalid project.

### Changed
- Edits to map connections now have Undo/Redo and can be viewed in exported timelapses.
- Changes to the "Mirror to Connecting Maps" setting will now be saved between sessions.
- A notice will be displayed when attempting to open the "Dynamic" map, rather than nothing happening.
- The base game version is now auto-detected if the project name contains only one of "emerald", "firered/leafgreen", or "ruby/sapphire".
- It's now possible to cancel quitting if there are unsaved changes in sub-windows.

Expand All @@ -25,6 +29,13 @@ The **"Breaking Changes"** listed below are changes that have been made in the d
- Fix selections with multiple Events not always clearing when making a new selection.
- Fix `About porymap` opening a new window each time it's activated.
- Fix the `Edit History` window not raising to the front when reactivated.
- New maps are now always inserted in map dropdowns at the correct position, rather than at the bottom of the list until the project is reloaded.
- Fix changes to map connections not marking connected maps as unsaved.
- Fix numerous issues related to connecting a map to itself.
- Fix incorrect map connections getting selected when opening a map by double-clicking a map connection.
- Fix a visual issue when quickly dragging map connections around.
- Fix map connections rendering incorrectly if their direction name was unknown.
- Fix map connections rendering incorrectly if their dimensions were smaller than the border draw distance.

## [5.4.1] - 2024-03-21
### Fixed
Expand Down
21 changes: 13 additions & 8 deletions docsrc/manual/editing-map-connections.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,35 +2,40 @@
Editing Map Connections
***********************

Maps can be connected together so that the player can seamlessly walk between them. These connections can be edited in the Connections tab.
Maps can be connected together so that the player can seamlessly walk between them. These connections can be edited in the Connections tab.

.. figure:: images/editing-map-connections/map-connections.png
:alt: Map Connections View

Map Connections View

A connection has a direction, offset, and destination map. To add new connection, press the plus button |add-connection-button|. To delete a connection, select it and press the delete button |remove-connection-button|.
A connection has a direction, offset, and destination map. To add a new connection, press the |add-connection-button| button. To delete a connection you can either press the |remove-connection-button| button on its entry in the list, or select the connection and press the delete key.

The |open-connection-button| button will open the destination map. You may also open the destination map by double-clicking the connection itself (this can be done from the ``Map`` and ``Events`` tabs as well).

.. |add-connection-button|
image:: images/editing-map-connections/add-connection-button.png
:height: 24

.. |remove-connection-button|
image:: images/editing-map-connections/remove-connection-button.png
:height: 24

.. |open-connection-button|
image:: images/editing-map-connections/open-connection-button.png
:height: 24

To change the connection's vertical or horizontal offset, it's easiest to click and drag the connection to the desired offset.

Dive & Emerge Warps
-------------------

Dive & emerge warps are used for the HM move Dive. They don't have offsets or directions--only a destination map. To add a dive or emerge warp, simply add a value in the Dive Map and/or Emerge Map dropdown menus.
Dive & emerge warps are used for the HM move Dive. They don't have offsets or directions--only a destination map. To add a dive or emerge warp, simply add a value in the Dive Map and/or Emerge Map dropdown menus.

You can select the ``Show Emerge/Dive Maps`` checkbox to view your connected dive/emerge maps overlaid on the current map. The slider will change the opacity of this overlay. If you have both an emerge and a dive map connected you will see two sliders; the top slider is for the emerge map's opacity, and the bottom slider is for the dive map's opacity.


Mirror Connections
------------------

An extremely useful feature is the *Mirror to Connecting Maps* checkbox in the top-right corner. Connections are one-way, which means that you must keep the two connections in sync between the two maps. For example, Petalburg City has a west connection to Route 104, and Route 104 has an east connection to Petalburg City. If *Mirror to Connecting Maps* is enabled, then Porymap will automatically update both sides of the connection. Be sure to *File -> Save All* (``Ctrl+Shift+S``) when saving, since you will need to save both maps' connections.

Follow Connections
------------------

Double-clicking on a connection will open the destination map. This is very useful for navigating through your maps, similar to double-clicking on :ref:`Warp Events <event-warps>`.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
132 changes: 132 additions & 0 deletions forms/connectionslistitem.ui
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>ConnectionsListItem</class>
<widget class="QFrame" name="ConnectionsListItem">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>178</width>
<height>157</height>
</rect>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="styleSheet">
<string notr="true">.ConnectionsListItem { border-width: 1px; }</string>
</property>
<property name="frameShape">
<enum>QFrame::StyledPanel</enum>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
<widget class="QLabel" name="label_Map">
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Map</string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label_Offset">
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Offset</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_Direction">
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Direction</string>
</property>
</widget>
</item>
<item row="3" column="2">
<widget class="QToolButton" name="button_Delete">
<property name="toolTip">
<string>Remove this connection.</string>
</property>
<property name="text">
<string>...</string>
</property>
<property name="icon">
<iconset resource="../resources/images.qrc">
<normaloff>:/icons/delete.ico</normaloff>:/icons/delete.ico</iconset>
</property>
</widget>
</item>
<item row="1" column="1" colspan="2">
<widget class="NoScrollComboBox" name="comboBox_Direction">
<property name="toolTip">
<string>Where the connected map should be positioned relative to the current map.</string>
</property>
</widget>
</item>
<item row="0" column="1" colspan="2">
<widget class="NoScrollComboBox" name="comboBox_Map">
<property name="toolTip">
<string>The name of the map to connect to the current map.</string>
</property>
</widget>
</item>
<item row="2" column="1" colspan="2">
<widget class="NoScrollSpinBox" name="spinBox_Offset">
<property name="toolTip">
<string>The number of spaces to move the connected map perpendicular to its connected direction.</string>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QToolButton" name="button_OpenMap">
<property name="toolTip">
<string>Open the connected map.</string>
</property>
<property name="text">
<string>...</string>
</property>
<property name="icon">
<iconset resource="../resources/images.qrc">
<normaloff>:/icons/map_go.ico</normaloff>:/icons/map_go.ico</iconset>
</property>
</widget>
</item>
</layout>
</widget>
<customwidgets>
<customwidget>
<class>NoScrollComboBox</class>
<extends>QComboBox</extends>
<header>noscrollcombobox.h</header>
</customwidget>
<customwidget>
<class>NoScrollSpinBox</class>
<extends>QSpinBox</extends>
<header>noscrollspinbox.h</header>
</customwidget>
</customwidgets>
<resources>
<include location="../resources/images.qrc"/>
</resources>
<connections/>
</ui>
Loading
Loading