Skip to content

Commit

Permalink
Merge remote-tracking branch 'remotes/orbweaver/master'
Browse files Browse the repository at this point in the history
# Conflicts:
#	plugins/dm.editing/AIEditingControl.h
#	plugins/dm.gameconnection/GameConnectionControl.h
  • Loading branch information
codereader committed Jan 7, 2024
2 parents 48ec32e + 3e1877a commit 2bb9cce
Show file tree
Hide file tree
Showing 37 changed files with 384 additions and 1,878 deletions.
31 changes: 6 additions & 25 deletions include/iglprogram.h
Expand Up @@ -2,36 +2,17 @@

class Matrix4;

/**
* Representation of a GL vertex/fragment program.
*/
/// Representation of a GL vertex/fragment program.
class GLProgram
{
public:
/**
* Destructor
*/
virtual ~GLProgram() {}
/// Destructor
virtual ~GLProgram() {}

/**
* Create this program using glGenPrograms and siblings. This needs the
* OpenGL system to be initialised so cannot happen in the constructor.
*/
virtual void create() = 0;
/// Bind this program as the currently-operative shader.
virtual void enable() = 0;

/**
* Destroy this program using GL calls.
*/
virtual void destroy() = 0;

/**
* Bind this program as the currently-operative shader.
*/
virtual void enable() = 0;

/**
* Unbind this program from OpenGL.
*/
/// Unbind this program from OpenGL.
virtual void disable() = 0;
};

Expand Down
3 changes: 0 additions & 3 deletions include/irender.h
Expand Up @@ -684,9 +684,6 @@ class RenderSystem
// Returns true if openGL supports ARB or GLSL lighting
virtual bool shaderProgramsAvailable() const = 0;

// Sets the flag whether shader programs are available.
virtual void setShaderProgramsAvailable(bool available) = 0;

// Activates or deactivates the merge render mode
virtual void setMergeModeEnabled(bool enabled) = 0;

Expand Down
9 changes: 6 additions & 3 deletions include/ui/iusercontrol.h
Expand Up @@ -34,9 +34,12 @@ class IUserControlCreator
// Optional icon file name to use for tab captions, e.g. "icon_texture.png"
virtual std::string getIcon() { return {}; }

// Creates a new wxWidget window for packing into a dialog or sizer
// Widget ownership is transferred to the caller, IUserControl implementations
// will not delete the returned window
/**
* @brief Create a new wxWidget window for packing into a dialog or sizer.
*
* Widget ownership is transferred to the caller, IUserControlCreator implementations
* will not delete the returned window.
*/
virtual wxWindow* createWidget(wxWindow* parent) = 0;
};

Expand Down
1,223 changes: 5 additions & 1,218 deletions install/ui/overlaydialog.fbp

Large diffs are not rendered by default.

