mirror of
https://github.com/huderlem/porymap.git
synced 2026-08-28 11:36:26 -05:00
Merge pull request #456 from GriffinRichards/api-scale
Add scale to API's createImage, add getPorymapVersion
This commit is contained in:
@@ -105,7 +105,7 @@ public:
|
||||
Q_INVOKABLE void addImage(int x, int y, QString filepath, int layer = 0, bool useCache = true);
|
||||
Q_INVOKABLE void createImage(int x, int y, QString filepath,
|
||||
int width = -1, int height = -1, unsigned offset = 0,
|
||||
bool xflip = false, bool yflip = false, int paletteId = -1, bool setTransparency = false,
|
||||
qreal hScale = 1, qreal vScale = 1, int paletteId = -1, bool setTransparency = false,
|
||||
int layer = 0, bool useCache = true);
|
||||
Q_INVOKABLE void addTileImage(int x, int y, int tileId, bool xflip, bool yflip, int paletteId, bool setTransparency = false, int layer = 0);
|
||||
Q_INVOKABLE void addTileImage(int x, int y, QJSValue tileObj, bool setTransparency = false, int layer = 0);
|
||||
@@ -196,6 +196,7 @@ public:
|
||||
Q_INVOKABLE int getNumTilesInMetatile();
|
||||
Q_INVOKABLE int getNumMetatileLayers();
|
||||
Q_INVOKABLE QString getBaseGameVersion();
|
||||
Q_INVOKABLE QJSValue getPorymapVersion();
|
||||
Q_INVOKABLE QList<QString> getCustomScripts();
|
||||
Q_INVOKABLE int getMainTab();
|
||||
Q_INVOKABLE void setMainTab(int index);
|
||||
|
||||
@@ -32,6 +32,7 @@ public:
|
||||
static QJSValue fromBlock(Block block);
|
||||
static QJSValue fromTile(Tile tile);
|
||||
static Tile toTile(QJSValue obj);
|
||||
static QJSValue version(QList<int> versionNums);
|
||||
static QJSValue dimensions(int width, int height);
|
||||
static QJSValue position(int x, int y);
|
||||
static QJSEngine *getEngine();
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
#ifndef ABOUTPORYMAP_H
|
||||
#define ABOUTPORYMAP_H
|
||||
|
||||
#include <QString>
|
||||
#include <QRegularExpression>
|
||||
#include <QMainWindow>
|
||||
|
||||
namespace Ui {
|
||||
@@ -12,6 +14,7 @@ class AboutPorymap : public QMainWindow
|
||||
public:
|
||||
explicit AboutPorymap(QWidget *parent = nullptr);
|
||||
~AboutPorymap();
|
||||
QList<int> getVersionNumbers();
|
||||
private:
|
||||
Ui::AboutPorymap *ui;
|
||||
};
|
||||
|
||||
@@ -95,7 +95,7 @@ public:
|
||||
void clearItems();
|
||||
void addText(QString text, int x, int y, QString color = "#000000", int fontSize = 12);
|
||||
void addRect(int x, int y, int width, int height, QString color = "#000000", bool filled = false);
|
||||
bool addImage(int x, int y, QString filepath, bool useCache = true, int width = -1, int height = -1, unsigned offset = 0, bool xflip = false, bool yflip = false, QList<QRgb> palette = QList<QRgb>(), bool setTransparency = false);
|
||||
bool addImage(int x, int y, QString filepath, bool useCache = true, int width = -1, int height = -1, unsigned offset = 0, qreal hScale = 1, qreal vScale = 1, QList<QRgb> palette = QList<QRgb>(), bool setTransparency = false);
|
||||
bool addImage(int x, int y, QImage image);
|
||||
private:
|
||||
QList<OverlayItem*> items;
|
||||
|
||||
Reference in New Issue
Block a user