mirror of
https://github.com/Pax1601/DCSOlympus.git
synced 2025-10-29 16:56:34 +00:00
Minor bug fixing, added patcher for Export.lua, added plugin options to enable/disable mod
This commit is contained in:
163
mod/Options/options.dlg
Normal file
163
mod/Options/options.dlg
Normal file
@@ -0,0 +1,163 @@
|
||||
|
||||
-- Olympus
|
||||
|
||||
-- Layout
|
||||
|
||||
local TopMargin = 48
|
||||
local LeftMargin = 32
|
||||
local CenterMargin = 80
|
||||
|
||||
local LeftColumnX = LeftMargin
|
||||
local LeftColumnLabelWidth = 232
|
||||
local LeftColumnOptionWidth = 272
|
||||
local LeftColumnWidth = LeftColumnLabelWidth + LeftColumnOptionWidth
|
||||
|
||||
local RightColumnX = LeftColumnX + LeftColumnWidth + CenterMargin
|
||||
local RightColumnLabelWidth = 192
|
||||
local RightColumnOptionWidth = 128
|
||||
local RightColumnWidth = RightColumnLabelWidth + RightColumnOptionWidth
|
||||
|
||||
local LineHeight = 24
|
||||
local TotalLineHeight = LineHeight + 8
|
||||
|
||||
local HelpLineHeight = 16
|
||||
|
||||
-- Styles
|
||||
|
||||
local TitleSkin = {
|
||||
["params"] = {
|
||||
["name"] = "staticOptionsTitleSkin",
|
||||
},
|
||||
["states"] = {
|
||||
["released"] = {
|
||||
[1] = {
|
||||
["text"] = {
|
||||
["horzAlign"] = {
|
||||
["type"] = "min"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
local OptionLabelSkin = {
|
||||
["params"] = {
|
||||
["name"] = "staticOptionsCaptionSkin",
|
||||
}
|
||||
}
|
||||
|
||||
local WarningSkin = {
|
||||
["params"] = {
|
||||
["name"] = "staticOptionsCaptionSkin",
|
||||
},
|
||||
["states"] = {
|
||||
["released"] = {
|
||||
[1] = {
|
||||
["text"] = {
|
||||
["horzAlign"] = {
|
||||
["type"] = "min"
|
||||
},
|
||||
["color"] = "0xEFB441ff",
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
local CheckBoxSkin = {
|
||||
["params"] = {
|
||||
["name"] = "checkBoxSkin_options",
|
||||
}
|
||||
}
|
||||
|
||||
local ComboListSkin = {
|
||||
["params"] = {
|
||||
["name"] = "comboListSkin_options",
|
||||
}
|
||||
}
|
||||
|
||||
local EditBoxSkin = {
|
||||
["params"] = {
|
||||
["name"] = "editBoxSkin_login",
|
||||
}
|
||||
}
|
||||
|
||||
-- Content
|
||||
|
||||
dialog = {
|
||||
["children"] = {
|
||||
["containerPlugin"] = {
|
||||
["children"] = {
|
||||
|
||||
-----------------------------------------------
|
||||
-- [X] Enable Olympus Module
|
||||
-----------------------------------------------
|
||||
|
||||
-- Olympus Module Enabled
|
||||
|
||||
["olympusModuleEnabledCheckbox"] = {
|
||||
["params"] = {
|
||||
["bounds"] = {
|
||||
["x"] = LeftColumnX,
|
||||
["y"] = TopMargin,
|
||||
["w"] = 256,
|
||||
["h"] = LineHeight,
|
||||
},
|
||||
["enabled"] = true,
|
||||
["state"] = false,
|
||||
["text"] = "$Olympus_MODULE_ENABLED_LABEL",
|
||||
["tooltip"] = "",
|
||||
["visible"] = true,
|
||||
["zindex"] = 0,
|
||||
["tabOrder"] = 1,
|
||||
},
|
||||
["skin"] = CheckBoxSkin,
|
||||
["type"] = "CheckBox",
|
||||
},
|
||||
},
|
||||
["params"] = {
|
||||
["bounds"] = {
|
||||
["h"] = 600,
|
||||
["w"] = 974,
|
||||
["x"] = 0,
|
||||
["y"] = 0,
|
||||
},
|
||||
["enabled"] = true,
|
||||
["text"] = "",
|
||||
["tooltip"] = "",
|
||||
["visible"] = true,
|
||||
["zindex"] = 0,
|
||||
},
|
||||
["skin"] = {
|
||||
["params"] = {
|
||||
["name"] = "panelSkin",
|
||||
},
|
||||
},
|
||||
["type"] = "Panel",
|
||||
},
|
||||
},
|
||||
["params"] = {
|
||||
["bounds"] = {
|
||||
["h"] = 851,
|
||||
["w"] = 1135,
|
||||
["x"] = 0,
|
||||
["y"] = 0,
|
||||
},
|
||||
["draggable"] = true,
|
||||
["enabled"] = true,
|
||||
["hasCursor"] = true,
|
||||
["lockFlow"] = false,
|
||||
["modal"] = false,
|
||||
["offscreen"] = false,
|
||||
["resizable"] = false,
|
||||
["text"] = "New dialog",
|
||||
["zOrder"] = 0,
|
||||
},
|
||||
["skin"] = {
|
||||
["params"] = {
|
||||
["name"] = "windowSkin",
|
||||
},
|
||||
},
|
||||
["type"] = "Window",
|
||||
}
|
||||
7
mod/Options/optionsData.lua
Normal file
7
mod/Options/optionsData.lua
Normal file
@@ -0,0 +1,7 @@
|
||||
cdata =
|
||||
{
|
||||
-- Module on/off
|
||||
|
||||
Olympus_MODULE_ENABLED_LABEL = _("Olympus Module Enabled"),
|
||||
|
||||
}
|
||||
60
mod/Options/optionsDb.lua
Normal file
60
mod/Options/optionsDb.lua
Normal file
@@ -0,0 +1,60 @@
|
||||
local DbOption = require("Options.DbOption")
|
||||
local i18n = require('i18n')
|
||||
|
||||
-- Constants
|
||||
|
||||
|
||||
-- Local variables
|
||||
|
||||
local olympusConfigDialog = nil
|
||||
|
||||
-- Update UI
|
||||
|
||||
local function UpdateOptions()
|
||||
|
||||
-- Check parameters
|
||||
|
||||
if olympusConfigDialog == nil then
|
||||
return
|
||||
end
|
||||
|
||||
local moduleEnabled = olympusConfigDialog.olympusModuleEnabledCheckbox:getState()
|
||||
|
||||
end
|
||||
|
||||
-- Callbacks
|
||||
|
||||
local function OnShowDialog(dialogBox)
|
||||
|
||||
-- Setup local variables
|
||||
|
||||
if olympusConfigDialog ~= dialogBox then
|
||||
olympusConfigDialog = dialogBox
|
||||
end
|
||||
|
||||
-- Update dialog box state
|
||||
|
||||
UpdateOptions()
|
||||
|
||||
end
|
||||
|
||||
-- Module on/off
|
||||
|
||||
local olympusModuleEnabled = DbOption.new():setValue(true):checkbox()
|
||||
:callback(function(value)
|
||||
UpdateOptions()
|
||||
end)
|
||||
|
||||
-- Returns dialog box controls and callbacks
|
||||
|
||||
return
|
||||
{
|
||||
-- Events
|
||||
|
||||
callbackOnShowDialog = OnShowDialog,
|
||||
|
||||
-- Module on/off
|
||||
|
||||
olympusModuleEnabled = olympusModuleEnabled,
|
||||
|
||||
}
|
||||
BIN
mod/Theme/icon-38x38.png
Normal file
BIN
mod/Theme/icon-38x38.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.6 KiB |
BIN
mod/Theme/icon.png
Normal file
BIN
mod/Theme/icon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 5.6 KiB |
BIN
mod/Theme/icon_active.png
Normal file
BIN
mod/Theme/icon_active.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 5.1 KiB |
BIN
mod/Theme/icon_select.png
Normal file
BIN
mod/Theme/icon_select.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 5.1 KiB |
42
mod/entry.lua
Normal file
42
mod/entry.lua
Normal file
@@ -0,0 +1,42 @@
|
||||
local self_ID = "DCS-Olympus"
|
||||
|
||||
declare_plugin(self_ID,
|
||||
{
|
||||
image = "Olympus.png",
|
||||
installed = true, -- if false that will be place holder , or advertising
|
||||
dirName = current_mod_path,
|
||||
binaries =
|
||||
{
|
||||
-- 'Olympus',
|
||||
},
|
||||
load_immediately = true,
|
||||
|
||||
displayName = "Olympus",
|
||||
shortName = "Olympus",
|
||||
fileMenuName = "Olympus",
|
||||
|
||||
version = "0.0.7",
|
||||
state = "installed",
|
||||
developerName= "DCS Refugees 767 squadron",
|
||||
info = _("DCS Olympus is a mod for DCS World. It allows users to spawn, control, task, group, and remove units from a DCS World server using a real-time map interface, similarly to Real Time Strategy games. The user interface also provides useful informations units, like loadouts, fuel, tasking, and so on. In the future, more features for DCS World GCI and JTAC will be available."),
|
||||
|
||||
Skins =
|
||||
{
|
||||
{
|
||||
name = "Olympus",
|
||||
dir = "Theme"
|
||||
},
|
||||
},
|
||||
|
||||
Options =
|
||||
{
|
||||
{
|
||||
name = "Olympus",
|
||||
nameId = "Olympus",
|
||||
dir = "Options",
|
||||
CLSID = "{Olympus-options}"
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
plugin_done()
|
||||
Reference in New Issue
Block a user