About update

Main Menu UI fix
fix windows filesystem for maps
This commit is contained in:
Balkron
2020-11-05 22:17:04 +05:00
parent 2395ce5522
commit 12ba0625d8
4 changed files with 301 additions and 25 deletions

View File

@@ -394,7 +394,7 @@ void MapCreationWizard::saveCurrentEntry()
QSettings settings;
auto project_path = boost::filesystem::path (settings.value ("project/path").toString().toStdString());
QDir dir((project_path / "/world/maps/" / map_internal_name).c_str());
QDir dir((project_path / "/world/maps/" / map_internal_name).string().c_str());
if (!dir.exists())
dir.mkpath(".");

View File

@@ -1,13 +1,10 @@
// This file is part of Noggit3, licensed under GNU General Public License (version 3).
#include <noggit/ui/About.h>
#include <noggit/TextureManager.h>
#include "revision.h"
#include <QIcon>
#include <QtWidgets/QLabel>
#include <QtWidgets/QVBoxLayout>
#include <Ui_About.h>
namespace noggit
{
@@ -16,26 +13,12 @@ namespace noggit
about::about(QWidget* parent)
: QDialog(parent)
{
setWindowIcon(QIcon(":/icon"));
setWindowTitle("About");
new QHBoxLayout (this);
auto icon (new QLabel (this));
auto pixmap = QPixmap::fromImage(QImage(":/icon"));
icon->setPixmap(pixmap.scaled(128,128));
layout()->addWidget (icon);
layout()->addWidget (new QLabel ("Noggit Studio Red", this));
layout()->addWidget (new QLabel ("WoW map editor for 3.3.5a", this));
layout()->addWidget (new QLabel ("Ufoz [...], Cryect, Beket, Schlumpf, "
"Tigurius, Steff, Garthog, Glararan, Cromon, "
"Hanfer, Skarn, AxelSheva, Valium, Kaev, "
"Adspartan", this));
layout()->addWidget (new QLabel ("World of Warcraft is (C) Blizzard Entertainment", this));
layout()->addWidget (new QLabel (STRPRODUCTVER, this));
layout()->addWidget (new QLabel (__DATE__ ", " __TIME__, this));
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
Ui::About AboutUi;
AboutUi.setupUi(this);
AboutUi.version->setText("v. " STRPRODUCTVER);
AboutUi.build_date->setText("build date: " __DATE__ ", " __TIME__);
}
}
}

292
src/noggit/ui/About.ui Normal file
View File

@@ -0,0 +1,292 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>About</class>
<widget class="QWidget" name="About">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>500</width>
<height>225</height>
</rect>
</property>
<property name="font">
<font>
<pointsize>8</pointsize>
<weight>50</weight>
<bold>false</bold>
</font>
</property>
<property name="windowTitle">
<string>About</string>
</property>
<property name="windowIcon">
<iconset>
<normalon>:/icon</normalon>
</iconset>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<property name="leftMargin">
<number>30</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QLabel" name="label">
<property name="maximumSize">
<size>
<width>150</width>
<height>150</height>
</size>
</property>
<property name="text">
<string/>
</property>
<property name="pixmap">
<pixmap resource="../../../resources/resources.qrc">:/icon</pixmap>
</property>
<property name="scaledContents">
<bool>true</bool>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item>
<layout class="QVBoxLayout" name="verticalLayout">
<property name="spacing">
<number>0</number>
</property>
<property name="leftMargin">
<number>15</number>
</property>
<property name="topMargin">
<number>15</number>
</property>
<property name="rightMargin">
<number>15</number>
</property>
<property name="bottomMargin">
<number>15</number>
</property>
<item>
<widget class="QLabel" name="label_2">
<property name="minimumSize">
<size>
<width>0</width>
<height>18</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>16777215</height>
</size>
</property>
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text">
<string>Noggit Studio Red</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
<property name="margin">
<number>0</number>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_3">
<property name="minimumSize">
<size>
<width>0</width>
<height>18</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>16777215</height>
</size>
</property>
<property name="font">
<font>
<weight>50</weight>
<bold>false</bold>
<underline>false</underline>
<stylestrategy>PreferDefault</stylestrategy>
<kerning>true</kerning>
</font>
</property>
<property name="autoFillBackground">
<bool>false</bool>
</property>
<property name="text">
<string>WoW map editor for 3.3.5a</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_8">
<property name="minimumSize">
<size>
<width>0</width>
<height>18</height>
</size>
</property>
<property name="text">
<string/>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_4">
<property name="minimumSize">
<size>
<width>0</width>
<height>18</height>
</size>
</property>
<property name="text">
<string>Ufoz [...], Cryect, Beket, Schlumpf,</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_5">
<property name="minimumSize">
<size>
<width>0</width>
<height>18</height>
</size>
</property>
<property name="text">
<string>Tigurius, Steff, Garthog, Glararan, Cromon,</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_6">
<property name="minimumSize">
<size>
<width>0</width>
<height>18</height>
</size>
</property>
<property name="text">
<string>Hanfer, Skarn, AxelSheva, Valium, Kaev, Adspartan</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_9">
<property name="minimumSize">
<size>
<width>0</width>
<height>18</height>
</size>
</property>
<property name="text">
<string/>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_7">
<property name="minimumSize">
<size>
<width>0</width>
<height>18</height>
</size>
</property>
<property name="text">
<string>World of Warcraft is (C) Blizzard Entertainment</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_10">
<property name="minimumSize">
<size>
<width>0</width>
<height>18</height>
</size>
</property>
<property name="text">
<string/>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="version">
<property name="minimumSize">
<size>
<width>0</width>
<height>18</height>
</size>
</property>
<property name="text">
<string>v. </string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="build_date">
<property name="minimumSize">
<size>
<width>0</width>
<height>18</height>
</size>
</property>
<property name="text">
<string>build date: </string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</item>
</layout>
</widget>
<resources>
<include location="../../../resources/resources.qrc"/>
</resources>
<connections/>
</ui>

View File

@@ -313,6 +313,7 @@ namespace noggit
minimap_holder_layout->addWidget(_minimap);
minimap_holder_layout->setAlignment(Qt::AlignCenter);
right_side->addTab(minimap_holder, "Enter map");
minimap_holder->setAccessibleName("main_menu_minimap_holder");
if (_map_creation_wizard)
{