Notice the checkbox - when users tick this, a variable "bHasReadMessage=True" should be written to a UWindowExampleActor.ini file on their machine.
The problem is this config file is not being created on the client at all.
The variable is defined inside UWindowExampleActor.uc:
Code: Select all
class UWindowExampleActor expands Mutator config(UWindowExampleActor);
var config bool bHasReadMessage;
var PlayerPawn PP;
replication {
reliable if(Role < ROLE_Authority)
bHasReadMessage;
}
// [Stuff removed]
simulated function MarkAsRead() {
bHasReadMessage = True;
PP = PlayerPawn(Owner);
PP.Say("DEBUG from UWindowExampleActor MarkAsRead())");
PP.Say("bHasReadMessage: " $ string(bHasReadMessage));
SaveConfig();
}
Code: Select all
class A_ClientWindow expands UMenuDialogClientWindow;
var UWindowExampleActor UWin;
// [Stuff removed]
simulated function MarkAsRead() {
GetPlayerOwner().Say("DEBUG FROM A_ClientWindow MarkAsRead()");
UWin.MarkAsRead();
}
simulated static function bool HasReadMessage() {
return UWin.bHasReadMessage;
}
function Notify(UWindowDialogControl C, byte E) {
local bool bRead;
bRead = HasReadMessage();
Super.Notify(C, E);
switch(E) {
case DE_Click:
switch(C) {
case CloseButton:
GetPlayerOwner().Say("DEBUG from A_ClientWindow:");
GetPlayerOwner().Say("UWin.bHasReadMessage: " $ string(bRead));
GetPlayerOwner().Say("CheckBox.bChecked: " $ string(CheckBox.bChecked));
if (CheckBox.bChecked) {
MarkAsRead();
}
ParentWindow.ParentWindow.Close();
break;
}
break;
}
}
The code:
https://github.com/bunnytrack/UWindowEx ... er/Classes