207 changes: 2 additions & 205 deletions install/ui/overlaydialog.xrc
Expand Up @@ -2,7 +2,7 @@
<resource xmlns="http://www.wxwindows.org/wxxrc" version="2.3.0.1">
<object class="wxPanel" name="OverlayDialogMainPanel">
<style>wxTAB_TRAVERSAL</style>
<size>500,331</size>
<size>552,556</size>
<object class="wxBoxSizer">
<orient>wxVERTICAL</orient>
<object class="sizeritem">
Expand All @@ -21,215 +21,12 @@
<object class="wxPanel" name="OverlayDialogControlPanel">
<style>wxTAB_TRAVERSAL</style>
<object class="wxFlexGridSizer">
<rows>6</rows>
<rows>0</rows>
<cols>2</cols>
<vgap>6</vgap>
<hgap>6</hgap>
<growablecols>1</growablecols>
<growablerows></growablerows>
<object class="sizeritem">
<option>0</option>
<flag>wxALIGN_CENTER_VERTICAL|wxALL</flag>
<border>5</border>
<object class="wxStaticText" name="OverlayDialogLabelFile">
<label>Image file</label>
<wrap>-1</wrap>
</object>
</object>
<object class="sizeritem">
<option>0</option>
<flag>wxALL|wxEXPAND</flag>
<border>5</border>
<object class="wxFilePickerCtrl" name="OverlayDialogFilePicker">
<value></value>
<message>Select a file</message>
<wildcard>*.*</wildcard>
<style>wxFLP_DEFAULT_STYLE|wxFLP_OPEN</style>
</object>
</object>
<object class="sizeritem">
<option>0</option>
<flag>wxALIGN_CENTER_VERTICAL|wxALL</flag>
<border>5</border>
<object class="wxStaticText" name="OverlayDialogLabelTrans">
<label>Transparency</label>
<wrap>-1</wrap>
</object>
</object>
<object class="sizeritem">
<option>1</option>
<flag>wxEXPAND</flag>
<border>5</border>
<object class="wxBoxSizer">
<orient>wxHORIZONTAL</orient>
<object class="sizeritem">
<option>0</option>
<flag>wxALIGN_CENTER_VERTICAL|wxLEFT</flag>
<border>6</border>
<object class="wxStaticText" name="m_staticText8">
<label>transparent</label>
<wrap>-1</wrap>
</object>
</object>
<object class="sizeritem">
<option>1</option>
<flag>wxEXPAND|wxTOP</flag>
<border>3</border>
<object class="wxSlider" name="OverlayDialogTransparencySlider">
<style>wxSL_HORIZONTAL</style>
<value>50</value>
<min>0</min>
<max>100</max>
</object>
</object>
<object class="sizeritem">
<option>0</option>
<flag>wxALIGN_CENTER_VERTICAL|wxRIGHT</flag>
<border>12</border>
<object class="wxStaticText" name="m_staticText81">
<label>opaque</label>
<wrap>-1</wrap>
</object>
</object>
</object>
</object>
<object class="sizeritem">
<option>0</option>
<flag>wxALL</flag>
<border>5</border>
<object class="wxStaticText" name="OverlayDialogLabelScale">
<label>Image scale</label>
<wrap>-1</wrap>
</object>
</object>
<object class="sizeritem">
<option>1</option>
<flag>wxEXPAND | wxALL</flag>
<border>0</border>
<object class="wxPanel" name="OverlayDialogScalePanel">
<style>wxTAB_TRAVERSAL</style>
<object class="wxBoxSizer">
<orient>wxHORIZONTAL</orient>
<object class="sizeritem">
<option>1</option>
<flag>wxTOP</flag>
<border>3</border>
<object class="wxSlider" name="OverlayDialogScaleSlider">
<style>wxSL_HORIZONTAL</style>
<value>100</value>
<min>0</min>
<max>2000</max>
</object>
</object>
</object>
</object>
</object>
<object class="sizeritem">
<option>0</option>
<flag>wxALL</flag>
<border>5</border>
<object class="wxStaticText" name="OverlayDialogLabelHOffset">
<label>Horizontal offset</label>
<wrap>-1</wrap>
</object>
</object>
<object class="sizeritem">
<option>1</option>
<flag>wxEXPAND | wxALL</flag>
<border>0</border>
<object class="wxPanel" name="OverlayDialogHorizOffsetPanel">
<style>wxTAB_TRAVERSAL</style>
<object class="wxBoxSizer">
<orient>wxHORIZONTAL</orient>
<object class="sizeritem">
<option>1</option>
<flag>wxTOP</flag>
<border>3</border>
<object class="wxSlider" name="OverlayDialogHorizOffsetSlider">
<style>wxSL_HORIZONTAL</style>
<value>0</value>
<min>-2000</min>
<max>2000</max>
</object>
</object>
</object>
</object>
</object>
<object class="sizeritem">
<option>0</option>
<flag>wxALL</flag>
<border>5</border>
<object class="wxStaticText" name="OverlayDialogLabelVOffset">
<label>Vertical offset</label>
<wrap>-1</wrap>
</object>
</object>
<object class="sizeritem">
<option>1</option>
<flag>wxEXPAND | wxALL</flag>
<border>0</border>
<object class="wxPanel" name="OverlayDialogVertOffsetPanel">
<style>wxTAB_TRAVERSAL</style>
<object class="wxBoxSizer">
<orient>wxHORIZONTAL</orient>
<object class="sizeritem">
<option>1</option>
<flag>wxTOP</flag>
<border>3</border>
<object class="wxSlider" name="OverlayDialogVertOffsetSlider">
<style>wxSL_HORIZONTAL</style>
<value>0</value>
<min>-2000</min>
<max>2000</max>
</object>
</object>
</object>
</object>
</object>
<object class="sizeritem">
<option>0</option>
<flag>wxALL</flag>
<border>5</border>
<object class="wxStaticText" name="OverlayDialogLabelOptions">
<label>Options</label>
<wrap>-1</wrap>
</object>
</object>
<object class="sizeritem">
<option>1</option>
<flag>wxEXPAND</flag>
<border>0</border>
<object class="wxBoxSizer">
<orient>wxVERTICAL</orient>
<object class="sizeritem">
<option>0</option>
<flag>wxALL</flag>
<border>6</border>
<object class="wxCheckBox" name="OverlayDialogKeepAspect">
<label>Keep aspect ratio</label>
<checked>0</checked>
</object>
</object>
<object class="sizeritem">
<option>0</option>
<flag>wxALL</flag>
<border>6</border>
<object class="wxCheckBox" name="OverlayDialogZoomWithViewport">
<label>Zoom image with viewport</label>
<checked>0</checked>
</object>
</object>
<object class="sizeritem">
<option>0</option>
<flag>wxALL</flag>
<border>6</border>
<object class="wxCheckBox" name="OverlayDialogPanWithViewport">
<label>Pan image with viewport</label>
<checked>0</checked>
</object>
</object>
</object>
</object>
</object>
</object>
</object>
Expand Down
1 change: 1 addition & 0 deletions libs/command/ExecutionNotPossible.h
@@ -1,6 +1,7 @@
#pragma once

