Added New Mods; Swapped Mods and Removed Some
Removed EGUI in favor of UI Rework by Sota Added in GTR Optimized for higher res textures, over Zone Reality Remade and removed all files that conflicted from ZRR to save storage space.
This commit is contained in:
+25
@@ -0,0 +1,25 @@
|
||||
|
||||
<!-- ENHANCED GUI © 2007 INCBOX INC TEAM -->
|
||||
|
||||
<w>
|
||||
<file name="ui\ui_actor_main_menu">
|
||||
<texture id="ui_inGame2_background" x="0" y="0" width="1024" height="768" />
|
||||
<texture id="ui_inGame2_slider" x="5" y="773" width="274" height="61" />
|
||||
</file>
|
||||
<file name="ui\ui_actor_dialog_screen">
|
||||
<texture id="ui_main_menu_panel" x="624" y="12" width="" height="" />
|
||||
</file>
|
||||
<file name="ui\ui_actor_staff_background">
|
||||
<texture id="ui_credits_background" x="0" y="0" width="1024" height="768" />
|
||||
</file>
|
||||
<file name="ui\ui_actor_widescreen_sidepanels">
|
||||
<texture id="ui_inGame2_left_widepanel" x="256" y="0" width="128" height="768" />
|
||||
<texture id="ui_inGame2_right_widepanel" x="384" y="0" width="128" height="768" />
|
||||
</file>
|
||||
<file name="ui\ui_actor_widescreen_sidepanels_1">
|
||||
<texture id="ui_credits_left_widepanel" x="0" y="0" width="128" height="768" />
|
||||
<texture id="ui_credits_right_widepanel" x="128" y="0" width="128" height="768" />
|
||||
<texture id="ui_inGame2_screen_2" x="290" y="435" width="624" height="411" />
|
||||
<texture id="ui_inGame2_screen_4" x="290" y="3" width="624" height="411" />
|
||||
</file>
|
||||
</w>
|
||||
@@ -0,0 +1,144 @@
|
||||
|
||||
<!-- ENHANCED GUI © 2007 INCBOX INC TEAM -->
|
||||
|
||||
<w>
|
||||
<background x="0" y="0" width="1024" height="768">
|
||||
<auto_static x="0" y="0" width="1024" height="768" stretch="1">
|
||||
<texture x="0" y="0" width="1920" height="1080">ui\Zaper_Background</texture>
|
||||
</auto_static>
|
||||
<auto_static x="0" y="0" width="1024" height="768" stretch="1">
|
||||
<texture>ui\enhancedGUI\ui_inc_overlay_shadow</texture>
|
||||
</auto_static>
|
||||
<auto_static x="-145" y="700" width="512" height="26" stretch="1">
|
||||
<texture>ui\enhancedGUI\ui_inc_version</texture>
|
||||
</auto_static>
|
||||
<auto_static x="0" y="0" width="0" height="0" stretch="1">
|
||||
<texture>ui\enhancedGUI\ui_inc_panel</texture>
|
||||
</auto_static>
|
||||
<auto_static x="0" y="717" width="1024" height="52" stretch="1">
|
||||
<texture>ui\enhancedGUI\ui_inc_bottom</texture>
|
||||
</auto_static>
|
||||
<auto_static x="375" y="200" width="278.4" height="128" stretch="1">
|
||||
<texture>logoSTALKER</texture>
|
||||
</auto_static>
|
||||
<auto_static x="886" y="732" width="35" height="28" stretch="1">
|
||||
<texture>logoMODDB</texture>
|
||||
</auto_static>
|
||||
<auto_static x="935" y="732" width="35" height="28" stretch="1">
|
||||
<texture>logoGSC</texture>
|
||||
</auto_static>
|
||||
<auto_static x="978" y="732" width="35" height="28" stretch="1">
|
||||
<texture>logoINC</texture>
|
||||
</auto_static>
|
||||
<auto_static x="835" y="713" width="40" height="57" stretch="1">
|
||||
<texture>logo_AMCM</texture>
|
||||
</auto_static>
|
||||
<!-- <auto_static x="930" y="590" width="94" height="134" stretch="1">
|
||||
<texture>logoAMCM</texture>
|
||||
</auto_static> -->
|
||||
</background>
|
||||
|
||||
<shniaga_wnd x="365" y="320" width="392" height="450">
|
||||
<buttons_region x="37" y="4" width="220" height="380" always_show_scroll="false" vert_interval="4"/>
|
||||
<shniaga x="35" y="-20" width="225" height="61" stretch="1">
|
||||
<texture>ui_inGame2_slider</texture>
|
||||
<magnifire x="0" y="12" width="225" height="38" stretch="1">
|
||||
<y_offset>0</y_offset>
|
||||
</magnifire>
|
||||
</shniaga>
|
||||
</shniaga_wnd>
|
||||
|
||||
<button h="38"/>
|
||||
|
||||
<menu_main btn_height="38" font="graffiti22" a="255" r="240" g="240" b="240">
|
||||
<btn name="btn_newgame" caption="ui_mm_newgame" />
|
||||
<btn name="btn_load" caption="ui_mm_load_game" />
|
||||
<btn name="btn_lastsave" caption="ui_mm_last_save" />
|
||||
<btn name="btn_credits" caption="ui_mm_credits" />
|
||||
<btn name="btn_options" caption="ui_mm_options_n" />
|
||||
<btn name="btn_mcm" caption="ui_mm_menu_mcm" />
|
||||
<btn name="btn_quit" caption="ui_mm_quit2windows" />
|
||||
</menu_main>
|
||||
|
||||
<menu_network_game btn_height="30" font="graffiti22" a="255" r="240" g="240" b="240">
|
||||
<btn name="btn_internet" caption="ui_mp_internet" />
|
||||
<btn name="btn_localnet" caption="ui_mp_localnet" />
|
||||
<btn name="btn_new_back" caption="ui_mm_back" />
|
||||
</menu_network_game>
|
||||
|
||||
<menu_main_logout btn_height="30" font="graffiti22" a="255" r="240" g="240" b="240">
|
||||
<btn name="btn_newgame" caption="ui_mm_newgame" />
|
||||
<btn name="btn_load" caption="ui_mm_load_game" />
|
||||
<btn name="btn_logout" caption="ui_mm_logout" />
|
||||
<btn name="btn_options" caption="ui_mm_options_n" />
|
||||
<btn name="btn_mcm" caption="ui_mm_menu_mcm" />
|
||||
<btn name="btn_quit" caption="ui_mm_quit2windows" />
|
||||
</menu_main_logout>
|
||||
|
||||
<menu_main_last_save btn_height="30" font="graffiti22" a="255" r="240" g="240" b="240">
|
||||
<btn name="btn_newgame" caption="ui_mm_newgame" />
|
||||
<btn name="btn_load" caption="ui_mm_load_game" />
|
||||
<btn name="btn_lastsave" caption="ui_mm_last_save" />
|
||||
<btn name="btn_options" caption="ui_mm_options_n" />
|
||||
<btn name="btn_mcm" caption="ui_mm_menu_mcm" />
|
||||
<btn name="btn_quit" caption="ui_mm_quit2windows" />
|
||||
</menu_main_last_save>
|
||||
|
||||
<menu_new_game btn_height="34" font="graffiti22" a="255" r="240" g="240" b="240">
|
||||
<btn name="btn_novice" caption="ui_mm_novice" />
|
||||
<btn name="btn_stalker" caption="ui_mm_stalker" />
|
||||
<btn name="btn_veteran" caption="ui_mm_veteran" />
|
||||
<btn name="btn_master" caption="ui_mm_master" />
|
||||
<btn name="btn_new_back" caption="ui_mm_back" />
|
||||
</menu_new_game>
|
||||
|
||||
<menu_main_single btn_height="34" font="graffiti22" a="255" r="240" g="240" b="240">
|
||||
<btn name="btn_ret" caption="ui_mm_return_game" />
|
||||
<btn name="btn_save" caption="ui_mm_save_game" />
|
||||
<btn name="btn_load" caption="ui_mm_load_game" />
|
||||
<btn name="btn_options" caption="ui_mm_options_n" />
|
||||
<btn name="btn_mcm" caption="ui_mm_menu_mcm" />
|
||||
<btn name="btn_credits" caption="ui_mm_credits" />
|
||||
<btn name="btn_quit_to_mm" caption="ui_mm_quit_game" />
|
||||
<btn name="btn_quit" caption="ui_mm_quit2windows" />
|
||||
</menu_main_single>
|
||||
|
||||
<menu_main_single_dead btn_height="34" font="graffiti22" a="255" r="240" g="240" b="240">
|
||||
<btn name="btn_lastsave" caption="ui_mm_last_save" />
|
||||
<btn name="btn_load" caption="ui_mm_load_game" />
|
||||
<btn name="btn_options" caption="ui_mm_options_n" />
|
||||
<btn name="btn_mcm" caption="ui_mm_menu_mcm" />
|
||||
<btn name="btn_credits" caption="ui_mm_credits" />
|
||||
<btn name="btn_quit_to_mm" caption="ui_mm_quit_game" />
|
||||
<btn name="btn_quit" caption="ui_mm_quit2windows" />
|
||||
</menu_main_single_dead>
|
||||
|
||||
<menu_main_mm btn_height="34" font="graffiti22" a="255" r="240" g="240" b="240">
|
||||
<btn name="btn_ret" caption="ui_mm_return_game" />
|
||||
<btn name="btn_options" caption="ui_mm_options_n" />
|
||||
<btn name="btn_mcm" caption="ui_mm_menu_mcm" />
|
||||
<btn name="btn_quit_to_mm" caption="ui_mm_disconnect" />
|
||||
<btn name="btn_quit" caption="ui_mm_quit_game" />
|
||||
</menu_main_mm>
|
||||
|
||||
|
||||
<menu_sound random="0" >
|
||||
<whell_click>ui_menu_click</whell_click>
|
||||
|
||||
<menu_music>music\pripyat_whispers_final</menu_music>
|
||||
</menu_sound>
|
||||
|
||||
|
||||
<static_version x="512" y="740">
|
||||
<text align="c" font="letterica16" color="ui_white" complex_mode="0"/>
|
||||
</static_version>
|
||||
|
||||
<msg_wnd x="0" y="0" width="210" height="100">
|
||||
<background x="0" y="0" width="210" height="100">
|
||||
<texture>ui_icons_PDA_tooltips</texture>
|
||||
</background>
|
||||
<text x="20" y="20" width="190" height="100">
|
||||
<text font="letterica18" color="ui_6" complex_mode="1" align="l" vert_align="t"/>
|
||||
</text>
|
||||
</msg_wnd>
|
||||
</w>
|
||||
@@ -0,0 +1,31 @@
|
||||
function on_xml_read()
|
||||
RegisterScriptCallback("on_xml_read", function(xml_file_name, xml_obj)
|
||||
if xml_file_name == [[ui\ui_mm_main.xml]]
|
||||
or xml_file_name == [[ui\ui_mm_main_16.xml]]
|
||||
or xml_file_name == [[ui\ui_credits_16.xml]]
|
||||
or xml_file_name == [[ui\ui_mm_faction_select.xml]]
|
||||
or xml_file_name == [[ui\ui_mm_faction_select_16.xml]]
|
||||
or xml_file_name == [[ui\ui_mm_load_dlg.xml]]
|
||||
or xml_file_name == [[ui\ui_mm_load_dlg_16.xml]]
|
||||
or xml_file_name == [[ui\ui_mm_save_dlg.xml]]
|
||||
or xml_file_name == [[ui\ui_mm_save_dlg_16.xml]]
|
||||
or xml_file_name == [[ui\ui_options.xml]]
|
||||
or xml_file_name == [[ui\ui_options_16.xml]]
|
||||
or xml_file_name == [[ui\ui_mcm.xml]]
|
||||
or xml_file_name == [[ui\ui_mcm_16.xml]]
|
||||
then
|
||||
|
||||
math.randomseed(os.time())
|
||||
|
||||
local res = xml_obj:query("background > auto_static > texture")
|
||||
local menu_t = {
|
||||
"ui\\DG_Freedom"
|
||||
}
|
||||
local picked_menu = menu_t[math.random(1, #menu_t)]
|
||||
if res[1] then
|
||||
el = res[1]
|
||||
xml_obj:setText (el, picked_menu)
|
||||
end
|
||||
end
|
||||
end)
|
||||
end
|
||||
@@ -0,0 +1,21 @@
|
||||
|
||||
function on_xml_read()
|
||||
RegisterScriptCallback("on_xml_read", function(xml_file_name, xml_obj)
|
||||
if xml_file_name == [[ui\ui_mm_main.xml]]
|
||||
or xml_file_name == [[ui\ui_mm_main_16.xml]]
|
||||
then
|
||||
|
||||
math.randomseed(os.time())
|
||||
|
||||
local res = xml_obj:query("menu_sound > menu_music")
|
||||
local mus_t = {
|
||||
"music\\mm_music\\track_1",
|
||||
}
|
||||
local picked_track = mus_t[math.random(1, #mus_t)]
|
||||
if res[1] then
|
||||
el = res[1]
|
||||
xml_obj:setText (el, picked_track)
|
||||
end
|
||||
end
|
||||
end)
|
||||
end
|
||||
+410
@@ -0,0 +1,410 @@
|
||||
--[[
|
||||
|
||||
File: UI_MAIN_MENU.SCRIPT
|
||||
Description: Load Dialog for STALKER
|
||||
Created: 28.10.2004
|
||||
Last edit: 10.01.2015
|
||||
Copyright: 2004 GSC Game World
|
||||
Author: Serhiy Vynnychenko (narrator@gsc-game.kiev.ua)
|
||||
Version: 0.9
|
||||
|
||||
-----------------------------------------------------
|
||||
|
||||
Modified by Tronex
|
||||
2018/7/17 - Prevent saving when hardcore save modes are active
|
||||
2019/10/28 - New keybinds and actions
|
||||
|
||||
--]]
|
||||
|
||||
class "main_menu" (CUIScriptWnd)
|
||||
|
||||
function main_menu:__init() super()
|
||||
math.randomseed(device():time_continual())
|
||||
self.mbox_mode = 0
|
||||
self:InitControls()
|
||||
self:InitCallBacks()
|
||||
ui_mcm.init_opt_base()
|
||||
SendScriptCallback("main_menu_on_init",self)
|
||||
RegisterScriptCallback("on_localization_change",self)
|
||||
|
||||
if not (level.present()) then
|
||||
xrs_debug_tools.on_game_start()
|
||||
end
|
||||
end
|
||||
|
||||
function main_menu:__finalize()
|
||||
end
|
||||
|
||||
function main_menu:InitControls()
|
||||
self:SetWndRect (Frect():set(0,0,1024,768))
|
||||
|
||||
local xml = CScriptXmlInit()
|
||||
xml:ParseFile ("ui_mm_main.xml")
|
||||
|
||||
xml:InitStatic ("background", self)
|
||||
self.shniaga = xml:InitMMShniaga("shniaga_wnd",self);
|
||||
|
||||
self.message_box = CUIMessageBoxEx()
|
||||
self:Register (self.message_box, "msg_box")
|
||||
|
||||
local _ver = xml:InitStatic ("static_version",self)
|
||||
local mm = _G.main_menu.get_main_menu()
|
||||
_ver:TextControl():SetTextColor (GetARGB(190, 190, 190, 190))
|
||||
local flavor_name = ""
|
||||
if anomaly_flavor then
|
||||
flavor_name = " - " .. anomaly_flavor.get_flavor()
|
||||
end
|
||||
_ver:TextControl():SetText (game.translate_string("ui_st_game_version") .. flavor_name .. (DEV_DEBUG and " (Debug mode - Press F1 for help)" or ""))
|
||||
|
||||
-- Message Window
|
||||
self.msg_wnd = xml:InitFrame("msg_wnd:background",self)
|
||||
self.msg_wnd:SetAutoDelete(false)
|
||||
self.msg_wnd_text = xml:InitTextWnd("msg_wnd:text",self.msg_wnd)
|
||||
self.msg_wnd_text:SetTextAlignment(2)
|
||||
|
||||
self.msg_wnd:Show(false)
|
||||
self.msg_wnd:SetColor(GetARGB(255,0,0,0))
|
||||
end
|
||||
|
||||
function main_menu:InitCallBacks()
|
||||
self:AddCallback("btn_newgame", ui_events.BUTTON_CLICKED, self.OnButton_new_game, self)
|
||||
self:AddCallback("btn_options", ui_events.BUTTON_CLICKED, self.OnButton_options_clicked, self)
|
||||
self:AddCallback("btn_mcm", ui_events.BUTTON_CLICKED, self.OnButton_mcm_clicked, self)
|
||||
self:AddCallback("btn_credits", ui_events.BUTTON_CLICKED, self.OnButton_credits_clicked, self)
|
||||
self:AddCallback("btn_load", ui_events.BUTTON_CLICKED, self.OnButton_load_clicked, self)
|
||||
self:AddCallback("btn_save", ui_events.BUTTON_CLICKED, self.OnButton_save_clicked, self)
|
||||
self:AddCallback("btn_quit", ui_events.BUTTON_CLICKED, self.OnButton_quit_clicked, self)
|
||||
self:AddCallback("btn_quit_to_mm", ui_events.BUTTON_CLICKED, self.OnButton_disconnect_clicked, self)
|
||||
self:AddCallback("btn_ret", ui_events.BUTTON_CLICKED, self.OnButton_return_game, self)
|
||||
self:AddCallback("btn_lastsave", ui_events.BUTTON_CLICKED, self.OnButton_last_save, self)
|
||||
|
||||
-- message box
|
||||
self:AddCallback("msg_box", ui_events.MESSAGE_BOX_OK_CLICKED, self.OnMsgOk, self)
|
||||
self:AddCallback("msg_box", ui_events.MESSAGE_BOX_CANCEL_CLICKED, self.OnMsgCancel, self)
|
||||
self:AddCallback("msg_box", ui_events.MESSAGE_BOX_YES_CLICKED, self.OnMsgYes, self)
|
||||
self:AddCallback("msg_box", ui_events.MESSAGE_BOX_NO_CLICKED, self.OnMsgNo, self)
|
||||
self:AddCallback("msg_box", ui_events.MESSAGE_BOX_QUIT_GAME_CLICKED,self.OnMessageQuitGame, self)
|
||||
self:AddCallback("msg_box", ui_events.MESSAGE_BOX_QUIT_WIN_CLICKED, self.OnMessageQuitWin, self)
|
||||
|
||||
self:Register(self, "self")
|
||||
self:AddCallback("self", ui_events.MAIN_MENU_RELOADED, self.OnMenuReloaded, self)
|
||||
end
|
||||
|
||||
function main_menu:Update()
|
||||
CUIScriptWnd.Update(self)
|
||||
-- Warning messages timer
|
||||
if (self.msg_wnd_timer) then
|
||||
self.msg_wnd_timer = self.msg_wnd_timer - 1
|
||||
if (self.msg_wnd_timer <= 0) then
|
||||
self.msg_wnd_timer = nil
|
||||
self.msg_wnd:Show(false)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function main_menu:Show(f)
|
||||
self.shniaga:SetVisibleMagnifier(f)
|
||||
end
|
||||
|
||||
|
||||
function main_menu:OnButton_last_save()
|
||||
|
||||
if ( alife() == nil) then
|
||||
local flist = getFS():file_list_open_ex("$game_saves$",bit_or(FS.FS_ListFiles,FS.FS_RootOnly),"*"..".scop")
|
||||
flist:Sort(FS.FS_sort_by_modif_down)
|
||||
local file = flist:GetAt(0)
|
||||
if not (file) then
|
||||
return
|
||||
end
|
||||
local file_name = string.sub(file:NameFull(), 0, (string.len(file:NameFull()) - string.len(".scop")))
|
||||
|
||||
exec_console_cmd("main_menu off")
|
||||
exec_console_cmd("start server("..file_name.."/single/alife/load) client(localhost)")
|
||||
return
|
||||
end
|
||||
|
||||
if ( (db.actor ~= nil) and (db.actor:alive() == false) ) then
|
||||
self:LoadLastSave ()
|
||||
return
|
||||
end
|
||||
|
||||
self.mbox_mode = 1
|
||||
self.message_box:InitMessageBox ("message_box_confirm_load_save")
|
||||
self.message_box:ShowDialog(true)
|
||||
end
|
||||
|
||||
function main_menu:OnButton_new_game()
|
||||
--game.start_tutorial("credits_seq")
|
||||
self:ShowFactionUI()
|
||||
end
|
||||
|
||||
function main_menu:OnButton_quit_clicked()
|
||||
self.message_box:InitMessageBox("message_box_quit_windows")
|
||||
self.message_box:ShowDialog(true)
|
||||
end
|
||||
|
||||
function main_menu:OnButton_disconnect_clicked()
|
||||
|
||||
self.message_box:InitMessageBox("message_box_quit_game")
|
||||
|
||||
if (level.game_id() ~= 1) then
|
||||
self.message_box:SetText("ui_mm_disconnect_message") -- MultiPlayer
|
||||
else
|
||||
self.message_box:SetText("ui_mm_quit_game_message") -- SinglePlayer
|
||||
end
|
||||
self.message_box:ShowDialog(true)
|
||||
end
|
||||
|
||||
function main_menu:OnButton_credits_clicked()
|
||||
-- local console = get_console()
|
||||
-- console:execute("main_menu off")
|
||||
game.start_tutorial("credits_seq")
|
||||
end
|
||||
|
||||
function main_menu:OnButton_save_clicked()
|
||||
|
||||
-- Saving will be interrupted if flags.ret is set to true by a custom script that have "on_before_save_input"
|
||||
if level.present() then
|
||||
local flags = {ret = false}
|
||||
SendScriptCallback("on_before_save_input", flags, 1, game.translate_string("st_ui_save"))
|
||||
if (flags.ret == true) then
|
||||
return
|
||||
end
|
||||
end
|
||||
|
||||
if self.save_dlg == nil then
|
||||
self.save_dlg = ui_save_dialog.UISaveDialog()
|
||||
self.save_dlg.owner = self
|
||||
end
|
||||
|
||||
self.save_dlg:FillList()
|
||||
self.save_dlg:ShowDialog(true)
|
||||
self:HideDialog()
|
||||
self:Show(false)
|
||||
end
|
||||
|
||||
function main_menu:OnButton_options_clicked()
|
||||
if (self.opt_dlg == nil) then
|
||||
self.opt_dlg = ui_options.UIOptions()
|
||||
self.opt_dlg.owner = self
|
||||
end
|
||||
|
||||
self.opt_dlg:ShowDialog(true)
|
||||
self:HideDialog()
|
||||
self:Show(false)
|
||||
self.opt_dlg:Reset_last_opt()
|
||||
end
|
||||
|
||||
function main_menu:OnButton_mcm_clicked()
|
||||
printf("MCMBTN press")
|
||||
if (self.mcm_dlg == nil) then
|
||||
self.mcm_dlg = ui_mcm.UIMCM()
|
||||
self.mcm_dlg.owner = self
|
||||
end
|
||||
|
||||
self.mcm_dlg:ShowDialog(true)
|
||||
self:HideDialog()
|
||||
self:Show(false)
|
||||
self.mcm_dlg:Reset_last_opt()
|
||||
end
|
||||
|
||||
function main_menu:OnButton_load_clicked()
|
||||
|
||||
if self.load_dlg ==nil then
|
||||
self.load_dlg = ui_load_dialog.UILoadDialog()
|
||||
self.load_dlg.owner = self
|
||||
end
|
||||
|
||||
self.load_dlg:FillList()
|
||||
self.load_dlg:ShowDialog(true)
|
||||
self:HideDialog()
|
||||
self:Show(false)
|
||||
end
|
||||
|
||||
function main_menu:OnButton_return_game()
|
||||
exec_console_cmd("main_menu off")
|
||||
SendScriptCallback("main_menu_on_quit",self)
|
||||
end
|
||||
|
||||
|
||||
function main_menu:OnMsgOk()
|
||||
if (self.mbox_mode == 2) then
|
||||
if mcm_log then
|
||||
mcm_log.close_logs()
|
||||
end
|
||||
exec_console_cmd("quit")
|
||||
end
|
||||
self.mbox_mode = 0
|
||||
end
|
||||
|
||||
function main_menu:OnMsgCancel()
|
||||
self.mbox_mode = 0
|
||||
end
|
||||
|
||||
function main_menu:OnMsgYes()
|
||||
|
||||
if self.mbox_mode == 1 then
|
||||
self:LoadLastSave()
|
||||
end
|
||||
|
||||
self.mbox_mode = 0
|
||||
end
|
||||
|
||||
function main_menu:OnMsgNo()
|
||||
self.mbox_mode = 0
|
||||
end
|
||||
|
||||
function main_menu:OnMessageQuitGame()
|
||||
exec_console_cmd("disconnect")
|
||||
end
|
||||
|
||||
function main_menu:OnMessageQuitWin()
|
||||
if mcm_log then
|
||||
mcm_log.close_logs()
|
||||
end
|
||||
exec_console_cmd("quit")
|
||||
end
|
||||
|
||||
|
||||
function main_menu:StartGame()
|
||||
if (alife() ~= nil) then
|
||||
exec_console_cmd("disconnect")
|
||||
end
|
||||
device():pause(false)
|
||||
exec_console_cmd("start server(all/single/alife/new) client(localhost)")
|
||||
exec_console_cmd("main_menu off")
|
||||
end
|
||||
|
||||
function main_menu:ShowFactionUI()
|
||||
if self.new_game_dlg == nil then
|
||||
self.new_game_dlg = ui_mm_faction_select.UINewGame(self)
|
||||
end
|
||||
|
||||
self.new_game_dlg:ShowDialog(true)
|
||||
self:HideDialog()
|
||||
self:Show(false)
|
||||
end
|
||||
|
||||
function main_menu:LoadLastSave()
|
||||
exec_console_cmd("main_menu off")
|
||||
exec_console_cmd("load_last_save")
|
||||
end
|
||||
|
||||
function main_menu:on_localization_change()
|
||||
self.opt_dlg = nil
|
||||
self.mcm_dlg = nil
|
||||
self.new_game_dlg = nil
|
||||
end
|
||||
|
||||
function main_menu:Dispatch(cmd, param) --virtual function
|
||||
if cmd == 2 then
|
||||
self:OnButton_multiplayer_clicked()
|
||||
end
|
||||
return true
|
||||
end
|
||||
|
||||
function main_menu:OnKeyboard(dik, keyboard_action) --virtual function
|
||||
CUIScriptWnd.OnKeyboard(self,dik,keyboard_action)
|
||||
local bind = dik_to_bind(dik)
|
||||
|
||||
SendScriptCallback("main_menu_on_keyboard",dik,keyboard_action,self,level.present())
|
||||
|
||||
if keyboard_action == ui_events.WINDOW_KEY_PRESSED then
|
||||
if (level.present()) then
|
||||
if (dik == DIK_keys.DIK_ESCAPE) then
|
||||
if (db.actor and db.actor:alive()) or (IsGameTypeSingle() ~= true) then
|
||||
self.OnButton_return_game()
|
||||
end
|
||||
return true
|
||||
elseif (bind == key_bindings.kQUICK_SAVE) then
|
||||
level_input.action_quick_save()
|
||||
return true
|
||||
elseif (bind == key_bindings.kQUICK_LOAD) then
|
||||
level_input.action_quick_load()
|
||||
return true
|
||||
|
||||
-- F6 in menu = Hardsave (script originally made by NamelessWanderer)
|
||||
elseif (dik == DIK_keys.DIK_F6) then
|
||||
|
||||
-- Saving will be interrupted if flags.ret is set to true by a custom script that have "on_before_save_input"
|
||||
if level.present() then
|
||||
local flags = {ret = false}
|
||||
SendScriptCallback("on_before_save_input", flags, 3, game.translate_string("st_ui_save"))
|
||||
if (flags.ret == true) then
|
||||
return true
|
||||
end
|
||||
end
|
||||
|
||||
if level.present() and (db.actor ~= nil) and db.actor:alive() then
|
||||
local Y, M, D, h
|
||||
Y, M, D, h = game.get_game_time():get(Y, M, D, h)
|
||||
|
||||
m = level.get_time_minutes()
|
||||
if m < 10 then
|
||||
m = ("0"..m)
|
||||
end
|
||||
local comm = utils_xml.get_special_txt(db.actor:character_community())
|
||||
local map = utils_xml.get_special_txt(level.name())
|
||||
exec_console_cmd("main_menu off")
|
||||
exec_console_cmd("save " .. comm .. " - " .. map .. " - hardsave - " .. string.format("%d.%d.%d %d-%d", D, M, Y, h, m))
|
||||
end
|
||||
end
|
||||
else
|
||||
if (dik == DIK_keys.DIK_F2) and DEV_DEBUG then
|
||||
axr_main.config:w_value("character_creation","new_game_test",true)
|
||||
--axr_main.config:w_value("character_creation","new_game_story_mode",true)
|
||||
axr_main.config:w_value("character_creation","new_game_difficulty",1)
|
||||
axr_main.config:w_value("character_creation","new_game_economy",1)
|
||||
--axr_main.config:w_value("character_creation","new_game_opened_routes",true)
|
||||
axr_main.config:w_value("character_creation","new_game_faction","stalker")
|
||||
axr_main.config:w_value("character_creation","new_game_loadout", "device_pda_1")
|
||||
axr_main.config:save()
|
||||
|
||||
self:StartGame()
|
||||
|
||||
elseif (bind == key_bindings.kQUICK_LOAD) then
|
||||
self:OnButton_last_save()
|
||||
return true
|
||||
end
|
||||
end
|
||||
|
||||
if (dik == DIK_keys.DIK_Q) then
|
||||
self:OnMessageQuitWin()
|
||||
|
||||
elseif (dik == DIK_keys.DIK_NUMPAD0) and DEV_DEBUG then
|
||||
reload_ini_sys()
|
||||
game.reload_language()
|
||||
printf("system_ini_reload = success!")
|
||||
|
||||
elseif (dik == DIK_keys.DIK_F1) and DEV_DEBUG then
|
||||
self:SetMsg( game.translate_string("st_ui_dbg_help"), 10 , 3)
|
||||
end
|
||||
end
|
||||
|
||||
return true
|
||||
end
|
||||
|
||||
function main_menu:OnMenuReloaded()
|
||||
printf("- main_menu:OnMenuReloaded()")
|
||||
--self:OnButton_options_clicked()
|
||||
end
|
||||
|
||||
function main_menu:SetMsg(text,tmr,align)
|
||||
if (text == "") then
|
||||
return
|
||||
end
|
||||
self.msg_wnd:Show(true)
|
||||
|
||||
align = align or 2
|
||||
local _x = (align == 3) and -512 or 0
|
||||
self.msg_wnd_text:SetTextAlignment(align)
|
||||
self.msg_wnd_text:SetText(text)
|
||||
self.msg_wnd_text:AdjustHeightToText()
|
||||
self.msg_wnd_text:SetWndSize(vector2():set(1024,self.msg_wnd_text:GetHeight()+10))
|
||||
self.msg_wnd_text:SetWndPos(vector2():set(_x,20))
|
||||
|
||||
self.msg_wnd:SetWndSize(vector2():set(1024,self.msg_wnd_text:GetHeight()+44))
|
||||
self.msg_wnd:SetWndPos(vector2():set(0,80))
|
||||
|
||||
self.msg_wnd_timer = 100*tmr
|
||||
end
|
||||
@@ -0,0 +1,30 @@
|
||||
local snd
|
||||
local mus_t = {
|
||||
"music\\mm_music\\track_1",
|
||||
}
|
||||
|
||||
function main_menu_on_init()
|
||||
|
||||
math.randomseed(os.time())
|
||||
local picked_track = mus_t[math.random(1, #mus_t)]
|
||||
if not picked_track then return end
|
||||
if snd then return end
|
||||
|
||||
snd = sound_object(picked_track)
|
||||
if not snd then return end
|
||||
|
||||
snd:play(db.actor,0,sound_object.s2d)
|
||||
|
||||
end
|
||||
|
||||
function main_menu_on_quit()
|
||||
if not snd then return end
|
||||
|
||||
snd:stop()
|
||||
snd = nil
|
||||
end
|
||||
|
||||
function on_game_start()
|
||||
RegisterScriptCallback("main_menu_on_init", main_menu_on_init)
|
||||
RegisterScriptCallback("main_menu_on_quit", main_menu_on_quit)
|
||||
end
|
||||
BIN
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,26 @@
|
||||
[General]
|
||||
modid=0
|
||||
version=
|
||||
newestVersion=
|
||||
category="17,"
|
||||
installationFile=
|
||||
ignoredVersion=
|
||||
repository=Nexus
|
||||
gameName=stalkeranomaly
|
||||
comments=
|
||||
notes=
|
||||
nexusDescription=
|
||||
url=
|
||||
hasCustomURL=false
|
||||
nexusFileStatus=1
|
||||
lastNexusQuery=
|
||||
lastNexusUpdate=
|
||||
nexusLastModified=2024-03-14T09:13:50Z
|
||||
nexusCategory=0
|
||||
converted=false
|
||||
validated=false
|
||||
color=@Variant(\0\0\0\x43\0\xff\xff\0\0\0\0\0\0\0\0)
|
||||
tracked=0
|
||||
|
||||
[installedFiles]
|
||||
size=0
|
||||
Reference in New Issue
Block a user