#include <stdexcept>
#include <functional>
#include "ExecutionFailure.h"

namespace cmd
Expand Down
7 changes: 7 additions & 0 deletions libs/registry/registry.h
Expand Up @@ -43,6 +43,13 @@ inline std::string combinePath(std::string basePath, const std::string& subPath)
return string::ends_with(basePath, "/") ? basePath + subPath : basePath + "/" + subPath;
}

/// Connect a callback to be notified when a particular key changes
inline sigc::signal<void>::iterator connect(const std::string& key,
sigc::signal<void>::slot_type&& slot)
{
return GlobalRegistry().signalForKey(key).connect(slot);
}

/**
* \brief
* Scoped sentry object which sets a registry key to a temporary value for its
Expand Down
10 changes: 2 additions & 8 deletions libs/util/ScopedBoolLock.h
Expand Up @@ -13,18 +13,12 @@ class ScopedBoolLock
public:

/// Construct and set target to true
ScopedBoolLock(bool& target) :
_target(target),
_previousValue(target)
{
ScopedBoolLock(bool& target): _target(target), _previousValue(target) {
_target = true;
}

/// Destroy and set target to the previous value
~ScopedBoolLock()
{
_target = _previousValue;
}
~ScopedBoolLock() { _target = _previousValue; }
};

}
3 changes: 1 addition & 2 deletions plugins/dm.editing/AIEditingControl.h
Expand Up @@ -7,8 +7,7 @@
namespace ui
{

class AIEditingControl :
public IUserControlCreator
class AIEditingControl: public IUserControlCreator
{
public:
constexpr static const char* const Name = "AIEditingPanel";
Expand Down
3 changes: 1 addition & 2 deletions plugins/dm.gameconnection/GameConnectionControl.h
Expand Up @@ -7,8 +7,7 @@
namespace ui
{

class GameConnectionControl :
public IUserControlCreator
class GameConnectionControl: public IUserControlCreator
{
public:
constexpr static const char* Name = "GameConnectionPanel";
Expand Down

0 comments on commit 2bb9cce

Please sign in to comment.